Conditional routing over PPTP help required

Associate
Joined
1 Dec 2002
Posts
1,083
Location
Swindon
Im trying to configure my PPTP client (ubuntu) to only send traffic to IP x.x.x.x over PPTP, the rest directly out from my internet connection - but it is either all or nothing.. Any idea how I can configure PPTP to work in that manner?
 
Don't add your PPTP VPN as the default gateway, then add a static route to send traffic for your specific IP over that interface.
 
@Caged, OK I think I know what you mean.. By PPTP as default gateway do you mean dont add this command:

sudo route add -net "0.0.0.0/0" dev "ppp0"

? This as far as I can see would send all traffic to PPTP.. I have tried adding a specific IP to the route add command, but it returns an error, so I am obviously doing something wrong:

sudo route add -net "x.x.x.x" dev "ppp0"
SIOCADDRT: Invalid argument

It would be useful if somebody could tell me the command to run to pass all traffic from x.x.x.x to "ppp0". :)

PS: I followed this tutorial for installing PPTP, which works fine, but doesnt go into details for adding conditional routing.
 
Yes -host updates the routing table, but it still doesnt appear to work.. I will try to route something easier to debug first of all, then see..

Thank for your help @Caged. :)
 
I think you might still need to give it a gateway, in your case this will be whatever your gateway address was changed to when you established the VPN and it wasn't a split-tunnel configuration.
 
Back
Top Bottom