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
  • 55,965
  • 20
  • 120
  • 179
Dheeraj
  • 21
  • 1
  • 1
  • 2

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
krs4keshara
  • 151
  • 2
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
  • 2