LinuxQuestions.org
Visit the LQ Articles and Editorials section
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
 
LinkBack Search this Thread
Old 06-24-2002, 02:42 AM   #1
Griffon26
Member
 
Registered: Sep 2001
Location: The Netherlands
Distribution: Gentoo, Debian, Mandrake, LFS
Posts: 182

Rep: Reputation: 30
Question firewall script run at boot -> no masq, rerun manually -> masq worx


I have set up my firewall script as 'iptables' in the /etc/init.d/ dir and put this line in it:
Quote:
# chkconfig: 2345 08 92
chkconfig indeed created links in the rc directories.

I can also see (by putting "echo something > /tmp/somefile" in the firewall script) that it is being run at boottime.

After startup I can see that the rules (iptables -L) are present.

Why then doesn't masquerading work? If I call the script manually (/etc/init.d/iptables restart), masquerading does work.
 
Old 06-24-2002, 02:58 AM   #2
Griffon26
Member
 
Registered: Sep 2001
Location: The Netherlands
Distribution: Gentoo, Debian, Mandrake, LFS
Posts: 182

Original Poster
Rep: Reputation: 30
I found out it has something to do with forwarding which for some reason isn't enabled when the script is run for the first time.

I think it has something to do with the moment when the script is run. Maybe /proc/sys/net/ipv4/ip_forward doesn't exist yet. I'm checking it now.

Last edited by Griffon26; 06-24-2002 at 03:02 AM.
 
Old 06-24-2002, 03:17 AM   #3
Griffon26
Member
 
Registered: Sep 2001
Location: The Netherlands
Distribution: Gentoo, Debian, Mandrake, LFS
Posts: 182

Original Poster
Rep: Reputation: 30
Pff, sorry for wasting your time.

It turned out that I had forwarding set to "no" in /etc/sysconfig/network which was causing all sorts of scripts to set /proc/sys/net/ipv4/ip_forward back to 0.

Now it's working perfectly.

Nice talking to m'self
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 04:19 AM
linux masq server to linux masq server VPN rob_roman23 Linux - Networking 0 09-13-2003 09:54 AM
IP Masq ExEleven Linux - Networking 4 12-14-2002 06:36 AM
How to load ethx, firewall and MASQ on boot?! Tekime Linux - Networking 2 02-18-2002 10:42 AM
ip masq davinci Linux - Security 7 10-02-2001 07:27 PM


All times are GMT -5. The time now is 02:48 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
Open Source Consulting | Domain Registration