Jump to content

Private DNS server for local services


Go to solution Solved by dunn,

Recommended Posts

Hi, I just recently switched from a Ubuntu server to Unraid. I want to setup a DNS server on Unraid for private domains for all my services. I searched the forums and it kinda baffles me how few people are actually interested in this. Maybe I'm overlooking something?

 

On my old system I used to have dnsmasq running with an Nginx reverse proxy to resolve e.g. sonarr.nas to my NASIP:8989.

 

Now I'm searching for something similar on Unraid, but preferably as a plugin with an interface since I tend to forget about these tinkered solutions like the 14 years old how to for dnsmasq. The DNS server solutions like Technitium or Pi-hole seem to be overkill for my needs.

 

Is there anything like that on Unraid or do I have to setup dnsmasq manually?

Link to comment

Think of Unraid as an appliance, you want to modify the OS as little as possible.  You should run apps like this in a Docker container, PiHole is a pretty popular one. We generally recommend that Unraid use public DNS servers like 8.8.8.8 to reduce issues with accidental blocking and increase stability when the container isn't running.

Link to comment
4 hours ago, bonienl said:

 

I have 6 DNS servers (PIHOLE) running as docker containers. An other DNS server alternative is ADGUARD. See the apps store....

^^ This works.

I now run PiHole on a VM (Ubuntu) because I was most easily able to integrate Unbound into it for that recursive <3

Link to comment

Haha.  I love how you basically zoomed the camera out a bit for that.

Admittedly, I did try an unbound container from the apps plugin to go alongside a PiHole container... I could not get it to work right.  I was able to get it working using the pfsense unbound but it was flaky on the pfsense side and I had to periodically restart the unbound service.  I stumbled upon some walkthroughs that got me where I am now and it seems to be doing the trick.  

  

Link to comment

Quite a bummer there's no feature for this yet. Theoretically it shouldn't be too much hassle to implement the feature in the web UI, dnsmasq seems to be already preinstalled on the current version of Unraid.

Setting up containers or even a full VM just so I can bypass the limitations, that just doesn't sound right. My hardware is quite old and I wanted the system to draw the least energy possible, so I'm going to configure dnsmasq manually.

 

On 7/7/2023 at 8:39 PM, bonienl said:

 

I have 6 DNS servers (PIHOLE) running as docker containers. An other DNS server alternative is ADGUARD. See the apps store.

 

image.png

 

Not sure if you think this is being helpful or if you just wanted to flex your setup.

Link to comment

Let's keep things friendly please : )

 

Unraid is not Ubuntu. It is by far a best practice to do this sort of thing in a Docker container, they have very low overhead.  You are of course welcome to do whatever you would like with your system, but the more low level customization you do the harder it will be to upgrade and you will more or less be on your own to work through any issues.

  • Like 1
Link to comment

I use pihole with a custom dsnmasq configuration file added for my domains.

 

Containers are light, and so is pihole, it's meant to run on a pi after all. I have 50 containers running and the server idles at <5% CPU. A VM would be but a container isn't "something heavy".

Edited by Kilrah
Link to comment

I'm not sure but I think my inexperience with Docker and networks might be the issue why I'm not understanding you guys at all. You guys make it sound like it's a cakewalk setting up Pihole, but already at the start you run into issues with network.

 

I add a domain in Pihole and point it to my reverse proxy. But how do I point it to the reverse proxy if the port is not the standard port? Using the custom network interface makes you unable to change the port so that seems not to be an option. If I could change the container port by myself it wouldn't be an issue, but it seems Unraid or the Docker image don't support that.

Link to comment
20 hours ago, dunn said:

But how do I point it to the reverse proxy if the port is not the standard port?

You make it use the standard port. 

 

I have the pihole-dot-doh container on br0 network (it needs its own IP so can be referred to as DNS server) and NPM-official as reverse proxy on host network and standard ports. pihole points my domains to the server address to reach NPM.

Edited by Kilrah
Link to comment
20 minutes ago, Kilrah said:

You make it use the standard port. 

 

I have the pihole-dot-doh container on br0 network (it needs its own IP so can be referred to as DNS server) and NPM-official as reverse proxy on host network and standard ports. pihole points my domains to the server address to reach NPM.

 

The standard ports of the app are 801, 7818 and 4431. The maintainer of the package even called the variables TCP_PORT_801 and so on, so the only way I see using it is by building your own app, but there is no real documentation on how to do that.

If I'd use host network I couldn't change the ports either, only in bridge I could. But for this I'd have to change the port of the main appliance so I could give NPM port 80.

 

Link to comment
  • Solution
21 minutes ago, Kilrah said:

Both NPM-official and SWAG which are the popular reverse proxies use the standard ports.

 

I didn't even know there were 3 packages for the same applications due to autocompletion. I'm going try to roll with these images now, thanks.

 

But for the future I looked up on how to create templates yourself to be more flexible and I found this indepth guide.

https://selfhosters.net/docker/templating/templating/

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...