Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

On my phone, I'm pointing to my PC address for DNS server (dnsmasq), and it is working for normal DNS queries but not for local. I can see from a ping app that local domains are resolved to, and that's logical, but not what I want in this case. If I set a local domain's address to my PC, it works on both my PC and phone (etc/hosts: from to I would like to work around this in different manner since I would be forced to edit the hosts file every time I change internet connections or the dhcp address gets released. As far as I understand, it has something to do with --localize-queries and /etc/hosts having multiple addresses, but I haven't found much information about this so I'm here, sorry if it's confusing and thanks in advance for any help.

Short version:

PC -> phone DNS server (manually entered) ->

Then I hit /etc/hosts domain from PC, it resolves to, then I hit /etc/hosts domain from phone, it resolves to

share|improve this question
i have tried adding rules in /etc/hosts/ like this and it seems that dnsmasq resolves it correctly without any special settings – Edmund24 Nov 17 '13 at 11:56
while trying replicate this setup on different i noticed that address=/ in /etc/dnsmasq.conf is required to work the way i described above – Edmund24 Nov 19 '13 at 11:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.