2

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?

gronostaj
  • 58,482
Dheeraj
  • 21

2 Answers2

4

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
0

Solution:

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

polar9527
  • 101