Questions tagged [network-namespaces]
The network-namespaces tag has no summary.
159 questions
0
votes
1
answer
104
views
create container with a tcp server socket inside from an outside app (as non root user)
I have an application and want to start a firefox where all network traffic from firefox goes through the application which does magic (doesn't really matter what it does).
The idea I have is to open ...
0
votes
0
answers
59
views
Bridging containers to external VLAN
I have a physical network with several VLANs. One of my computers (my main workstation) is connected to two different VLANs on this network, one tagged, the other not.
I have successfully set this ...
1
vote
0
answers
62
views
Binding a process to an interface
I have here a process from which I do not want to access the internet, except from my company VPN. My company VPN is using a tun device.
If the VPN is not active or does not work, the expected ...
2
votes
1
answer
740
views
Why am I getting no output in tcpdump even though there is data being sent and received when using network namespaces?
I'm using a fresh minimal Ubuntu server 24.04.1 LTS install.
I run these commands as root to set up networking and do some experiments:
If you have seen this post, it's the same setup but with the ip ...
1
vote
0
answers
55
views
Socat error inside Linux Network Namespaces
I'm trying to run socat forward ttyACM0 into UDP. It works with command.
socat UDP-LISTEN:14550,fork,reuseaddr FILE:/dev/ttyACM0,b57600,raw
Problem is, I need to access socat via ip address, which is ...
1
vote
0
answers
84
views
Is it possible to use a veth created in a user namespace as a regular user in a practical way?
This question hints that it is possible to create a veth (which normally requires root) from inside a user and network namespace, and indeed:
user@host$ unshare --user --net -r =bash
root@namespace# ...
0
votes
1
answer
205
views
What happens with bridge packets after they arrive at bridge?
Hello I have a simple setup for explanation purposes created with following scripts:`
env.sh
CON1="con1"
CON2="con2"
NODE_IP="10.0.0.20"
TUNNEL_IP="172.16.1.100&...
0
votes
1
answer
276
views
Debian network namespace isolation
I have an AppImage which I need to run 3 instances of, concurrently. Each instance will use it's own profile (Home directory). That's all very easy:
HOME=/home/user/home AppName.appimage
Now the ...
0
votes
0
answers
114
views
Virtual interface pair forwarding packets to each other
The goal is very simple: anything sent to pair1, as outgoing packet, should appear on pair0 as an incoming packet and vice versa. I am thinking on a layer3-only, virtual interface now.
tun could do ...
2
votes
0
answers
271
views
Application does DNS outside of its Network Namespace?
I am using unshare to create a network namespace:
unshare -rn bash
I already have the a working setup with veth-interfaces as described in this guide:
https://josephmuia.ca/2018-05-16-net-namespaces-...
4
votes
1
answer
2k
views
Separate network namespaces for different users?
I'm running Arch Linux on a laptop. What I want to achieve:
Multiple users
When each user logs in on a tty (which could be while another user is logged in on another tty---they're all me), they're in ...
2
votes
1
answer
200
views
Redirecting locally originated traffic with DNAT in OUTPUT chain not working as expected
I am having a dumb, and I am hoping you lovely people can jumpstart my brain.
I am running a service in a local network namespace. The namespace looks like this:
# ip -n ns1 addr
1: lo: <LOOPBACK,...
2
votes
0
answers
145
views
Pipewire sound card hijacked by netns
I sometimes run my browser in a VPN netns, like this:
sudo ip netns exec vpnns sudo -u myuser google-chrome &
This works great, except sometimes it seems that the netns "steals" the ...
1
vote
0
answers
329
views
How to firewall a network namespace using firewalld?
I'm running fedora 36 using firewalld as my firewall.
I set up a network namespace called "wireguard". It contains the interface wg0 which connects to Mullvad VPN. I set it up like this:
ip ...
0
votes
0
answers
240
views
Forward traffic from public IP to namespace
I have two VMs VM-A & VM-B connected via IPIP Tunnel in a namespace. I want the application in VM-B which is under namespace to be accessed from the public IP of VM-C. Can someone help me how can ...
0
votes
1
answer
962
views
Ubuntu 22.04 netns with veth connected to bridge unable to ping gateway
Hey guys this is probably just something stupid I'm missing, but I'm having trouble setting up a net namespace to use for my VPN. The weird part is that this script/setup was working, and has suddenly ...
0
votes
0
answers
740
views
socat streaming UDP is slower than TCP
I'm currently using subprocess.run(["socat", f"udp-listen:{_to},fork,reuseaddr,bind=127.0.0.1", f"""exec:'sudo ip netns exec {netns} socat STDIO "UDP-connect:...
1
vote
1
answer
496
views
If ports are unpriviledged, why can't I access them if I am root in a namespace?
I've run sudo sysctl -w net.ipv4.ip_unprivileged_port_start=1. However, sudo ip netns exec myvpn unshare -r python -m http.server -b 127.0.0.1 2 does not work. Strangely enough, this does: sudo ip ...
2
votes
1
answer
2k
views
Linux packet mark across network namespaces
I am trying to use iptables to packet mark packets of a certain source/destination IP in the mangle table on a given host. The packets are later forwarded to a particular network namespace on the same ...
2
votes
0
answers
627
views
Docker overlay network connection between containers lags simetimesin multiples of 1s
Two containers talking to each other on overlay network with high traffic (connection frequency) occasionally got connection lag almost exact multiple of 1s.
It doesn't matter whether it is same host ...
0
votes
1
answer
1k
views
How to connect Linux network namespace with other VM using internal network?
I have two Virtual Machnes (VM) in Virtualbox connected with internal network. On the first one I have network namespace named n0. I want to connect this namespace to network interface and finally ...
0
votes
0
answers
277
views
Runing libreoffice from network namespace session?
I am using Ubuntu Mate:
$ echo $DESKTOP_SESSION; cat /etc/issue; uname -a;
mate
Ubuntu 20.04.4 LTS \n \l
Linux mypc 5.4.0-104-generic #118-Ubuntu SMP Wed Mar 2 19:02:41 UTC 2022 x86_64 x86_64 x86_64 ...
0
votes
1
answer
1k
views
Can't access directory from netns
I created a simple test netns :
sudo ip netns add test
Then I brought up the lo interface.
I'm currently in the home directory of user1, and by executing
sudo ip netns exec test ls -la
I see all the ...
5
votes
1
answer
3k
views
How can I use a bind mount in a network namespace?
I have an app I run in a network namespace. This works well.
I want to run the app multiple times, in different namespaces. For convenience, I want to bind mount the app's working directory to ...
0
votes
1
answer
1k
views
To persist a namespace, create a bind mount point on which /proc/PID?
From https://man7.org/linux/man-pages/man1/n.1.html :
By default, a new namespace remains in existence only as long as it
has at least one member process. A namespace can be made persistent—
that ...