Skip to contentSkip to conversation

general policy question

DISCUSSION patrick conlin 2 participants 2 messages Jun 7, 2002

lore
Share & tools
lore
#0 lore raw

does one generally set the -P on their mangle table chains to DROP, even if you're not using them for anything?

usual procedure says set -P on all chains to DROP and allow what's necessary, but if you're not using your mangle table chains for anything and you set -P to DROP (on the iptables -t mangle PREROUTING chain, for example) all packets get dropped.

you guessed it, I just did this and got booted from the machine. Now I have to wait until I can go home and reboot my firewall before I can play with it any more.

Just wondering how everyone else handles this.

-=p=-

#1 lore raw
Quoted 2 lines · patrick conlin

does one generally set the -P on their mangle table chains to DROP, even if you're not using them for anything?

No. Mangle tables are for mangling. Nat tables are for address
translating, and Filter tables are for filtering. DROP is a filter
operation, therefore it belongs only in the filter tables.

Quoted 2 lines

usual procedure says set -P on all chains to DROP and allow what's necessary,

Yes, but that's just being being sloppy in their description and not saying "all chains in the filter table"...

Quoted 3 lines

but if you're not using your mangle table chains for anything and you set -P to DROP (on the iptables -t mangle PREROUTING chain, for example) all packets get dropped.

Yes :-)

The reason ? All packets have to pass through the mangle, nat and filter
tables in order to traverse the entire system. If any one of those tables
DROPsthe packet, that's it - it's DROPped !

Quoted 1 line

Just wondering how everyone else handles this.

Don't try to filter using the mangle table :-)

Antony.