Sunday, October 18, 2015

Routing subnet below net


iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

iptables -I FORWARD -i br0 -o 10.1.1.60 -s 10.1.1.0/24 -d 10.1.2.0/24 -j ACCEPT
ip route add 10.1.2.0/24 via 10.1.1.60

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o wlan0 -s 10.1.1.0/24 -d 10.1.2.0/24 -j ACCEPT

No comments:

Post a Comment