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.
Questions tagged [network-namespace]
71 questions
0
votes
1 answer
How to access the files present inside namespace to the outside in Linux Machine?
I have linux system where i created network namespace "BLUE_NAME", requirement to access the /var/tmp files present in the BLUE_NAME network space to outside of the name space (Host Machine).Request you provide your suggestion.
![](../../users/profiles/521705.webp)
user521705
- 3
- 1
0
votes
0 answers
Two physically different devices on different interfaces with the same IP
I have two GoPro cameras that I am trying to connect to simultaneously. They each act as routers, which my two wireless cards connect to. The problem is, they both have IP 10.5.5.9, and I want to be able to run a python script that sends traffic to…
![](../../users/profiles/473599.webp)
dubble_oh_nexus
- 1
- 1
0
votes
0 answers
Forward Traffic between Namespaces
I have 3 interfaces: eth0 eth1 eth2:
eth0 is directly connected to the Internet.
eth1 and eth2 are connected to an external switch with no Internet connectivity.
My goal was to connect eth1 and eth2 through the external switch and forward traffic…
![](../../users/profiles/133511.webp)
Human
- 141
- 1
- 7
0
votes
1 answer
Linux netns: run different commands with different IP's on one physical interface
I have a Debian Stretch VPS with 4 IPv4 addresses. I want to run several programs, binding them to specific IP addresses (To make outgoing HTTP requests from different IP's). So for example command
~$ curl icanhazip.com
would output specific…
![](../../users/profiles/379791.webp)
Egor
- 111
0
votes
2 answers
Adding vrf interface to a network namespace
I am trying to add a VRF interface to a network namespace in Linux. I am getting
RTNETLINK answers: invalid argument.
Kernel version I am using is 4.15.0 from kernel.org
Below is the exact list of commands I am running and associated output
$IP…
![](../../users/profiles/457729.webp)
gabhijit
- 101
- 2
0
votes
1 answer
ifconfig up does not execute from cron
I'm attempting to combine Scott Lowe's guide to creating a namespace with this answer on forwarding traffic between two interfaces.
I have this script that runs on each reboot using the cron @reboot directive: (I am using the script because none of…
![](../../users/profiles/105599.webp)
Brandon Lebedev
- 177
- 1
- 1
- 10
0
votes
1 answer
Linux transparent bridge: dhclient kills all traffic
I'm encountering a very odd situation with Hypriot OS.
Network configuration:
+--------+ +------+-----+------+ +---------------------+ +-------+
+ laptop +--+ eth0 + br0 + eth1 +--+ router @ 10.98.76.1 +--+ tower +
+--------+ …
![](../../users/profiles/409183.webp)
Jim Hume
- 3
- 3
0
votes
2 answers
How to connect custom network namespace to root network namespace?
I would like to connect the root network namespace to my custom network namespace in my Ubuntu box. Here is my network diagram:
Basically my custom network namespace is the one who control the vm network (such as assigning IP, etc).
I would like to…
![](../../users/profiles/268179.webp)
Kintarō
- 181
- 2
- 7
0
votes
0 answers
iptables -j MASQUERADE for a specific network interface: after connecting to a VPN and changing the default route, connection in the peer is lost
I use to forward traffic from my wireless card to network namespaces.
I create the network namespace, virtual ethernet interfaces and all the rest:
ip netns add nsx
ip link add vethx type veth peer name peerx netns nsx
ip link set vethx up
ip…
![](../../users/profiles/865917.webp)
phantomcraft
- 123
- 5
0
votes
0 answers
How can I set up a transparent proxy (TPROXY type) across network namespaces?
I want to setup a transparent proxy across network namespaces. I have two network namespaces, "nsx" and "nsy", each one has a veth pair, the pair of "nsx" is pointed to the host, the pair of "nsy" is pointed to "nsx", in the following scheme…
![](../../users/profiles/865917.webp)
phantomcraft
- 123
- 5
0
votes
0 answers
Setting up a transparent proxy across network namespaces: failed to get target destination address
I'm trying to setup a transparent proxy across network namespaces.
First I create the network namespaces, virtual ethernet devices and enable forwarding inside one of the namespaces:
ip netns add nsx
ip netns add nsy
ip link add vethx type veth peer…
![](../../users/profiles/865917.webp)
phantomcraft
- 123
- 5
0
votes
1 answer
systemd-resolve resolves incorrectly inside a network namespace
I have an Ubuntu machine with a network namespace (ns1) connected to the host network namespace via veth. I created a MASQUERADE rule in iptables to access the internet and I can ping 8.8.8.8 from the network namespace.
When I do dig google.com from…
![](../../users/profiles/371159.webp)
mosquetero
- 239
- 2
- 9
0
votes
0 answers
Cannot connect macvlan to the internet
When I tried to connect macvlan to the internet and it was not successful.
I used namespace to accomplish that. I also checked the comments on this question - How to connect macvlan to the internet?
I have EC2 (Ubuntu 20.04) virtual machine of AWS,…
![](../../users/profiles/944331.webp)
Hayk
- 1
0
votes
1 answer
Connect to internet through network connection inside network namespace without setting as a default route
I need to do a setup like this (with Linux):
I want to have a network namespace (let's say weth_ns) with a network interface connected to internet (weth0)
I want to have a different network interface as a default route in the host namespace…
![](../../users/profiles/88774.webp)
Karel Bílek
- 155
- 2
- 7
0
votes
0 answers
systemd-nspawn - run a host binary with network isolation
I am trying to run a binary sitting on the host machine using systemd-nspawn with networking support. I am trying to run multiple copies of the binary where each instance would have its IP address.
I tried various networking options like…
![](../../users/profiles/463620.webp)
Ranjandas
- 73
- 7