[HOW TO] enable IPv4 forwarding support on CentOS/Redhat Linux

Hello Guys,

Question: Hey Guys, what are you doing?

Answer: humnnn, I' building one server to test a new system. Beyond this, I'm alone, I don't like this.

Question: Oh haha. Are you building Gateway Server, VPN Server , Proxy Server and PPP connection?

Answer: You need to enable kernel option IPv4 forwarding support in sysctl.conf file, To enable IPv4 on your Linux system, use the following command:

Step 1: Edit the sysctl.conf file and add the following line:
[root@centos01 ~]# vi /etc/sysctl.conf

And add the following line:

# Controls IP packet forwarding (required only for Gateway, VPN, Proxy, PPP)
net.ipv4.ip_forward = 0

Step 2: You must restart network for the change to take effect as show below:

[root@centos01 ~]#/etc/init.d/network restart

You also have another way to update the entry without restarting the network by using the following command:

[root@centos01 ~]#sysctl -w net.ipv4.ip forward=1

Answer: Oh you are right. Look at here, it's running. Thank you

Question: You're welcome.





Thank you for reading this article, please a comment if you are interested.
Tiến Phan - R0039
Knowledge is Endless
Sharing for Success


0 nhận xét:

Post a Comment