# Set unique DNS settings for one specific Linux process

I'm not sure if it can be done, but here's what I'm trying to do. I am on a mac but trying to solve first for Linux, which is probably more general and might be easier.

• I want my system to be configured to use 8.8.8.8 as the general DNS for every usage.

• I want one process (Plex server, namely) to use another DNS server - namely, a DNS that allows me to pass region limitations on paid content subscriptions (hey at least I'm telling it straight). Let's call this DNS server 3.3.3.3.

The reason for this is that I don't want to compromise the stability of my entire system in case the 3.3.3.3 DNS has issues. Yeah, I trust Google's DNS more.

Is it possible to do this kind of trickery? Or, are there other smart ways to make this work?

I have several other machines around and am willing to do routing trickery etc. as well, if anyone can think of a creative solution :)

Thanks a bunch!

Yonatan

-
If the Plex box's network config is static, just point its resolver at 3.3.3.3 and use 8.8.8.8 for the rest. It's much more difficult if you're using DHCP for everything. You'd have to set up address pools (such as described at linux.die.net/man/5/dhcpd.conf). If all you have is the DHCPd server on your router, this probably can't be done and the only alternative is to switch to a static network configuration on the Plex box. –  joat Jul 13 '13 at 13:44
@joat thanks for the comment, in fact the "plex server" is running on my everyday laptop. since AFAIK plex channels are generated on the plex server, it seems I need to separate-by-process my laptop DNS usage (or other similar creative solution). And, static network is totally acceptable if helps. –  Yonatan Jul 13 '13 at 14:39
Two DNS servers for processes in the same box? "separate by process" isn't typical. You'd need to hardcode the function into the Plex software. About the only work-around that I can think of is to run the Plex server in VM. –  joat Jul 16 '13 at 8:03
Sounds reasonable. One other direction I might pursue is using a proxy of sorts (HTTP or better yet SOCKS). I admit that the question now makes me more curious in principle than in practice. –  Yonatan Jul 19 '13 at 12:11