LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-24-2003, 10:02 PM   #1
soldieron
LQ Newbie
 
Registered: Sep 2003
Posts: 2

Rep: Reputation: 0
Question IPTABLES nat doesn't start up at boot


I am running several RH8 firewalls using iptables with NAT enabled. What I am finding is that while iptables starts up just fine at boot, the nat part doesn't work until I do a restart.

I am running DHCP to the internal LAN, and was wondering if the ordering of these 2 (iptables starts up first) could be a problem?

According to /var/log/boot.log, iptables starts up without error. An iptables -L shows that the tables are all loaded and the rules all seem to be there. I have ip_forward turned on via /etc/sysctl.conf, and the script loads all the iptables modules before doing anything else practically.

Here are the NAT statements
$IPTABLES -A PREROUTING -t nat -i $EXTIF -p tcp -d $EXTPRINTIP --dport 9100 -j DNAT --to-destination $INTPRINTIP

#Source NAT from Internal Net to External Net
$IPTABLES -A POSTROUTING -t nat -o $EXTIF -j SNAT --to-source $EXTIP

thanks.
 
Old 09-24-2003, 10:22 PM   #2
illtbagu
Member
 
Registered: Dec 2002
Location: Nevada
Distribution: fedora, RHEL, ubuntu, suse
Posts: 343

Rep: Reputation: 30
Do yourself a big favor
http://firestarter.sourceforge.net/
 
Old 09-25-2003, 06:29 AM   #3
TAAN
Member
 
Registered: Sep 2003
Posts: 31

Rep: Reputation: 15
after writting the command down save it by :

service iptables save
 
Old 09-25-2003, 06:56 AM   #4
ivanatora
Member
 
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Rep: Reputation: 32
have you modprob-ed? have you wroten '1' in /proc/sys/net/ipv4/ip_forward?
 
Old 09-25-2003, 08:09 AM   #5
soldieron
LQ Newbie
 
Registered: Sep 2003
Posts: 2

Original Poster
Rep: Reputation: 0
my original question

states that I use sysctl.conf to set ip_forward to 1 and the script loads all the modules.

I would rather get this one nutted out if possible than move onto another application with the question unanswered.

But thanks for the replies anyhow.
 
  


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
iptables nat kernelvn Linux - Networking 5 05-03-2005 12:39 PM
Start DHCPd and configure iptables on boot (Debian Sarge) Qis Linux - Networking 6 03-02-2005 06:34 AM
IPTABLES : build NAT using IPTABLES joseph Linux - Networking 4 04-23-2004 06:08 AM
iptables and NAT arrruken Linux - Networking 8 10-03-2003 05:17 AM
IPtables +NAT daromer Linux - Networking 1 01-07-2002 12:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:22 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