this post was submitted on 28 Sep 2023
23 points (96.0% liked)

Selfhosted

39435 readers
4 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

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

you are viewing a single comment's thread
view the rest of the comments
[–] Still 1 points 1 year ago (1 children)

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

[–] [email protected] 1 points 1 year ago (1 children)

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 1 points 1 year ago* (last edited 1 year ago) (1 children)

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

[–] [email protected] 1 points 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