Skip to contentSkip to conversation

Problem with iptables -A FORWARD -j DROP

DISCUSSION Gabriel Güeto 2 participants 2 messages Feb 19, 2003 – Feb 20, 2003

lore
Share & tools
lore
#0 lore raw

Hello, I'm installing a bridge-firewall an all is OK, but whe I deny all the 'FORWARD' traffic this rule deny all the traffic included the 'ACCEPT' rules. Mi Kernel is 2.4.18 and i installed itables 1.2.5-3. My script is:

iptables -F FORWARD
iptables -F INPUT
iptables -F OUTPUT

iptables -A FORWARD -p icmp -s 89.0.0.0/24 -d 89.0.0.55/32 -j ACCEPT

iptables -A FORWARD -j DROP

If I quit the las line it's all OK, if I deny 'ping' it's OK, but if I put the last line all ping are deny.

Can somebody help me. I'm sorry for mu poor English.

Gabriel.

#1 lore raw
Quoted 13 lines · Gabriel Güeto

Hello, I'm installing a bridge-firewall an all is OK, but whe I deny all the 'FORWARD' traffic this rule deny all the traffic included the 'ACCEPT' rules. Mi Kernel is 2.4.18 and i installed itables 1.2.5-3. My script is:

iptables -F FORWARD
iptables -F INPUT
iptables -F OUTPUT

iptables -A FORWARD -p icmp -s 89.0.0.0/24 -d 89.0.0.55/32 -j ACCEPT

iptables -A FORWARD -j DROP

Quoted 5 lines

If I quit the las line it's all OK, if I deny 'ping' it's OK, but if I put the last line all ping are deny.

Can somebody help me. I'm sorry for mu poor English.

Gabriel.

Hello!

You have to allow both communication directions!

Try the following:
iptables -A FORWARD -p icmp -s 89.0.0.0/24 -d 89.0.0.55/32 -j ACCEPT iptables -A FORWARD -p icmp -s 89.0.0.55/32 -d 89.0.0.0/24 -j ACCEPT

iptables -A FORWARD -j DROP

and everything will work fine

Bernd