Setting up pi-hole

I try to set up pi-hole for my network. But after installing it, it only recognized the 172.x.x.x addresses that are given internally. But in my network I use the 192.168.2.x.
How do I get this to work?

@Felix, how I understand it (can’t test it right now), when pointing your devices (or router) to the Pi-Hole instance for DNS server, you need to point it to the Rockstor IP address (it will trigger through the 53 port to Pi-Hole).

So, that doesn’t work, you’re saying?

Also, based on your other thread, this is on Rockstor 4.5.7, correct?

2 Likes

@Hooverdan
At first I want to say thank you for you
It’s my third request and you are always there to help. :sweat_smile:
I’m really new to the system and hope my questions aren’t too dumb🙈

With a little more research I found out that my router always use the ipv6 dns server, so I needed to take this address also.
After that it worked, but I see all the traffic only through the 172.x.x.x.
So I can’t see which client is causing which traffic.

In the moment I set the dns manually in the device itself, I see it as client.
Is there any way to pass the ip addresses of the devices through?

2 Likes

@Felix, you’re very welcome. I am not an expert in pi-Hole unfortunately, so I think my knowledge ends here, but I hope some folks on the forum have been using it in its current form, and can maybe help out.
I’ll look around some more as well, but off-hand nothing comes to mind right now.

3 Likes

Hi @Felix,

Yes, the Local DNS names features is great in Pi-hole.

I’m no longer using the Docker version anymore for quite some time now so what I’m going to write may be out-of-date. The only way for Pi-hole to automatically display hostnames rather than IP in its charts was to use it as your DHCP server as well. If you would like to do that, though, your thread just made me realize that our Rock-On would not work as it is as we are missing one critical option for it: host networking. All of this is really well explained in their docs: https://docs.pi-hole.net/docker/dhcp/

Now, we can easily add this option to our Rock-On. @Hooverdan, any thought on that? I know we usually try to refrain when we can, but here the alternatives are rather cumbersome for users (would need a Rocknet + another DHCP relay container with custom config file apparently). Given that the DHCP server is a major feature of Pi-Hole, I personally think it would be worth adding the --net=host option to our Rock-On.

2 Likes

DNS names feature would be great but at least IP addresses would be fine.

Do I understand it right, that I just need to rund the command inside the docker and it would work?

@Felix, actually the net=host option is a feature that would require an update to the corresponding Rockon json file. Once that’s added, and the Rockon is reinstalled, then you could run the dhcp server within pi-hole.

@Flox, I think unless the macvlan docker network (if I understand that correctly from the documentation) is implemented on Rockstor, the net=host option seems to be the most user-friendly approach; as we know it wouldn’t be the only Rockon that has to rely on it.

1 Like

As I understand it from the documentation you’re completely right, but I was concerned, if anyone has the time and the knowledge to update this. So for me for now the second option also sounds great.
But I don’t really understand the configuration of the rocket lans🙈

@Felix, the changes are, I think, not so involved for the Rockon definition. If you want to, you could copy the below extract to a json file (e.g.: json_test.json), and place that in the /opt/rockstor/rockons-metastore directory (create it if it doesn’t exist. After a refresh in the Rockons screen that would show up as a pi-hole Test instance (you would want to uninstall the current pi-hole Rockon, and you could conceivably use the same configuration shares, but I leave that up to you of course).
If that works for you, then we can add the change permanently to the Rockon. Here is the adjusted version on github:

It installs fine for me and seems to be working, but since I am not the expert here, maybe you can test this. Finally, the normal UI button will not work anymore, since the Web Port is now defined differently than before (a change that has been coming to pihole for some time apparently), so you will have to put the web address in like this http://[SERVERIP]:[Web-Port]/Admin (if the port you choose during the setup up is 80, you don’t have to add that in there).

2 Likes

I would love to try it, but after messing around with the rockets, the rockon is stuck with installing :see_no_evil: and the force delete does not work

@Flox & @Hooverdan
Re

I like the idea of making Pi-Hole as easy as possible, and like our Plex Rock-on I think it qualifies for the host networking option.

@Hooverdan
Re:

Can we not fix this while we are adding the host networking. i.e. our existing ‘slug’ sub-option? I.e. from our README.md: https://github.com/rockstor/rockon-registry/blob/master/README.md

  (optional)"ui":{
            "slug":"gui", link to webui becomes ROCKSTOR_IP:PORT/gui with slug value gui
  },

I’m likely completely missing the point here however but I’d really like to have full Pi-Hole functionality out-of-the-box as it were.

@Felix Hello again.
Re:

Have you tried the emergency delete-rockon script? Run as the root user.

See the following recent post by @Flox

Hope that helps.

1 Like

I have tried after the documentation (/opt/rockstor/bin/delete-rockon) but that said no such file or directory

I just deleted the pi-hole shares and rebooted, if that didn’t helped it try it like you said
Thanks

@Felix
Re:

Yes, some major changes of late have changed this path. @Flox’s post explains the the new path and how to use it.

Let us know how you get on.

Hope that helps.

2 Likes

What do I do wrong? It doesn’t work

@Felix
You will need to change to the /opt/rockstor directory first I’m afraid:
Try

export DJANGO_SETTINGS_MODULE=settings
cd /opt/rockstor
poetry run delete-rockon

To see if you get the instructions. If so follow them and you should be good. We should update the docs on this front I think.

2 Likes

Thanks a lot, it worked

As soon as I have the time I will try the test version

3 Likes

I have just installed the test version and it works perfect :ok_hand:
Thanks a lot for the help

3 Likes

@Hooverdan
Re @Felix comment/field test:

Does that mean we should progress to a pr for the proposed changes? Assuming we have a solution for the Web-UI button that is.

1 Like