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

  • 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

    • coffelovOP
      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