Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an OpenSwan IPSec + L2TP VPN on Linux setup working from off of my server so I can connect to it from my laptop (roadwarrior setup). I am able to connect to the VPN remotely just fine, however the internet connection is not shared. I'm assuming there is some sort of masquerading I am supposed to be doing, but I have no idea how to go about doing that (iptables?).

Any help getting this working so I can essentially use my VPN connection as a proxy would be great.


share|improve this question
up vote 2 down vote accepted

Alright, I found my answer finally :)

iptables -t nat -A POSTROUTING -s -j SNAT --to

Where is the public interface I want to nat through, and the is the private VPN network IP range I have set up.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.