You are not logged in.
I'm trying to configure my workstation to share its internet connection. My setup works just fine provided that I set the kernel variable "net.ipv4.ip_forward" to "1" after every reboot. I've added the line "net.ipv4.ip_forward = 1" to /etc/sysctl.conf. Unfortunately this doesn't work as expected and I see something like this after a reboot
someguy@aPC:~$ cat /etc/sysctl.conf
net.ipv4.ip_forward = 1
someguy@aPC:~$ sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 0
Can anyone think of a reason why the settings in /etc/sysctl.conf aren't being respected? Also, in troubleshooting this it would be helpful to know what program is responsible for reading /etc/sysctl.conf and setting kernel variables at runtime (the kernel perhaps?).
Any assistance would be greatly appreciated (but not compensated).
Last edited by tac-shell (2016-02-13 04:48:00)
Offline
The highlighted section sort of gives it away...
https://wiki.archlinux.org/index.php/Sy … figuration
Offline
Thanks for the prompt reply.
Following the wiki link you posted, I moved /etc/sysctl.conf to /etc/sysctl.d/ipv4_forwarding.conf and "net.ipv4.ip_forwarding" now equals "1" after booting. I suppose this is an example of why reading release notes is a good idea; it saves you from making mistakes when the default behavior of the system changes.
Also, judging from the sysctl wiki page, the answer to my second question is that systemd sets kernel variables based on the configuration files in /etc/sysctl.d.
Offline