[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

iptables filtering ports under nat



hello everyone i have a question
i have this in my iptables

EXT_IF=eth1

#############
/sbin/iptables -t nat -A POSTROUTING -s 12.16.2.5 -o $EXT_IF -j MASQUERADE


now
how can i DROP ALL TRAFIC FROM IP 12.16.2.5 ??? exept port 80 to one
external ip ?

example

i neeed to drop all traffic
and  i need to allow the traffic to one address only

how can i do that Ç????


/sbin/iptables -t nat -A POSTROUTING -s 12.16.2.5 -d EXTERNALONEHOSTONLY
-o $EXT_IF -j  ACCEPT

/sbin/iptables -t nat -A POSTROUTING -s 12.16.2.5 -d 0.0.0.0/0 -o $EXT_IF
-j  DROP ???


OR SHOULD I NEED TO USE TO FORWARD ??

thanks for reading me .









Reply to: