[Openswan Users] Routing problems

berton at lafarmaceutica.it berton at lafarmaceutica.it
Sat Feb 10 07:52:10 EST 2007


Hi everybody
I've a problem tryng to configure a Linux Fedora Core 6 box
to use it as a VPN gateway and as firewall for my lan

I've setup correctly 2 different VPN and now I'm trying to
setup IPTABLES to make all packets coming from LAN to be NAT
from this box except than the packet destinated to the 2 VPN

the iptable command I'm using is this:

iptables -t nat -A POSTROUTING -s ${LAN_IP} -d !
10.10.10.0/24 -j SNAT --to $MY_PUBBLIC_IP_ADDRESS

where 10.10.10.0/24 is the range of the LAN on the other
side of the first VPN

If I insert only this line all works... The Fedora Box
correctly NAT all the packets except the ones destinated to
the 10.10.10.0/24 LAN that uses the VPN

Now when I try to insert a new line for the second VPN

iptables -t nat -A POSTROUTING -s ${LAN_IP} -d !
10.10.20.0/24 -j SNAT --to $MY_PUBBLIC_IP_ADDRESS

nothing goes.. Everythig is NAT  because the 2 instructions
are one over the other

Can someone suggest me how to solve this problem considering
that the VPN I've NOT to NAT are 4?

Thank you everybody for your reply

Valentino


More information about the Users mailing list