this post was submitted on 18 Jul 2023
5 points (72.7% liked)

Selfhosted

40183 readers
687 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 1 year ago
MODERATORS
 

Im trying to setup a DNS record in Opnsense to forward ex:( ***.local.mydomain.com ) to (192.168.1.777(nginx proxy)) but every option in Opnsense that I try it doesn't forward to my reverse proxy machine.

I have Unbound,AdguardHome and wireguard installed on the Opnsense.

Unbound port is 53 Adguard port is 5353

I tried going to: Services>Dnsmasq DNS>settings>host override, but it didn't seem to work I also tried logging to AdguardHome>filter>DNS rewrite, but it also didn't seem to work

What am I doing wrong, when I type (nslookup *.local.mydomain.com) I only get the response "server can't find *.local.mydomain.com"

Solved!!

In Opnsense I created a rule to forward my domain to an IP. You just need to go to Services>unbound>overrides>host overrides and add your domain

you are viewing a single comment's thread
view the rest of the comments
[–] citizen@sh.itjust.works 0 points 1 year ago (4 children)

If you have adguard on port 53 that will be your first hop and main DNS server. If you setup rewrite on adguard to point *.local.my domain.con to 192.168.1.777 that should be good. Next ensure your DHCP server sets correct DNS server for clients.

https://docs.opnsense.org/manual/dhcp.html

Next I would ensure that the client you’re testing with is pointing to the adguard DNS. In this case your open sense router on port 53.

Depending what you’re testing with on Linux you can check /etc/resolv.conf

You can run dig command to point directly to your adguard server to verify it works and you have connectivity

dig @192.168.1.1 something.local.my domain.com

[–] daruma@social.fossware.space 2 points 1 year ago* (last edited 1 year ago) (3 children)

Thank you that was very informative, I went through again and found out that my Unbound is using the port 53 and Adguard is using 5353.

That means Unbound is the main DNS server on my case. Where would I put my (*.local.domain.com to 192.168.1.**) rule

edit: I followed a guide on how to install Adguard with unbound. https://youtu.be/7RC7q5WOYC0

[–] MangoPenguin@lemmy.blahaj.zone 1 points 1 year ago (2 children)

Since unbound is your primary DNS where clients connect, set the override there.

[–] daruma@social.fossware.space 1 points 1 year ago (1 children)

Where would I have to input my domain name

Go to Services > Unbound > Overrides, and add a host override. Then you'll get a window to put the host, domain, and IP.