[vpn-help] Give access to mor than one machine?

Marco listaddr at gmail.com
Sun Sep 4 06:52:29 CDT 2011


Hello, I'm using the VPN client 2.1.7 under Linux to connect to a
corporate VPN, and it works perfectly. Since I'm running a couple of
virtual machines on my box, I'd like to be able to reach the remote
network from them as well.

So on the host, I enabled IP forwarding then added this iptables rule
(192.168.1.0/24 is the remote LAN):

iptables -t nat -A POSTROUTING -d 192.168.1.0/24 -j MASQUERADE

(including other variations with "-o tap0", "-s 192.168.130.0/24"
(which is my VM network) ) but nothing worked.

What I see is that packet correctly reach the remote machines (with
the source IP correctly translated to the local box's VPN IP), and
their replies reach my box, but then it seems like they're not
forwarded back to the originating VM.

I'm aware that IPsec is peculiar in how traffic flows, but is it the
case that this would break iptables' NAT too?

Thanks.



More information about the vpn-help mailing list