OpenVPN on OpenVZ on a VPS – Internet routing

I wanted to route my internet through the VPS using my Windows 7 laptop. It took me more than a day to get this set up. So putting it down here as a reference for the future. My guess is that this is probably something that only a first-time user of VPS will encounter. The other times, you would have been forced to learn it and you don’t have to go through the difficulty again. Once you know how to do it, it will probably take you 20mins end to end.

But anyways, long story short, this is what you need to know:

  • OpenVPN configuration – I am not kidding, definitely go through this page. It will take around 20-30 mins, but that’s the best way to do it. Otherwise you’ll keep wondering whether the issue lies with OpenVPN or with something else
  • IPTables configuration – A good tutorial that will really get you started on the hows and whats. Read it carefully, you’ll need it.

Here’s how I did it. I’m setting up VPN to route my Internet traffic through the VPS server. We’ll break it down step by step.

Continue reading

Advertisements