I have a VPS in the cloud I want to use to act as a media download server.

I have a VPN to avoid getting anyone in trouble (me or host). I have set up the VPN tunnel, and it created an interface called ppp0

How do I route all the traffic from a specific process (newsgroup reader) through that interface? I want to leave the rest of the traffic as-is to be able to contact the server via SSH and not worrying about the VPN's changing IP.

Also, if you have an easier way of doing this, feel free to answer!

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

Instead of routing traffic for the process to the vpn, route the specific IP addresses related to the newsreading service.

Usually, there are only a handful of IP addresses involved, or just one. So you can add a route for the news server IP that forces it over the ppp interface:

route add -host <news server ip> dev ppp0

You can repeat this command for multiple addresses, or if it makes sense to use a range of addresses, for example if there were a series of news servers in the 123.123.123.0 255.255.255.0 network, you can route a subnet:

route add -net 123.123.123.0/24 dev ppp0

How you set this to be persistent in Arch is dependent on which package you use to manage dialing up the vpn, but whatever you use to establish the ppp session it will have a method for adding routes once the vpn is up.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.