[systemd-devel] ip_forward
Johannes Ernst
johannes.ernst at gmail.com
Tue Jun 23 13:30:05 PDT 2015
(Morale: in doubt, lean hard on your booleans)
1. Reboot host. (Arch running in VirtualBox on Mac)
2. host> sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1
3. host> sudo systemd-nspawn -M container -b -j -n --bind /home:/home
(Arch subset / UBOS)
4. container> ping 8.8.8.8
7 packets transmitted, 0 received, 100% packet loss, time 6009ms
5. host> sudo sysctl net.ipv4.ip_forward=0
net.ipv4.ip_forward = 0
6. host> sudo sysctl net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1
7. container> # ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=54 time=17.2 ms
This seems reproducible.
Settings:
host> cat /etc/systemd/network/50-containers.network
[Match]
Name=ve-*
[Network]
Address=0.0.0.0/28
IPMasquerade=yes
IPv4LL=yes
DHCPServer=yes
IPForward=yes
DNS=192.168.138.1
More information about the systemd-devel
mailing list