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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

saving ip_foward value 1

Status
Not open for further replies.

RandyRiegel

Programmer
Joined
Sep 29, 2003
Messages
256
Location
US
I'm running RH Fedora Core 2. I have adjusted my iptable settings to turn NAT on. Everything works fine except when I reboot the computer on it has internet access. I have to do the following to turn on IP forwarding in order for nat to work. I can I get ip forwarding to stay on even when rebooting machine?

I do the following to turn ip forwarding on:

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

Can I put this in a startup file somewhere? I haven't delt to much with having things happen on startup in Linux so this is problem something really simple I'm overlooking.

Randy
 
Most sources I've read advise one to edit /etc/sysctl.conf

There is a line in there that probably reads:

net.ipv4.ip_forwarding = 0


Change that line to read

net.ipv4.ip_forwarding = 1


You may need to restart your system for this to take effect.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top