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 127.0.0.1, 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 127.0.0.1 test.dev to 192.168.1.67 test.dev). 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 -> 192.168.1.67 phone DNS server (manually entered) -> 192.168.1.67
Then I hit /etc/hosts domain from PC, it resolves to 127.0.0.1, then I hit /etc/hosts domain from phone, it resolves to 192.168.1.67.