LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-21-2005, 11:24 PM   #1
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Rep: Reputation: 30
ip_forward set to 0 at boot time


Hey all,

My firewall is a cruddy old AT machine running RH9. Since it will reboot on a power outtage, I'm trying to use it to bring my entire network back online in such a situation. One of the ways in which I want it to do this (besides WOL) is to have the firewall be up and running immediately after rebooting. The problem is that the /proc/sys/net/ipv4/ip_forward file contains a '0' at boot time.

I have altered the /etc/init.d/iptables script to put a '1' in that file in the start function and put a '0' on the stop function. I have tested this, and it works when the machine is already running. However, at boot time, it is still set to '0'. I have iptables set to start at run-level 2 normally, but I tested it as starting at level 5 as the last process (prefixed with S99) and ip_forward was still set to 0. How am I going to determine what is overwriting the '1' value?


Thanks in advance!
 
Old 09-22-2005, 09:31 AM   #2
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
*bump*

I know one of you gurus can help me!
 
Old 09-22-2005, 09:52 AM   #3
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
Not an answer to your question but I put on-boot commands (including enabling ip forwarding) in /etc/rc.d/rc.local
 
Old 09-22-2005, 10:14 AM   #4
dereut
LQ Newbie
 
Registered: Apr 2005
Posts: 23

Rep: Reputation: 0
all documentation I have about iptables, NAT or other specify that you have to enter a command in your booting script to turn the option to 1, this is the behaviour per default so it is normal what you are seeing.

jsut enter a command in your rc.local like following :


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

I just check that is what I have in my iptables rules


reup
 
Old 09-22-2005, 10:26 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,521

Rep: Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224Reputation: 6224
It isn't necessary to add a line to the rc.local file.

The default settings are located in the /etc/sysctl.conf file. Change ip_forward from a 0 to a 1.

Your iptables may not be configured to start correctly. For Redhat, with a GUI is runlevel 5, without is 3.
 
Old 09-26-2005, 06:10 PM   #6
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
I'm running SmoothWall Express & it doesn't seem to have a sysctl.conf:
Code:
find /etc/ -name sysctl.conf
produces no result.


However,
Code:
grep -r ip_forward /etc/*
found the file where forwarding is turned on.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set and sync system time with time server?? servnov Linux - Newbie 6 12-03-2013 08:55 PM
Doub about `net time set` and daylight saving time Thakowbbery Linux - Software 0 10-17-2005 06:23 AM
how to set ip_forward on at startup? enjoyzj Linux - Networking 4 04-16-2004 11:56 AM
net.ipv4.ip_forward=1 How define it on boot ? sergiodemoura Linux - Newbie 5 12-04-2003 05:52 AM
Radeon Framebuffer - how to set at boot time? wraycarr Linux - Hardware 0 10-09-2003 01:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration