I have followed the instructions located at pihole [NethServer Wiki] but for some reason docker network ls does not show the new network for pihole and the pihole container does not start automatically either.
With all of the testing I think I have created a bit of a mess with the different networks.
Is someone able to able me unwind the mess and get pihole working?
Maybe I should be asking some fundamental questions first:
Am I able to use and control pihole’s Admin Panel whitelists and blacklists and what happens to the databases if the container is destroyed? I assume the whitelists and blacklists are then lost?
What are the implications of installing pihole on NethServer outside of docker? I know I would need to tell the script to ignore the OS Check
The data is saved in volumes and/or in the filesystem and even included in NethServer backup. Destroying a container shouldn’t be an issue, it’s part of the update process.
Pihole wants to be DNS server so it conflicts with dnsmasq used in Nethserver.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
01c94a6af7e4 portainer/portainer-ce "/portainer -H unix:…" 14 hours ago Up 3 seconds 8000/tcp, 9000/tcp, 9443/tcp portainer
I would like to use either aeria or Macvlan - the ultimate goal is for PiHole to be able to see which devices the requests come from.
I think I may have combined a set a commands from the 2 different sets of the installation instructions for the Docker configuration which will not have helped the situation.
192.168.1.5 is the IP addresss for the br0 interface for Nethserver. 192.168.1.8 is the IP Address I would like PiHole to use.
I then ran the following commands and got the following results:
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
39e31200c6d7 pihole/pihole:latest "/s6-init" 2 minutes ago Up 2 minutes (unhealthy) pihole
01c94a6af7e4 portainer/portainer-ce "/portainer -H unix:…" 17 hours ago Up 2 minutes 8000/tcp, 9000/tcp, 9443/tcp portainer
# docker network ls
NETWORK ID NAME DRIVER SCOPE
c03309bf4685 aqua bridge local
ce9c7fed577c bridge bridge local
c9e48d2d1ea3 host host local
0a85a82de6eb macvlan macvlan local
3404ce0406d8 none null local
If I now try to go to http://192.168.1.8/, I get Nethserver’s default webpage which is what I sort of expected. If I go to http://192.168.1.8/admin/ to get to the PiHole Admin Page, I get a 404.
Think I am missing something stupidly obvious like the Docker Port configuration?
Yeah, I was guessing that the server itself wouldn’t be able to use it and it would have been a super nice to have but I’ll just have to work with the current configuration as is.
Okay - I think I am now officially loosing my marbles…
I have added 25 IP Reservations in the DHCP section in NethServer, but not yet enabled the DHCP in NethServer. (I plan to enable it in the next couple of days when I am ready to switch the equipment over)
Now I cannot get to the PiHole Admin Page. I have even rebooted the server to no avail.
The config is as follows:
[root@fileserver ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7c30d40ebb78 pihole/pihole:latest "/s6-init" 4 hours ago Up 33 seconds (healthy) pihole
01c94a6af7e4 portainer/portainer-ce "/portainer -H unix:…" 21 hours ago Up 30 seconds 8000/tcp, 9000/tcp, 9443/tcp portainer
[root@fileserver ~]# config show pihole
pihole=configuration
DNS1=8.8.8.8
DNS2=8.8.4.4
PhpMemoryLimit=1024M
mac=00:60:2f:c9:2c:8d
password=********************
piholeAquaIP=172.28.45.1
piholeMacVlanIP=192.168.1.8
piholeNetwork=macvlan
timezone=UTC
[root@fileserver ~]# pihole ip
# Pihole IP
192.168.1.8
[root@fileserver ~]# docker network ls
NETWORK ID NAME DRIVER SCOPE
c03309bf4685 aqua bridge local
e0a93fec7fc8 bridge bridge local
c9e48d2d1ea3 host host local
0a85a82de6eb macvlan macvlan local
3404ce0406d8 none null local
Not sure what I am missing here or which set of logs I should be looking at?
Relevant logs are /var/log/messages and /var/log/docker/docker.log.
You could also check the logs of the container in portainer or by
pihole log
Can you ping 192.168.1.8?
EDIT:
Your macvlan range/subnets/host seem to be correct.
I couldn’t reproduce, after adding DHCP reservations (inside macvlan range and outside) and reboot, pihole is still working.