Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

make ip_forward survive reboot?

Status
Not open for further replies.

capitano

Programmer
Jul 30, 2001
88
US
I'm setting up a Linux router. I've done:
echo 1 > /proc/sys/net/ipv4/ip_forward

but when I reboot, this value goes back to 0.

How do I make the changes stick?

Thanks,
Bryan C.
 
Hi,

The obvious thing is to put that line into the /etc/rc.d/rc.local (on redhat, mandrake, and maybe others) or equivalent start-up file.

There is also a setting in /etc/sysconfig/network that does the same thing (IP_FORWARD) .

Remember, the /proc filesystem is just a virtualisation of kernel memory and doesn't exist on disk, nor persist across reboots.

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top