Custom IP address for pihole

Hello,
I have a NAS(openmediavault) that has more services. One of them is a pihole and I would need to move it to a different IP address than the base address of the server. This is because DNS port 53 at the main server IP address is already occupied. Example:
IP address of the main server and other services: 192.168.1.10
IP address of the pihole: 192.168.1.15
I know it should be solved via macvlan. I tried:

docker network create -d macvlan \
   --subnet = 192.168.1.0 / 24 \
   --gateway = 192.168.1.1 \
   -o parent = eth0 pihole

The address of my router is 192.168.1.1.
I then assigned the container to this network and changed the IP address of the container with the pihole to 192.168.1.15. I also made a change in the pihole settings.

Unfortunately, I was not successful. I am a beginner with docker, so I will ask for simple advice / solutions.
Thanks…

Your problem likely is related to Docker's network configuration and isolation features, so you may want to additionally consider Docker support forums for a solution as well.

Also, there are too many different UIs for Docker out there to provide specific support for any of them.

While we provide no official support for docker GUIs, there may well be users around that know their way arouf with your specifc UI, so it's good that you posted those screenshots.
Maybe refer to OMV in your topic title as well, to attract those users.

Pi-hole's documentation focuses on Docker CLI instead and is spread a bit over GitHub and the official Docs.

As you are explicitly mentioning macvlan, you may have a closer look at an article that our docs link to:

While the article focuses on Synology, the docker-compose.yaml it refers to seems generic enough to be adopted by you for OMV.

Thanks for advice. I finally solved it with this configuration: Add a PiHole instance on a macvlan enabled Docker network (Synology eth0 example) · GitHub
It seems to me that in the end it helped me to update the system with sudo rpi-update.(linux - Docker MACVLAN only works Outbound - Stack Overflow)
After the restart it started to work, but I still don't see any connected ports in the portainer. But the website works, so I think I was successful.

Glad you could solve it. :slight_smile:

Just a remark:

You do not mention whether you run that command on the NAS host system or from within your Pi-hole container.

If you applied that command inside the container, that will solve your problems only temporarily.

Any changes supplied to your Pi-hole container internals will not survive a container restart, let alone a host machine reboot.

Yes, I did not speak clearly. I ran the command directly in os (raspbian) using PuTTY and using root.

1 Like