Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-21-2005, 11:24 PM
|
#1
|
Member
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420
Rep:
|
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! 
|
|
|
09-22-2005, 09:31 AM
|
#2
|
Member
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420
Original Poster
Rep:
|
*bump*
I know one of you gurus can help me! 
|
|
|
09-22-2005, 09:52 AM
|
#3
|
Member
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338
Rep:
|
Not an answer to your question but I put on-boot commands (including enabling ip forwarding) in /etc/rc.d/rc.local
|
|
|
09-22-2005, 10:14 AM
|
#4
|
LQ Newbie
Registered: Apr 2005
Posts: 23
Rep:
|
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
|
|
|
09-22-2005, 10:26 AM
|
#5
|
Moderator
Registered: Aug 2002
Posts: 26,521
|
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.
|
|
|
09-26-2005, 06:10 PM
|
#6
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
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.
|
|
|
All times are GMT -5. The time now is 03:23 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|