Server Fault is a question and answer site for system and network administrators. 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

On (Arch) Linux, I configured a VPN, which I do not want to use for all the traffic, but for the software that binds to the associated tun/tap interface. So far, with the help of iproute2's policy routing, this is working well.

The VPN has a nameserver, which I want the software, that taps into the VPN, to use. Where do I put that nameserver's address, without ending up having the other software trying to use it? Which is what I get, putting it into /etc/resolv.conf.

share|improve this question
Provide some detail on what platform you are using. – Lucas Kauffman Apr 18 '12 at 6:09
Sorry, forgot to mention that. I'm using an up-to-date Arch Linux. – rausch Apr 18 '12 at 6:16
up vote 4 down vote accepted

There is no such thing as a process-specific nameserver setting with Linux. The resolv.conf defines the resolvers for your entire system, no matter who is asking.

If you just need a distinct couple of non-public domain names resolved for the VPN-using software, consider running an own name server and setting a specific forwarder server for those domains. Using dnsmasq with the -S /<address of internal name server>@tun0 parameter (specified several times if you have more than one domain) set seems like a sensible idea here. Use the newly-created local nameserver ( as the sole resolver in /etc/resolv.conf and you should be good.

share|improve this answer

Your Answer


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.