Questions tagged [network-namespace]

A network namespace is an isolated software implementation of a network stack with its own devices, routes and firewall rules within a Linux operating system.

80 questions
19
votes
4 answers

How can I switch from a custom linux network namespace back to the default one?

With ip netns exec you can execute a command in a custom network namespace - but is there also a way to execute a command in the default namespace? For example, after executing these two commands: sudo ip netns add test_ns sudo ip netns exec test_ns…
Martin
  • 292
  • 1
  • 2
  • 8
15
votes
3 answers

How can I move an interface out of a network namespace?

If I move an interface temporarily into a netns with ip link set eth10 netns myns then it no longer is visible in the root, only within the namespace myns. How do I move it back, something like (these obviously don't exist): ip link unset eth10 or…
deitch
  • 585
  • 1
  • 4
  • 15
11
votes
1 answer

Windows equivalent of Linux Network Namespace

Does windows have an equivalent of the Linux Network Namespace? I want to create a new interface and have that interface only accessible to specific applications, that interface would not be listening on the standard windows ports (139 445…
Rowan Smith
  • 211
  • 1
  • 4
9
votes
1 answer

Cannot create nested network namespace

Is seems that one is not able to create a network namespace from a network namespace. It results in "Error: Peer netns reference is invalid.". Is this a bug or is there some kind of limitation that I am not aware of? Below is my cmd trace of the…
user98651
  • 193
  • 1
  • 5
8
votes
2 answers

Run a systemd unit in a specified network namespace

I would like to instruct systemd to 'run a unit' in a specified, pre-existing network namespace, in particular to start the unit's process(es) in the namespace.
A__A__0
  • 423
  • 2
  • 8
  • 17
5
votes
2 answers

Is it possible to do Linux network namespaces (netns) on MacOS?

Context - I'm trying to get a docker cluster running on MacOSX. Part of the install process for getting docker running is to install pipework. Pipework relies on /var/run/netns My question is: Is there an equivalent of netns for Mac OS X?
Hawkeye
  • 2,699
  • 9
  • 30
  • 35
4
votes
2 answers

How to run a command in another process's network namespace?

There is a process running in its own network namespace. I would like to telnet to the machine and run a command in this process network namespace, something like that (17543 is the pid of the process with its own network namespace): # ip netns exec…
wulujey
  • 141
  • 1
  • 1
  • 2
4
votes
1 answer

Unable to add interface to network namespace on boot

I have problem with adding a phyisical ethernet interface to a predefined namespace , adding that to interfaces file in pre-up/post-up event do not work. It adds eth to namespace, but ip address and LOWER_UP state never appear. Removing namespace…
Swift
  • 175
  • 8
3
votes
1 answer

Netstat and ss doesn't see connection

I'm trying to find which application running on Kubernetes cluster is using a specific port to communicate with RabbitMQ cluster. On RabbitMQ I see that connection is coming from 192.168.1.10:34226. 192.168.1.10 is one of Kubernetes nodes. After…
QkiZ
  • 634
  • 2
  • 9
  • 22
3
votes
2 answers

Secondary IP in its own netns namespace

Is there a way I can move a secondary IP into its own namespace while keeping the primary IP on the original device? If I have 10.0.0.1 and 10.0.0.2 on device eth0, but I want 10.0.0.2 to be in its own netns test, the closest I've come to that…
pilcrow
  • 459
  • 5
  • 19
3
votes
1 answer

openvpn post-up script fails with “Operation not permitted” if and only if openvpn is run by systemd

I have this post-up script that is run by openvpn: #!/bin/bash echo "I am: `whoami`" echo "Moving interface into the netns" ip link set dev "$1" up netns hydrogenvpn mtu "$2" echo "Listing" ip netns ls echo "test" ip netns exec hydrogenvpn cat…
Valentin Lorentz
  • 197
  • 2
  • 14
3
votes
2 answers

How to create permanent linux network namespace

I know that ip netns add xxx command can be used to create a linux network namespace, but it is not permanent, meaning after server reboot the created namespace will be gone. Then how can I create a permanent one which can survive server reboot?
Zii
  • 31
  • 1
  • 3
3
votes
0 answers

Linux device route without broadcast

I have the following setup: A network namespace, ns1 A pair of virtual interfaces, ns_ext1 and ns_int1. ns_ext exists in the global namespace, and ns_int1 exists in ns1. A GRE device, gre1, which exists in ns1. None of these devices are assigned IP…
joshlf
  • 119
  • 6
3
votes
1 answer

cannot ping linux network namespace within the same subnet

Here is a quick summary of the issue. I cannot communicate with a linux network namespace within the same subnet. I am running Ubuntu 14.04.1 LTS on a headless server. I have been troubleshooting this for about a week, so thanks in advanced for any…
David Custer
  • 61
  • 1
  • 7
3
votes
1 answer

Linux network namespaces - ping fails on specific veth

I just started to exploring network namespaces. I try to implement the following simple setting following the article in http://www.opencloudblog.com/?p=42 +--------+ +-----------+ +--------+ | …
Vasilis
  • 293
  • 1
  • 4
  • 13
1
2 3 4 5 6