<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Aug 2, 2018 at 10:21 AM Mantas Mikulėnas <<a href="mailto:grawity@gmail.com">grawity@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Aug 2, 2018 at 8:18 PM Filipe Brandenburger <<a href="mailto:filbranden@google.com" target="_blank">filbranden@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">So, IPForward is a global setting and yet with networkd it needs to be attached to an interface...<div><br></div><div>What's the best way to enable it on a system, that's general enough and won't really depend on the existing interface configurations (let's assume those will be managed separately through drop-ins somehow...)</div></div></blockquote><div><br></div><div>It's a sysctl, so just set it through /etc/sysctl.d:</div></div></div></blockquote><div><br></div><div>Yes, I guess that would work... But I think this breaks into the abstraction a bit... Should I really care how forwarding is *implemented*?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div>net.ipv4.conf.all.forwarding = 1<br></div><div>net.ipv6.conf.all.forwarding = 1</div></div></div></blockquote><div><br></div><div>Actually, for IPv4 networkd sets net.ipv4.ip_forwarding = 1.</div><div><a href="https://github.com/systemd/systemd/blob/v239/src/network/networkd-link.c#L2455">https://github.com/systemd/systemd/blob/v239/src/network/networkd-link.c#L2455</a></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div>(For IPv4 it is both a global *and* per-interface setting, for some reason.)<br></div></div></div></blockquote><div><br></div><div>Yes, and looking at the history of the IPForward= feature, it used to be per-interface, but caused confusing behavior, so at some point it was decided to make it always work at a global scope, even though it's still configured per interface.</div><div><br></div><div>So: would it make sense to consider making it possible to configure this from the systemd-wide networkd.conf?</div><div><br></div><div>Or: am I missing a way to have a *.network file that would apply to all interfaces, even the ones that were previously configured?</div><div><br></div><div>Cheers,</div><div>Filipe</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
</blockquote></div></div>