LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 08-21-2005, 01:55 PM   #1
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Rep: Reputation: 30
Tracking changes to the ip_forward variable


I am trying to change my firewall machine (RH9 running iptables) such that when it reboots it will still act as I want it to. Currently, after rebooting, the /proc/sys/net/ipv4/ip_forward file contains a 0. I added a line in my /etc/init.d/iptables script in the "start" function to echo a "1" to that file. However, when I reboot, I still see a zero in that file. I added another line in the script to touch a non-existant file as a test to be sure that the start function in the /etc/init.d/iptables script was actually being run at boot time. I then rebooted, still found the ip_forward file to contain a zero, but the file that was touched appeared. Therefore, the start function is being run and the 1 is being echoed to the ip_forward file, but it is being overwritten as a 0 later.

I could simply add a line in my /etc/rc.d/rc.local file to echo a 0 to that file, but I don't want to do that unless I have to. What I want to do at this point is to find out what is echoing the "0" into the ip_forward file after the start function in the iptables script. However, I'm not really sure what the best way to determine this is. In addition, I don't really have any likely culprits in mind to monitor. Can anyone advise me on how to go about hunting this problem down?

Thanks in advance.
 
Old 08-21-2005, 02:51 PM   #2
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
AFAIK iptables doesn't store kernel parameters, so you should set them somewhere else, like rc.local, for example... BTW, i'm not sure how to do the change tracking you are asking about, though... are you 100% sure the value is being "changed" and isn't simply coming-up with it's default as it's supposed to??

EDIT: the more kosher way of setting these kinda parameters on red hat is by using the sysctl.conf file... for more info about this:

http://www.google.com/linux?&q=sysctl.conf



Last edited by win32sux; 08-21-2005 at 03:08 PM.
 
  


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
lost rc.ip_forward hardknox Slackware 5 03-24-2005 04:32 PM
ip_forward mikz Slackware 2 02-01-2005 04:49 AM
ip_forward permission denied jstu Linux - Networking 3 08-11-2002 12:21 AM
IP_Forward Neur0tek Linux - Newbie 9 05-09-2002 09:44 AM
ip_forward Sathe Linux - Networking 2 10-19-2001 12:53 AM


All times are GMT -5. The time now is 11:14 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration