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 have a PPTP VPN connection set up on an ubuntu 8.10 box as ppp0 and I was wonder how to route select connections to go through the VPN.

For example I want google.com to go through the default interface, but bing.com to route through ppp0.

Could I do this with a routing rule? Or is something like this more cut out for iptables?

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

You can do this using a routing rule but you will have to add all ip-addresses of bing to the route through ppp0. In the real world this is much harder. Google for example has a lot of ips and is even getting more. So you will have to update your rule to reflect the addresses currently used.

share|improve this answer
    
The bing and google are just examples, the hosts i will be using only have 1 ip. What would adding a route rule like this look like? –  AdamB Aug 19 '09 at 2:23
    
this can be done by doing "route add -host <ip> gw <pp0 ip>" –  AdamB Aug 19 '09 at 3:12
    
You could also use "ip route add $IP dev $DEVICE" –  Wienczny Aug 19 '09 at 23:53
add comment

Firefox -> Foxyproxy (filtering on regex) -> HTTP proxy -> VPN interface.

This sounds like you need to access webpages that are blocked on your subnet. If you have a machine outside this subnet with an ssh server, the easiest way is just to use the -D [port] option which gives you SOCKS. (putty can do this as well, if you're on windows.) Then you just make foxyproxy redirect to the given port as socks5.

I realise this is old, but probably shows up in searches and I used to work in a place with annoying restrictions.

share|improve this answer
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.