[systemd-devel] Recommended way to enable IPForward for a system using networkd?
Filipe Brandenburger
filbranden at google.com
Fri Aug 3 21:01:43 UTC 2018
On Fri, Aug 3, 2018 at 4:31 AM Lennart Poettering <lennart at poettering.net>
wrote:
> [...] for the interfaces networkd manages
> it will ensure that the per-interface ip forwarding bool is exactly
> on when the .network file says so and not otherwise. This means
> turning on the global setting won't bother networkd much,
> *forwarding will remain off on specific interfaces* if the individual
> .network
> files didn't say otherwise.
>
Wait, what?
If we're turning this on globally now (since commit 765afd5c4dbc
<https://github.com/systemd/systemd/commit/765afd5c4dbc71940d6dd6007ecc3eaa5a0b2aa1>),
how is forwarding going to remain off in some of the interfaces?
I looked at the code and didn't find any references to
ipv4/conf/*/forwarding anywhere...
Am I missing something?
If you want to turn on the flag for all interfaces managed by
> networkd, you'd have to modify the .network file for each (or add a
> .d/ dropin for them).
>
So the problem with the .d/ drop-in approach is that I would need to know
the exact name of the configuration file used to configure them, such
as 70-ens3.network or (blergh!) 10-netplan-ens4.network.
There's currently no concept in networkd for setting options on really
> *all* interfaces at once.
>
Well, networkd.conf can take DUIDType= and DUIDRawData= and that applies to
all interfaces doing DHCP, no? :-)
So looks like my best bet right now is:
# echo net.ipv4.ip_forward >/etc/sysctl.d/90-forwarding.conf
>From what you're saying, it seems it'll be fine to do that, since it won't
break anything, it won't interfere with networkd and networkd won't
interfere with it... Right?
Thanks!
Filipe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180803/ca635080/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4851 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180803/ca635080/attachment.bin>
More information about the systemd-devel
mailing list