Swimminginthought

A place for all things technical and my mind..

Menu
  • About Me / Hire Me
Menu

Routing some traffic over a VPN

Posted on June 11, 2012 by Percy Kwong

Sometimes, it helps to route just some traffic over a VPN.  It doesn’t make sense to add a lot of latency to your vpn if you don’t need it.  So here’s the magic.  This only works if you have your own OpenVPN server.  (See my post on using Amazon’s free tier to make it happen).

Simply comment out the redirect-gateway def1 statement in your openvpn server.conf file.

and on the client, just put in the following line:

route 12.12.12.0 255.255.255.0 vpn_gateway

Obviously this routes only the 12.12.12.0 subnet out the vpn connection and everything out your non vpn connection.  It’s really quite handy.  This is called Split-Tunneling by the way.

I know this is going to help many people.  If you could, stumble up my posts and if someone out there could submit my posts to reddit it would really be great.  Apparently, reddit assumes that if you’re posting something daily, they consider you a spammer.  Which is kind of ridiculous considering I’ve never spammed, but shared information.  I just know the information on this blog would be huge to more people.  So if you’re a redditor, I would really appreciate it if you would help to submit my posts to reddit for me.

Thanks in advance.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • Kubernetes install gotcha on CentOS-7.x
  • Infrastructure as Code using AWS Cloudformation
  • Does SSL matter? It does and it’s not just web encryption.
  • Apache can’t serve the .well-known directory
  • Cloudy with a chance of Meatballs
  • Resurrection of the Blog
  • Encryption type Matters with Deep Packet Inspection – solved
  • Completely off topic.. Just a personal note.
©2025 Swimminginthought | Built using WordPress and Responsive Blogily theme by Superb