Setting up Pi-hole

Permabanned
Joined
5 Jun 2010
Posts
15,459
Has the container got access to the internet?

Click the docker icon, open console. Type . It should show you the external IP address of the docker.

I've no experience of it in a container environment, I kept it simple and used a RPi

Code:
oot@f80ba2d91515:/# curl ifconfig.me
curl: (7) Failed to connect to ifconfig.me port 80: No route to host
root@f80ba2d91515:/#

That is what it returned.
 
Permabanned
Joined
5 Jun 2010
Posts
15,459
These are the DNS settings.

DGdgSiT.png

I think the fundamental issue is I can't ping the outside world from within the Docker container console.

I can ping the outside world from the Unraid console.
 
Associate
Joined
4 Dec 2009
Posts
518
These are the DNS settings.

DGdgSiT.png

I think the fundamental issue is I can't ping the outside world from within the Docker container console.

I can ping the outside world from the Unraid console.
On this screen the tick box at the bottom should be unticked, then tick the next one.
This will set google as resolver1 and cloudflare as reoslver2 (for IP4).
Pihole usese a combination of 2 resolvers as (among other things) a load balancing measure. It will randomly choose to use your 2nd resolver even if the 1st one is fine.
The GUI above isnt very clear but column 1 is resolver 1 (which you have set twice) and column2 is resolver 2.
There are then also 2 resolvers for IPv6 and you have nothing set for either of those.
You can then further expand on this. by using the 4 boxes on the right to set your own resolvers.
Again 2 for IP4 and 2 for IP6.
 
Associate
Joined
13 Jun 2016
Posts
1,499
Location
UK
I agree with @MonkeyBasher - looks like the DNS settings within the application itself are set wrong. Here's mine as an example:

Screenshot-20220107-173946.png


You also need to have the IP addresses for the DNS servers passed via the Docker container config - in my setup they are set to use the Cloudflare DNS servers:

Screenshot-20220107-174523.png


I expect if you were to go to the Unraid Docker page, click on the menu for PiHole and instead of choosing 'WebUI' choose 'Console' and then try pinging something, that you would find you don't have a connection/can't resolve DNS outside your network.
 
Soldato
Joined
11 May 2007
Posts
8,911
Location
Surrey
Any ideas how I fix this?

'not giving name localhost.lan to the DHCP lease of 192.168.1.147 because the name exists in /etc/hosts with address 127.0.0.1'

Documentation doesn't really elude to what I need to do. I'm guessing I need to SSH in and change something in the hosts rather than through the GUI?
 
Soldato
Joined
24 Sep 2015
Posts
3,666
SSH into the Pi-Hole and do 'cat /etc/hosts' and then post the contents here. Mine for comparison:
Code:
[root@pihole1 ~]# cat /etc/hosts
127.0.0.1       localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

127.0.1.1       pihole1
[root@pihole1 ~]


I expect there's a line in yours that says:
Code:
127.0.0.1       localhost.lan


Delete that line.

Alternatively, change the hostname of that device that's seemingly having trouble getting an IP address.
 
Back
Top Bottom