Docker talk to host


ripeart

Recommended Posts

18 minutes ago, ripeart said:

I need to run Pihole in a docker container. Since dockers with a dedicated IP can't talk to the host and vice versa, my Unraid box cannot get DNS resolution. How to resolve?

It's not a good idea to have Pihole as your DNS for the unRAID server.  

 

In Settings --> Network Settings set the DNS for the unRAID interface to some external DNS such as Google, Cloudflare (these are my DNS settings), etc. or your router IP address (depending on how you have it configured).

 

 

Network.png

Link to comment
2 minutes ago, ripeart said:

Could you please explain why it's not a good idea?

1. Pihole and/or docker issues means your server has no DNS

2. There are no ads to block when running unRAID though Pihole so it's an unnecessary layer of processing (granted, it's likely to be unnoticeable)

3. If router, server and/or Pihole have a misconfiguration, it could result in DNS loops that don't get resolved

4. You have the problem you mentioned with a custom IP address when Pihole is running as a docker on macvlan

 

Some are, in fact, running their unRAID server through Pihole without issue, but, it is really not necessary.

 

I have Pihole as a docker container for backup purposes, but, I am currently running Pihole on a Raspberry Pi. Either way, the configuration is the same.  Pihole IP address is the specified DNS in my router so all connected clients go through it, but, unRAID bypasses Pihole and goes direct to Cloudflare for DNS.

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.