ifupdown-ng / ifupdown-ng

flexible ifup/ifdown implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Interface-wise IP forwarding configuration

BarbarossaTM opened this issue · comments

We should support (de)activating IP forwarding on a per interface basis as this exists within the Kernel / sysctl for a long time now and seems to be the way to go. Old school setting of

net.ipv4.ip_forward=1
net.ipv6.conf.all.forwarding=1

still works and will in most situations do what you want, but we should be able to set this on a per interface level.

I'm unsure how to call this options though. Naturally ip-forward comes to mind for IPv4 (which ifupdown2 uses, too), and ipv6-forward or ip6-forward (ifupdown2 naming) for IPv6. I have a slight tedency to go for

 ip_forward <yes|no>
 ipv6_forward <yes|no>
```

Any opnions?

Use the forward namespace for this:

forward-ipv4 yes
forward-ipv6 yes