Re: [systemd-devel] ip_forward issue again

2015-08-17 Thread Reindl Harald



Am 17.08.2015 um 22:51 schrieb Johannes Ernst:

The strange sysctl fails to setup IP forwarding #468”, closed after ordering 
systemd-sysctl and systemd-networkd, unfortunately still occurs for me.

https://github.com/systemd/systemd/issues/468#issuecomment-117904714


since the timing was repeatly unpredictable i added the service below on 
every machine years ago to re-execute sysctl *after* al network stuff 
was started


[root@srv-rhsoft:~]$ cat /etc/systemd/system/sysctl-post-network.service
[Unit]
Description=apply settings after network
After=network.service systemd-networkd.service network-online.target 
openvpn.service hostapd.service network-wlan-bridge.service


[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/sysctl -p
StandardOutput=null

[Install]
WantedBy=multi-user.target



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] ip_forward issue again

2015-08-17 Thread Johannes Ernst
The strange sysctl fails to setup IP forwarding #468”, closed after ordering 
systemd-sysctl and systemd-networkd, unfortunately still occurs for me.

https://github.com/systemd/systemd/issues/468#issuecomment-117904714

Cheers,



Johannes.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] ip_forward

2015-07-27 Thread Lennart Poettering
On Tue, 23.06.15 13:30, Johannes Ernst (johannes.er...@gmail.com) wrote:

 (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

This is the global option, it is related in non-obvious ways to the
per-interface one, which you can control with IPForward= option in the
.network interface.

Also note that the per-interface IPForward= option was buggy in older
versions, make sure to use only the most recent systemd versions for
this to work correctly.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] ip_forward

2015-06-23 Thread Johannes Ernst
(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


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel