Can I change DNS resolution settings on a per-group or per-user basis on Linux 3.x?
I would like different groups to use different DNS servers and (if possible) different static entries (like those in /etc/hosts). Is there a way to configure this?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Not trivially. Your DNS configuration underpins a lot of things with your system, and so context switching name resolution gets messy fast.
Imagine if you will - I send an email. I 'send' the mail to a particular remote server (resolved against my version of DNS) and it gets there.
But then I do the same, and pipe it to
localhost figures out where to relay it based on it's own mail exchange records.
The best you could do is virtualise and set up 'group' servers with specific DNS configs.