Wednesday 23 November 2011

ipforwarding Enable in Linux :- How to??

- Thanks Bloy

To check its enabled or not :

#sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 0 (Value 0=Disabled, 1=Enabled)

or else

#cat /proc/sys/net/ipv4/ip_forward
0
===============

To enable :

#sysctl -w net.ipv4.ip_forward=1

or

#echo 1 > /proc/sys/net/ipv4/ip_forward

To make the change permanent add the below line in /etc/sysctl.conf

#Vi /etc/sysctl.conf:
net.ipv4.ip_forward = 1

and then run the below command

#sysctl -p /etc/sysctl.conf
#service network restart

No comments:

Post a Comment