You are not logged in.

#1 2024-06-22 11:21:37

Frostregen
Member
Registered: 2024-06-10
Posts: 9

[SOLVED] Updating systemd from 255.7-1 to 256.1-1broke IPForward=ipv4

Hi there,

as of todays update it seems like the configuration of "IPForward=ipv4" is no longer setting "/proc/sys/net/ipv4/ip_forward" to 1.

Not sure how many are using this for their homeserver / router setup, but for me this broke my internet access today wink

It can be easily fixed temporarily by

echo 1 > /proc/sys/net/ipv4/ip_forward

I'm still looking for the "new" way of setting this up with systemd-networkd.

Greetings,
Frostregen

Last edited by Frostregen (2024-06-22 11:39:56)

Offline

#2 2024-06-22 11:29:57

just4arch
Member
Registered: 2023-01-07
Posts: 107

Re: [SOLVED] Updating systemd from 255.7-1 to 256.1-1broke IPForward=ipv4

https://github.com/systemd/systemd/blob/main/NEWS wrote:

          IPForward= setting in .network file is deprecated and replaced with
          IPv4Forwarding= and IPv6Forwarding= settings. These new settings are
          supported both in .network file and networkd.conf. If specified in a
          .network file, they control corresponding per-link settings. If
          specified in networkd.conf, they control corresponding global
          settings. Note, previously IPv6SendRA= and IPMasquerade= implied
          IPForward=, but now they imply the new per-link settings. One of the
          simplest ways to migrate configurations, that worked as a router with
          the previous version, is enabling both IPv4Forwarding= and
          IPv6Forwarding= in networkd.conf. See systemd.network(5) and
          networkd.conf(5) for more details.

Last edited by just4arch (2024-06-22 11:33:47)

Offline

#3 2024-06-22 11:38:33

Frostregen
Member
Registered: 2024-06-10
Posts: 9

Re: [SOLVED] Updating systemd from 255.7-1 to 256.1-1broke IPForward=ipv4

Yes, that's what I'm looking for.

Thanks smile

Offline

#4 2024-06-22 12:29:45

Frostregen
Member
Registered: 2024-06-10
Posts: 9

Re: [SOLVED] Updating systemd from 255.7-1 to 256.1-1broke IPForward=ipv4

To save some time for others:
In the older version, if you were setting the IPForward=ipv4 setting in a .network file, it would still set the "global" /proc/sys/net/ipv4/ip_forward to 1.

The current version properly supports setting it on a per link level.
This means a single IPv4Forwarding=yes in any .network file is not enough anymore.
You really need to specify it in any device where traffic needs to be routed between. (Typically your wan and lan)

The alternative is to set it in your /etc/systemd/networkd.conf to enable it globally again - but that is (and was) discouraged.

Edit:
FWIW I also updated the section in the wiki to reflect the new configuration: https://wiki.archlinux.org/title/System … Network%5D

Last edited by Frostregen (2024-06-22 13:44:23)

Offline

Board footer

Powered by FluxBB