Skip to contentSkip to conversation

iptables with nat problems

DISCUSSION gb 2 participants 2 messages Sep 25, 2003

lore
Share & tools
lore

gb

author
#0 lore raw

Hi,

I am running RH8 firewalls with iptables 1.2.6a. The firewalls work just fine, but on reboot the nat part doesn't start up. It will not let internal traffic out or external traffic in until I do a restart.

I set up ip_forward to 1 in sysctl.conf, and the script I am using loads all necessary modules right at the start.

boot.log shows output from the script as starting without error , and there are no errors in the messages or kernel logs either.

An iptables -L shows the tables as loaded, and iptables -t nat -L shows that the nat tables are loaded.

I use DHCP to the PC's on the internal lan, could this be the problem? It starts after iptables during bootup and I wondered if this could be stopping iptables getting the nat stuff sorted.

Thanks, Gillian

#1 lore raw
Quoted 3 lines · gb

I am running RH8 firewalls with iptables 1.2.6a. The firewalls work just fine, but on reboot the nat part doesn't start up. It will not let internal traffic out or external traffic in until I do a restart.

Is it possible that some source or destination addresses are alphabetic, and not in /etc/hosts? Or that network names are resolved through NIS (YP) and are not in /etc/networks? (I didn't notice in the man page that iptables actually honors networks, but if it did...) These services start after the iptables rules are installed.

Fixes: make sure names are in /etc/hosts and /etc/nsswitch.conf is configured to fall back to files if DNS or YP is unavailable. Of course, Real Sysadmins hard-code all IP addresses and networks numerically.

James F. Carter Voice 310 825 2897 FAX 310 206 6673
UCLA-Mathnet; 6115 MSA; 405 Hilgard Ave.; Los Angeles, CA, USA 90095-1555
Email: [email protected] http://www.math.ucla.edu/~jimc (q.v. for PGP key)