Skip to contentSkip to conversation

iptables breakage on fc8 with recent kernels

DISCUSSION Andrew Morton 2 participants 3 messages Mar 4, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

I've noticed that my fc8 initscripts have been failing for a while with:

ip6tables-restore: line 20 failed
iptables-restore: line 20 failed

It could be that this was caused by some config change which broke `make oldconfig', but from a quick look nothing stands out.

Here's my /etc/sysconfig/iptables:

# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT -A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited -A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

Line 20 is the "COMMIT", which is rather unhelpful of iptables-restore.

<debugs a bit>

OK, I commented all the lines and then did a linear-search-by-uncommenting. It fails here:

# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT -A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT #-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT #-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited #-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

So it is

   -A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

which is now failing.

config: http://userweb.kernel.org/~akpm/config-t61p.txt

Thanks.

maintainer
#1 lore raw

From: Andrew Morton <[email protected]>
Date: Mon, 3 Mar 2008 21:47:25 -0800

Quoted 30 lines

I've noticed that my fc8 initscripts have been failing for a while with:

ip6tables-restore: line 20 failed
iptables-restore: line 20 failed

It could be that this was caused by some config change which broke `make oldconfig', but from a quick look nothing stands out.

Here's my /etc/sysconfig/iptables:

# Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]

(quoted diff) +0 -12
-A INPUT -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited

COMMIT

...

Quoted 7 lines

So it is

   -A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

which is now failing.

config: http://userweb.kernel.org/~akpm/config-t61p.txt

Please set CONFIG_NF_CONNTRACK.

Sorry about that, I think we did something stupid a few releases ago.

#2 lore raw
Quoted 11 lines · On Mon, 03 Mar 2008 22:55:49 -0800 (PST) David Miller <[email protected]>…
Quoted 1 line

COMMIT

...

Quoted 7 lines

So it is

   -A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

which is now failing.

config: http://userweb.kernel.org/~akpm/config-t61p.txt

Please set CONFIG_NF_CONNTRACK.

ah, right, yup, thanks, I missed that. I seem to have lost a great shower of netfilter config options somewhere along the line. I thought I'd checked that :(