routing vpn + cisco + linux controller using iptables

Cisco configure by encik Pisang Raja Udang @ pru :D

#flush all the gw rules in filter and nat tables

iptables –flush

iptables –table nat –flush

iptables –delete-chain

#delete all chains that are not in default fillter and nat table

iptables –table nat –delete-chain

#setup ip forward and masq in (gw)

#forward ke suk
iptables –table nat –append POSTROUTING –out-interface eth2 -j MASQUERADE

iptables –append FORWARD –in-interface eth1 -j ACCEPT

#forward ke cisco
iptables –table nat –append POSTROUTING –out-interface eth0 -j MASQUERADE

iptables –append FORWARD –in-interface eth1 -j ACCEPT

echo 1 > /proc/sys/net/ipv4/ip_forward

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

iptables -A INPUT -i eth2 -m state –state ESTABLISHED,RELATED -j ACCEPT

#cisco
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

iptables -A INPUT -i eth0 -m state –state ESTABLISHED,RELATED -j ACCEPT

One Response to “routing vpn + cisco + linux controller using iptables”

  1. Learning On Demand | 101 links of tutorials, tips, tricks and scripts for iptables Says:

    [...] routing vpn + cisco + linux controller using iptables [...]

Leave a Reply