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
| improve this answer | |


You should add: net.ipv4.ip_forward = 1 into file /usr/lib/sysctl.d/50-default.conf and /sbin/sysctl -p or reboot.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.