Skip to contentSkip to conversation

Required iptables restart each boot?

DISCUSSION David Wynter 3 participants 3 messages Nov 14, 2002 – Nov 21, 2002

lore
Share & tools
lore
#0 lore raw

Hi,

I have an iptables script that works just fine. But when I have to reboot my Linux box it runs the iptables script (it has chkconfig as 2345 08 92). But none of my PCs on the LAN can see the Internet until I do "services iptables restart" then they can. But my Linux box can see the Internet prior to this iptables restart? Any explanation as to why this is so?

I have another problem too. I am not sure it is related to iptables. I have iptables on my linux box attached to my LAN. The LAN has 2 PCs a Win98 notebook and a W2K Server PC. The former can ping the gateway IP address, but the latter cannot. The former is 10.0.0.5 and the latter is 10.0.0.6 both within the range of the lansubnet declared in the iptables script (10.0.0.0/8). The W2K Server can FTP to the Linux box only via the internet not directly to the gateway IP (10.0.0.1). I have made sure that packet filtering on the W2K box id OFF. Any ideas on why the W2K PC cannot access any service on ports I have allowed on the Linux box with iptables running when the Win98 notebook can? By the way FORWARD'ed packets are fine for all PCs on the LAN.

Regards

David Wynter

roamware Ltd.
(+44) (0) 208 922 7539 B.
(+44) (0) 7879 605 706 M.
[email protected]

#1 lore raw
Quoted 7 lines · David Wynter

Hi,

I have an iptables script that works just fine. But when I have to reboot my Linux box it runs the iptables script (it has chkconfig as 2345 08 92). But none of my PCs on the LAN can see the Internet until I do "services iptables restart" then they can. But my Linux box can see the Internet prior to this iptables restart? Any explanation as to why this is so?

Your Linux firewall box... Does it do DHCP on one or more of the interfaces involved? iptables starting 08, at what point do the NIC's get finalized?

Try changing the iptables startup sequence until later, change it to a number higher than "network" (usually 10 on a redhat box).

Quoted 11 lines

I have another problem too. I am not sure it is related to iptables. I have iptables on my linux box attached to my LAN. The LAN has 2 PCs a Win98 notebook and a W2K Server PC. The former can ping the gateway IP address, but the latter cannot. The former is 10.0.0.5 and the latter is 10.0.0.6 both within the range of the lansubnet declared in the iptables script (10.0.0.0/8). The W2K Server can FTP to the Linux box only via the internet not directly to the gateway IP (10.0.0.1). I have made sure that packet filtering on the W2K box id OFF. Any ideas on why the W2K PC cannot access any service on ports I have allowed on the Linux box with iptables running when the Win98 notebook can? By the way FORWARD'ed packets are fine for all PCs on the LAN.

First off, use a more reasonable subnet internally, such as 192.168.137.0/24, (it might help later if you ever have to set up some type of tunelled routing to another network of reserved subnets).

Not sure what the problem is exactly, but you might check each of the PC's on the internal subnet for their ip configuration. Make sure that they all have the proper Subnet Mask, Network Address, and Broadcast address.

#2 lore raw
Quoted 6 lines · David Wynter
Quoted 4 lines

Hi,

I have an iptables script that works just fine. But when I have to reboot my Linux box it runs the iptables script (it has

Quoted 8 lines

chkconfig as

Quoted 1 line

2345 08 92). But none of my PCs on the LAN can see the

Internet until

Quoted 1 line

I do "services iptables restart" then they can. But my

Linux box can

Quoted 1 line

see the Internet prior to this iptables restart? Any

explanation as to

Quoted 1 line

why this is so?

This is because your Linux box has an INTERNET IP address (either DHCP or static) and thus does not require NAT, etc. just a default gateway and a DNS resolver and it (the Linux box) can access the Internet..

Quoted 40 lines

Your Linux firewall box... Does it do DHCP on one or more of the interfaces involved? iptables starting 08, at what point do the NIC's get finalized?

Try changing the iptables startup sequence until later, change it to a number higher than "network" (usually 10 on a redhat box).

Quoted 1 line

I have another problem too. I am not sure it is related to

iptables. I

Quoted 1 line

have iptables on my linux box attached to my LAN. The LAN

has 2 PCs a

Quoted 1 line

Win98 notebook and a W2K Server PC. The former can ping the

gateway IP

Quoted 1 line

address, but the latter cannot. The former is 10.0.0.5 and

the latter

Quoted 2 lines

is 10.0.0.6 both within the range of the lansubnet declared in the iptables script (10.0.0.0/8). The W2K Server can FTP to the

Linux box

Quoted 2 lines

only via the internet not directly to the gateway IP (10.0.0.1). I have made sure that packet filtering on the W2K box id OFF.

Any ideas

Quoted 1 line

on why the W2K PC cannot access any service on ports I have

allowed on

Quoted 2 lines

the Linux box with iptables running when the Win98 notebook can? By the way FORWARD'ed packets are fine for all PCs on the LAN.

First off, use a more reasonable subnet internally, such as 192.168.137.0/24, (it might help later if you ever have to set up some type of tunelled routing to another network of reserved subnets).

Not sure what the problem is exactly, but you might check each of the PC's on the internal subnet for their ip configuration. Make sure that they all have the proper Subnet Mask, Network Address, and Broadcast address.