Skip to contentSkip to conversation

Filter in POSTROUTING

DISCUSSION Claus Regelmann 1 participant 1 message Sep 11, 2003

lore
Share & tools
lore
#0 lore raw

Hello,

There is a figure Oskar Andreassoons IPTABLES TUTORIAL (V1.1.19, chap. 3.1, pg.19)
where both, the forwarded and the local output, join the postrouting chain.

Why shoudnt it be possible to filter all outgoing e.g. smb traffic from a local
network at that place with a command like

Quoted 2 lines

iptables -t nat -A POSTROUTING -o ppp0 -p tcp --dport 137:139 -j DROP iptables -t nat -A POSTROUTING -o ppp0 -p udp --dport 137:139 -j DROP


The same question applies to the PREROUTING chain for input

Quoted 2 lines

iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 137:139 -j DROP iptables -t nat -A PREROUTING -i ppp0 -p udp --dport 137:139 -j DROP

Thanks
Claus