networkd: Don't reset forwarding unless told to do so in config
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Fix Released
|
Wishlist
|
Martin Pitt |
Bug Description
It's been reported by several LXC users that systemd-networkd will turn off per-interface forwarding for all network interfaces when it starts.
Presumably upstream expects users to go and manually edit their config to allow it when needed.
This breaks LXC, libvirt, ... anything which ships a bridge that then NAT or route outgoing traffic. Requiring the user to do the config change would be a massive regression in user friendliness and having lxc, libvirt, ... do it for the user would be a policy violation.
As a result, I'd recommend we patch systemd to not interfere with forwarding unless explicitly configured by the user. This will allow all our existing scripts to keep setting things up themselves and have it all run fine.
Changed in systemd (Ubuntu): | |
status: | Triaged → In Progress |
assignee: | nobody → Martin Pitt (pitti) |
Can you please be more specific what exactly happens here?
$ cat /proc/sys/ net/ipv4/ conf/tun0/ forwarding net/ipv4/ conf/tun0/ forwarding
1
$ sudo systemctl start systemd-networkd
$ cat /proc/sys/
1
Is that the setting you mean? How to reproduce the disabling of forwarding? Apparently it's more than just "start networkd" (I don't have any actual *.network config on this machine). Or do you mean "all interfaces that have a config for networkd" instead of "all interfaces"? It seems reasonable that networkd puts the devices it configures itself into a defined state. You wouldn't use it to manage tun0 for LXC, as LXC itself already sets that up?