You are not logged in.
Hello, I am running Gnome with network-manager.
I have two network interfaces, both providing internet access, and I would like to attach Firefox to a specific one.
I went as far as learning network namespaces. So my attempt is:
$ sudo ip netns add myns # create namespace myns
$ sudo ip link set dev mydev netns myns # attach mydev to myns
$ ip netns exec myns /usr/bin/firefox # run firefox inside myns
However the second command fails with:
$ sudo ip link set dev mydev netns myns
RTNETLINK answers: Invalid argument
and I could not find any other hint to progress.
I am open to completely different solutions, but no GUIs please.
Offline
Did you replace mydev with your adapter? E.g.
ip link set dev enp0s25 netns whatever
? After adding to your namespace, ip a should not list this device anymore. What is the output of ip -n myns a?
Offline
I discovered that I can add to the namespace my (unplugged) ethernet interface, but I get the above error with the wireless interface.
Stopping NetworkManager.service and bringing the wireless interface down does not help.
ip -n myns a shows the loopback interface and the ethernet one, the wireless never shows up as
ip link set dev wlp4s0 netns myns
always results in:
RTNETLINK answers: Invalid argument
Offline
For wireless you must use iw with the phy. See How to move wireless connection to other network namespace? for an example usage.
Offline
Thanks a lot for pointing me in the right direction!
I haven't tried yet but that should work properly, although I may also setup a bridge.
Offline