Skip to contentSkip to conversation

SNAT with ipchains in VPN configuration

DISCUSSION Frederic gilloteau 1 participant 1 message Mar 21, 2003

lore
Share & tools
lore
#0 lore raw

Hello,

Could someone help me in this case ?

I have two private networks : 172.20. and 192.168.
I have linked them with a VPN.
I have read that it is possible to write a rule with iptables which does SNAT on VPN gateway to let it enter itself on the tunnel... (in a VPN config : gateway - gateway)

Example : iptables -t nat -D POSTROUTING -s 20.0.0.1 -o ipsec0 -d "client192.168" -j SNAT --to 172.20.xxx.xxx

... with 20.0.0.1 the external interface of 172.20 network and 172.20.xxx.xxx a free ip adress in the 172.20 network.

MY QUESTION IS : Is it possible to write a similar rule with IPCHAINS ???

Thanks in advance.