Saturday 5 May 2018

How to enable IP masquerading/forwarding on CentOS 7



By default, the IP masquerading/Forwarding is disabled most of the Linux distributions. The IP forwarding is required for LVS router to forward network packets properly to the real servers and it should be enabled on each LVS router node on in the kernel level.
Search the following line in the file /etc/sysctl.conf:

net.ipv4.ip_forward = 0

Add or modify the directive value as below using file editor:

net.ipv4.ip_forward = 1

[root@linuxcnf ~]# vi /etc/sysctl.conf
net.ipv4.ip_forward = 1

Finally load the new settings:

[root@linuxcnf ~]# sysctl -p /etc/sysctl.conf

That’s it!!!

No comments:

Post a Comment