I want to enable IP masquerading/forwarding on CentOS 7, but when I specify net.ipv4.conf.default.forwarding=1 in /etc/sysctl.conf, it doesn't work.
Can any one help with this problem?
Edit /etc/sysctl.conf:
$ vi /etc/sysctl.conf
Add (or modify) this line in the file:
net.ipv4.ip_forward = 1
Finally load the new settings:
sysctl -p /etc/sysctl.conf
Solution:
You should add: net.ipv4.ip_forward = 1 into file /usr/lib/sysctl.d/50-default.conf and /sbin/sysctl -p or reboot.