How to use docker selfhosted DNS server on phone over Tailscale? - eviltoast

Hello guys,

I’m trying to get Domain Names to work inside my Tailnet. My setup is a Tailscale Docker container running inside a docker network. The DNS server (dnsmasq) is also running inside this docker network. Tailscale uses --advertise-routes=172.18.0.0/16 to expose the docker network and so the DNS server is theoreticly reachable over the Tailnet with the IP 172.18.0.x, but I just cant figure out, how to tell my phone to use this as its DNS server.

I would also like to still have another ‘real’ DNS server configured for my phone, so I dont have to use my selfhosted DNS server for every DNS lookup. From what I could gather already, Private DNS on android is an option, that might work, but when I tried it, I couldnt enter my DNS servers IP address and then, from how I understand it, this is my only DNS server configured for the phone.

I hope I could describe my problem as good as possible and someone is able to help me out. :)

  • MRP_yt@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Inside tailscale admin panel, under DNS settings you can specify which DNS server to use. I think by default that option is off.

    I got my ON and pointing to 192.168.178.136 which is pihole. This options forces every device in tailsnet hit Pihole for DNS .