Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm setting up a vpn server on a remote development server. The development server has websites that I'm developing and the vpn is in place so that I can tell apache to only accept local connections to view the development sites (instead of opening them to internet and using access control).

However, not having set up a vpn server before, I have a question regarding the client's connection. Let's say I'm connected to the vpn. How can I make it so that only traffic going to certain addresses are sent through the vpn, and all other requests go through my native connection?

It's a little hard to explain so feel free to ask me for more info.

share|improve this question
    
I believe you're talking about split-tunneling. Depending on the application/VPN in question, this could be an option in the server configuration. –  belacqua Feb 7 '13 at 23:49
    
@belacqua: I'm using OpenVPN and followed the following tutorial to the letter: help.ubuntu.com/12.10/serverguide/openvpn.html –  MaxMackie Feb 7 '13 at 23:49
add comment

1 Answer

up vote 2 down vote accepted

I believe you're talking about split-tunneling. Depending on the application/VPN in question, this could be an option in the server configuration.

With OpenVPN, I'm not sure if this is the default. If you aren't sure what routing is being pushed to the client, it would be easiest just to run a route command on the client to see where it think the default is. You'll really only want the vpn gateway set as a route for the development server(s). Everything else should default to whatever the normal gateway for the client is.

share|improve this answer
    
Thanks for putting me on the right track with the keywork split-tunneling. However, my client is a mac and my networking skills are somewhat lacking -- so your answer is a little obscure to me. –  MaxMackie Feb 8 '13 at 0:04
    
@MaxMackie You might try to open a terminal on the Mac and try netstat -nr instead. –  belacqua Feb 8 '13 at 0:11
    
Right, that worked and I got my routing table. I also found this guide dltj.org/article/openvpn-split-routing. It shows how he set up split-tunnelling. –  MaxMackie Feb 8 '13 at 0:25
add comment

Your Answer

 
discard

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.