Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
		Network Troublshooting => General Networking Support in Linux => Topic started by: robmainella on November 04, 2004, 05:15:05 AM
		
			
			- 
				Hey everyone,
When I turn on ip_forward it turns off when I reboot.  How can I make it stay on when rebooting?
Thanks,
Rob
			 
			
			- 
				Just put the command in ur rc.local file under the directory /etc/rc.d/
If  u r a RedHat/Fedora Core 2 user u change do the following:
Change the configuration parameter to activate this in the file /etc/sysctl.conf. Remove the "#" from the line related to packet forwarding.
 
Before
 
# Disables packet forwarding
#net.ipv4.ip_forward=1
 
After
 
# Enables packet forwarding
net.ipv4.ip_forward=1
 
This will only enable it when you reboot at which time Linux will create a file in one of the subdirectories of the special RAM memory based /proc filesystem. To activate the feature immediately you have to create a single lined text file called /proc/sys/net/ipv4/ip_forward and it only contain the value "1". Here is how it's done:
 
[root@siaukia abc] echo 1 > /proc/sys/net/ipv4/ip_forward
This is a reference from www.linuxhomenetworking.com