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

iptables, 3 ethernet cards



I have such firewall: (fragment)

#eth0 - local 10.10.1.1
#eth1 - local 192.168.1.1
#eth2 - world 213...

EXTERNAL=`ifconfig eth2 | grep "addr:" | cut -d: -f2 | cut -d" " -f1`

iptables -P FORWARD DROP
iptables -A FORWARD -i eth2 -j ACCEPT

iptables -A FORWARD -i eth0 -s 10.10.1.0/24 -j ACCEPT
iptables -A FORWARD -i eth1 -s 192.168.1.0/24 -j ACCEPT

iptables -t nat -A POSTROUTING -o eth2 -j SNAT -s 192.168.1.0/24 --to ${EXTERNAL}
iptables -t nat -A POSTROUTING -o eth2 -j SNAT -s 10.10.1.0/24 --to ${EXTERNAL}

Why if I connect to eth1 with for example IP 10.10.1.10  I have open world ?
The same if I connect to eth0 with for exsmple IP 192.168.1.10  I have open world too.
I want block it !
Please help !
 
/* sorry for my english :-) */



Reply to: