So I'm currently away from home and now I'm using the internet from another router.

My problem is that I can't access my services because the default DNS from this router is 192.168.1.1 and the DNS that I use to access my services through wireguard is also 192.168.1.1

The wireguard service comes from my own router using Opnsense and I have setup unbound+Adguard DNS as 192.168.1.1 by default so I don't know how can I solve this problem

I tried setting my computer to listen to 1.1.1.1 when connected to this wifi but when I enable my wireguard it still doesn't connect to my services I also tried enabling my Adguard to listen to All interfaces so it would enable the IP 10.50.50.0 as a DNS but I don't know much about Opnsense so it also didn't work when I changed the wireguard config file to listen to 10.50.50.0

My wireguard tunnel IP is set to 10.50.50.&& when connected to my router and the default IP when connected directly at home is the 192.168.1.&&

My phone can connect to the wireguard normally even when connected to this wifi

Does anyone had also this same problem as me could help me a little? Thank you. Sorry for the bad english

[Conclusion] i went looking into the wireguard subreddit for a smillar problem as mine and found that if the outside router uses 192.168.1.1 as the default gateway & dns when trying to connect to my tunnel ip the browser will search on the main router instead of my wireguard tunnel. I'm going to need to change my ip addresses to another ip instead of the default 192.168 Post

    • coffelov@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      I didn't know that, in Adguard > Setup guide > configure your devices. Since I selected to listen to All interfaces there are lots of IP addresses so I just copied the IP from my wireguard interface like this. Screenshot_20230929-155326_1

      • Still@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        5353 is not the port that most devices use for dns,.that would be port 53, so if it's not listening there the no connection would be made

        • coffelov@lemmy.mlOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          Yes it's because I use unbound and Adguard on opnsense, Adguard uses 5353 and unbound uses 53, so in opnsense I went to Services > Unbound DNS > query forwarding and added the IP 10.50.50.0:5353 but even doing that didn't work on my wireguard config file.

          Thinking more into it the reason that It didn't work was because unbound is the primary DNS and Adguard would become the secondary DNS, if there was a way to create another IP for unbound I think my problem would be solved, but Im still learning about opnsense so I don't know how would I do it.

          • Still@programming.dev
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            1 year ago

            ah ok so I would think you would want to set that to 127.0.0.1:5353 if it is on the same machine as the router an just use the router as the DNS server in wireguard

            that would have traffick like this:

            client > 192.168.1.1(router) dns server > loopback to adguard

            • coffelov@lemmy.mlOP
              link
              fedilink
              English
              arrow-up
              1
              ·
              1 year ago

              thank you for the support, i was able to make Unbound listen to 10.50.50.0 as a dns but when i tried to access me services on 192.168.1.$$ the same problem occured. i also found another simillar post that had the same problem as mine so i now know it will not work, but thanks for the help

  • Illecors@lemmy.cafe
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Immediate workaround - use your phone's config. I would then try to build another config for the phone based on a working one.

    • coffelov@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      But the problem is the DNS, I think the phone isn't as picky as the computer when connecting to wireguard that why it works, I will try doing that but I don't think that's the problem

      • Illecors@lemmy.cafe
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        If you genuinely suspect the computer - try checking routing tables. Although that's impossible to help you with as the environment would be unfamiliar.