How to enable ip forwarding on CentOS 7

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.

Solution:

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

Leave a Reply

Your email address will not be published. Required fields are marked *

6 + 7 =


This site uses Akismet to reduce spam. Learn how your comment data is processed.