Skip to contentSkip to conversation

why packet get through the netfilter even if i drop all in FORWARD

DISCUSSION Calvin 2 participants 2 messages Jun 8, 2003

lore
Share & tools
lore

Calvin

author
#0 lore raw

Dear all,

I got a funny problem here and got no idea why it happen. my simple network is
A
|(eth0)
GWa

||(eth1)
||
||(eth1)

GWb
|(eth0)

I running netfilter with freeswan, I add a rule in FORWARD chain to drop all packets forward from internal iface(eth0) to public iface(eth1).
iptables - A FORWARD -i eth0 -i eth1 -j DROP

it works fine when , when i try to ping GWb's eth0 from machine A, it get blocked.

however once I start up the IPSEC, I do the ping again and A can ping GWb's eth0. The rule in FORWARD chain is still there.

Why does this happen? Is that anyway I can fix this?

Thanks very much
Calvin

#1 lore raw

On Sun, Jun 08, 2003 at 04:07:11PM +1000, Calvin spoke thusly:

Quoted 3 lines

I running netfilter with freeswan, I add a rule in FORWARD chain to drop all packets forward from internal iface(eth0) to public iface(eth1).
iptables - A FORWARD -i eth0 -i eth1 -j DROP

Should that be 'iptables -A OUTPUT -i eth0 -o eth1 -j DROP' instead ?

Quoted 2 lines

however once I start up the IPSEC, I do the ping again and A can ping GWb's eth0. The rule in FORWARD chain is still there.

iptables -A OUTPUT -p all -o eth1 -d GWb-IP-address -j DROP

Quoted 1 line

Why does this happen? Is that anyway I can fix this?

Explain your IPsec setup in detail, and then we can give you a proper answer without guesswork.