Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|improve this question
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:

Using iproute2:

ip route add <news server ip> dev ppp0 scope link

Using net-tools:

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 network, you can route a subnet:

Using iproute2

ip route add dev ppp0 scope link

Using net-tools:

route add -net 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.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .