Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Who does Wireguard ask for DNS lookups?

    Scheduled Pinned Locked Moved WireGuard
    6 Posts 3 Posters 692 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pastic
      last edited by pastic

      I have a strange Wireguard situation at home. My pfsense resolves nextcloud.nibelheim to 10.0.0.200 (static mapping registered in DNS resolver as well as host override). Locally I can access my nextcloud using its name (https://nextcloud.nibelheim). It has a selfsigned certificate.

      But when I tunnel in with Wireguard app using my Android phone, even though I can access all my other servers as well as the pfsense GUI where I can perform the same lookup successfully, the browser says "DNS_PROBE_FINISHED_NXDOMAIN" when I try https://nextcloud.nibelheim .

      When I try, inside the tunnel, with https://10.0.0.200 I first get "This connection is not secure" but I have the option to "Continue to site". When I click that button I get "ERR_SSL_PROTOCOL_ERROR". I don't know but I guess this is due to the certificate being tied to "nextcloud.nibelheim" and not the IP.

      But why cannot the browser?/wireguard?/something? resolve nextcloud.nibelheim to 10.0.0.200 when I am inside the tunnel? Pfsense can when I am outside.

      This is eating at me, I am thinking about this every night until I fall asleep. :-)

      P 1 Reply Last reply Reply Quote 0
      • P
        paoloposo @pastic
        last edited by

        @pastic Can you try this with a desktop browser and post any errors from the browser console please. Also what is the output of nslookup nextcloud.nibelheim ?

        P 1 Reply Last reply Reply Quote 0
        • P
          pastic @paoloposo
          last edited by

          @paoloposo
          Hi, excuse me for taking a bit of time to get back to you.

          nslookup mentions an address in a range I do not use locally at all, I use 10.0.0.0/24. I do not know where it comes from.

          peter@lenovo-debian12:~$ nslookup nextcloud.nibelheim
          Server:		192.168.43.76
          Address:	192.168.43.76#53
          
          ** server can't find nextcloud.nibelheim: NXDOMAIN
          
          

          As for the browser output, I enclose a screen dump of all info I was able to get:

          Screenshot from 2023-10-18 17-18-47.png

          1 Reply Last reply Reply Quote 0
          • P
            pastic
            last edited by

            Server: 192.168.43.76

            but the DNS lookup at the above address when inside the tunnel work for other addresses (tethering my laoptop to my phone, carrier-only, phone wifi disabled);

            peter@lenovo-debian12:~$ nslookup nextcloud.nibelheim
            Server:		192.168.43.76
            Address:	192.168.43.76#53
            
            ** server can't find nextcloud.nibelheim: NXDOMAIN
            
            peter@lenovo-debian12:~$ nslookup dn.se
            Server:		192.168.43.76
            Address:	192.168.43.76#53
            
            Non-authoritative answer:
            Name:	dn.se
            Address: 3.73.167.51
            Name:	dn.se
            Address: 3.65.23.168
            Name:	dn.se
            Address: 3.123.196.169
            
            
            Bob.DigB 1 Reply Last reply Reply Quote 0
            • Bob.DigB
              Bob.Dig LAYER 8 @pastic
              last edited by Bob.Dig

              @pastic What DNS-server do you have in your wg-config for that phone? You should put in the IP-address of the wg-interface as the DNS-server and also have rules allowing the access.

              P 1 Reply Last reply Reply Quote 1
              • P
                pastic @Bob.Dig
                last edited by

                @Bob-Dig & @paoloposo
                I have entertained the idea that DNS might need to be configured specifically for Wireguard (hence my post here), but somehow my googling always went off in different directions. And this has been going on for two weeks. I tried so many solutions both software and hardware, but somehow it completely escaped me that there even is a DNS field in the Wireguard app for Android.

                I feel embarrassed for having bothered the community with such a simple matter, but am grateful that both of you stepped in to help out.

                Thanks!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.