rockstor/rockon-registry

Pi-hole not exposing DHCP server ports

Closed this issue ยท 4 comments

Pi-hole's DHCP server option is not working, I believe because the DHCP server port (68) is not exposed.

Could it be that you meant port 67/udp instead? According to the container documentation:
https://hub.docker.com/r/pihole/pihole
and the wiki:
https://docs.pi-hole.net/docker/DHCP/

It seems that it requires port 67, not 68.

In any case, neither of these ports are exposed in the rockon at this time, you are correct.

If you want to test it, you could add another port to a copy of the corresponding json file and add the port 67 in this area:

"ports": {

So the port object could look something like this:

                "ports": {
                    "53": {
                        "description": "DNS port. Required: 53",
                        "host_default": 53,
                        "label": "DNS-Port",
                        "ui": false
                    },
                    "67": {
                        "description": "DHCP port. Required: 67",
                        "host_default": 67,
                        "label": "DHCP-Port",
			"protocol": "udp",
                        "ui": false
                    },					
                    "80": {
                        "description": "Web-port. Recommended: 80. If other port than 80 is used some blocked sites will not show correctly.",
                        "host_default": 80,
                        "label": "Web-Port",
			"protocol": "tcp",
                        "ui": true
                    }
                },

If that resolves the issue, would you want to submit a pull request for the update of the rock json file?

The section on ports and how to also specify whether it's udp vs. tcp can be found here:
https://github.com/rockstor/rockon-registry#port-object

You are correct, it's port 67 indeed. That's not enough though, also the container's network mode needs to be changed in order for the DHCP server to be correctly exposed to the local network, as explained in the PI-Hole wiki. There are many options there, I'm not sure which one would better suit better a generic Rockstor installation.

I managed to make it work using --net=host mode, and specifiying Pi-hole's web server port through the WEB_PORT variable to something different from port 80 (which is taken by Rockstor's gui). I had to specify the network adapter name as well, which is different from the default "eth0"

Further discussions by Forum User Felix further support the move to using net=host to simplify the dhcp server option that pi-hole offers:

https://forum.rockstor.com/t/setting-up-pi-hole/8705

Thank you so much for your diligence in checking first, @Hooverdan96 !

@Bruffandino, my sincere apologies for such a delay in getting to your request. It was a rather important issue so thanks to @Hooverdan96 and @phillxnet it should be implemented rather soon. Keep an eye on #342 as that should resolve it. Let us know whether that indeed fixes your original problem once it is published.