[Openswan Users] ipsec & nat

Osvaldo Alvarez Pozo nebano at gmail.com
Sun Jul 29 16:25:22 EDT 2007


hy I have a tunnel up but nothing goes by the tunnel.
i have a local network that i nat
my internal network is 192.168.0.0/24 but there is only 3 machines

i have to show it as  192.168.4.240/29

so i did

iptables -t nat -A POSTROUTING -s 192.168.0.61 -o eth1 -p tcp -j SNAT
--to-source 192.168.4.241
iptables -t nat -A PREROUTING -d 192.168.4.241 -i eth1 -p tcp  -j DNAT
--to 192.168.0.61

iptables -t nat -A POSTROUTING -s 192.168.0.63 -o eth1 -p tcp -j SNAT
--to-source 192.168.4.242
iptables -t nat -A PREROUTING -d 192.168.4.242 -i eth1 -p tcp  -j DNAT
--to 192.168.0.63

iptables -t nat -A POSTROUTING -s 192.168.0.61 -o eth1 -p udp -j SNAT
--to-source 192.168.4.241
iptables -t nat -A PREROUTING -d 192.168.4.241 -i eth1 -p udp  -j DNAT
--to 192.168.0.61

iptables -t nat -A POSTROUTING -s 192.168.0.63 -o eth1 -p udp -j SNAT
--to-source 192.168.4.242
iptables -t nat -A PREROUTING -d 192.168.4.242 -i eth1 -p udp  -j DNAT
--to 192.168.0.63

but nothing goes by the tunnel.
 Any idea??


More information about the Users mailing list