Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've set up an OpenVPN server on a VPS (ubuntu 11.04) and configured clients (mix of ubuntu 11.10 and 12.04) to use it. After starting the VPN connection on the client, all internet traffic gets routed trough the VPS.

I would like to route only some of the traffic trough this setup. I have a list of domain names (which I could translate into IP addresses) and I want only those addresses to go trough the VPN, while all other should go out the normal way. I would very much prefer to maintaint all configs on the server and not have to deal with updating every single client.

I'd appreciate some help as to how to make this happen.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Do not route all traffic to the VPN (so their default gw still pointing to their normal connection), and then push routes to the clients like this:

push "route 10.0.0.0 255.255.0.0"
push "route x.x.x.x 255.255.255.255"

the first case being a /16 network and the second a /32 network (effectively the IP only). It's annoying to make it for a lot of IPs but it's exactly what you want.

share|improve this answer
    
that did the job, thanks. –  sostacked Jul 20 '12 at 14:26

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.