cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Pihole to work with Hub2

PNPihole
Hooked
Posts: 9
Registered: ‎09-08-2022

Getting Pihole to work with Hub2

Hello. I've recently joined PlusNet and have set up my Hub2 router. I am trying to configure it to use Pihole as the DNS however it doesn't seem to want to work.

The previous ISP router allowed me to change DNS settings and I had those set to the Pihole IP address. The router was the DHCP. 

I tried doing the same with Hub2 and was able to change the DNS settings under the IPV4 config, however it seems most devices have been allocated IPv6 addresses and this is set to Auto DNS in the Hub2. When I've tried changing this to manual, the format for the DNS resolver is completely different so not sure what I'm supposed to be putting in here. I've deactivated DHCP in the Hub2 and activated it in the Pihole so that can allocate IPs instead, which it does seem to be doing so, but now in the Address Table in Hub2, all devices seem to be showing under IPv6 and I'm still getting ads. 

Has anyone got this to work? I've gone through this previous thread for the Hub1 but it doesn't seem to apply to Hub2 as I don't think it takes into consideration the IPv6 Always being on.

19 REPLIES 19
dvorak
Moderator
Moderator
Posts: 29,735
Thanks: 6,610
Fixes: 1,485
Registered: ‎11-01-2008

Re: Getting Pihole to work with Hub2

Yes, I had this working - though it was some time ago.
It's doubtful that IPv6 is anything to do with it as PN doesn't support IPv6 so any traffic out to the internet would be over IPv4.Any IPv6 addresses assigned would be on the local network only.
Setting the pihole up on hub2 as the dns server worked for me, though you may have to flush your dns or restart a device for it to be picked up and start referencing it.
Also make sure the pihole is working correctly by directly assigning it as the DNS server on one of your devices, skipping out the router.
You shouldn't need to switch DHCP off on the router.
Customer / Moderator
If it helped click the thumb
If it fixed it click 'This fixed my problem'
bobpullen
Community Gaffer
Community Gaffer
Posts: 16,932
Thanks: 5,022
Fixes: 317
Registered: ‎04-04-2007

Re: Getting Pihole to work with Hub2

@PNPihole you may have some success changing some of the IPv6 settings on the Hub Two and rebooting it. I can't remember from memory what the options are but I think there's an 'off' setting for IPv6 allocation.

When specifying the DNS addresses in the IPv6 section of the Hub Manager, it will expect IPv6-formatted addresses, so will grumble if you try entering the IPv4 address of your Pi-hole. Some IPv6 tinkering on the Pi-hole and explicitly configuring the Pi-hole's IPv6 address is a potential solution but it's likely to be a bit of a minefield if you're not familiar with the workings of IPv6.

A final suggestion would be to disable IPv6 directly on the client devices you're having problems with if they allow it.

There'll be plenty of discussion/reading available if you search for something like this or this.

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵

PNPihole
Hooked
Posts: 9
Registered: ‎09-08-2022

Re: Getting Pihole to work with Hub2

Apologies for the delayed response.

 

So I believe I've turned off as much IPV6 settings as I can in the Hub2 Settings. The status summary shows as per Capture1.png. I can't seem to do anything about the 'Hub IPV6 status'.

If I go to the 'Address Table' however, I still see a large number of my network devices showing as active under IPv6. This is despite a router reset. Should these not all be showing as under IPv4 now?

 

bobpullen
Community Gaffer
Community Gaffer
Posts: 16,932
Thanks: 5,022
Fixes: 317
Registered: ‎04-04-2007

Re: Getting Pihole to work with Hub2

Are you seeing anything at all in the Pihole query log? It seems really odd that all of your devices would be strictly using IPv6. In a similar setup on my network, the vast majority of clients continue to pass DNS traffic over IPv4/the Pihole and most things are blocked.

There are other suggestions in my original reply. The only other potential solution I can offer is attempting to completely disable the hub's IPv6 remotely. This isn't a routine support function though and I can't vouch for what it may or may not break. I'm willing to give it a go though if you're in an experimental mood Wink

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵

npr
Pro
Posts: 1,898
Thanks: 119
Fixes: 9
Registered: ‎21-01-2013

Re: Getting Pihole to work with Hub2

Pihole running on a RPi with Plusnet hub2 working fine here, form what you say the difference in setup is:

Hub 2:
dhcp enabled
Change the DNS settings under the IPV4 config to the pihole IP address.

Pihole:
disable dhcp
Ensure the Piholes IP address is within the range 192.168.1.2 - 192.168.1.63

PNPihole
Hooked
Posts: 9
Registered: ‎09-08-2022

Re: Getting Pihole to work with Hub2

To clarify, around a third of all devices are showing under IPv6. Most of these are duplicated in IPv4 too and the icon is pink on both so it looks like both IPv4 and IPv6 connections are currently active. I've included a screenshot of some of the duplicated devices. The only one that appears under IPv6 but not under IPv4 is the Pihole (not shown in screenshot). 

 

I changed the DNS in the router settings to the Pihole IP address and then reset the router so that devices would use the new DNS. I left this running for around 30mins. The Pihole log shows approx 7000 permitted and 150 blocked DNS queries during this time, however not even common webpages would load on my pc or phone during this time. Looking at the pihole query log, it seems these were exclusively from mobile phones and other devices that are showing under IPv4 connections only. None of the devices in the ipv6 list (whether ipv6 only or dual ipv4/v6) seem to have made a successful query to the Pihole and most of these devices don't seem to allow me to disconnect ipv6.

 

I'm yet to try switching Windows pc to ipv4 only and directly configuring the DNS in windows. I'll give that a go tonight. Perhaps this will help diagnose the issue more accurately. If not, then a complete reset of the pihole over the weekend. Seeing as npr and dvorak have got it working, I'm hoping it doesn't come to remotely deactivating ipv6 at the risk of breaking something else. I will consider it as a last resort. Thanks for the offer.

PNPihole
Hooked
Posts: 9
Registered: ‎09-08-2022

Re: Getting Pihole to work with Hub2

Any reason why the pihole address needs to be within .2 and .63 specifically? The hub is configured to give addresses between  .64 and .253 so I thought it needs to be within this range? (it's currently .123 but I don't see any IP conflicts)

Dan_the_Van
Hero
Posts: 3,155
Thanks: 1,573
Fixes: 90
Registered: ‎25-06-2007

Re: Getting Pihole to work with Hub2

Is the IP address of the pi-hole server the same as it was with your previous ISP?
When I recently built a raspberry pi the instructions were clear it needed a static IP be it allocated by DHCP or set on the network card
npr
Pro
Posts: 1,898
Thanks: 119
Fixes: 9
Registered: ‎21-01-2013

Re: Getting Pihole to work with Hub2

The router assigns dhcp addresses in the range .64 - .253 .
Below this is for static IP addresses configured on the connected device, avoids the risk of the IP being assigned to another device.
Note: I have IPv6 disabled in the Pihole.

You only need change the following setting in the routers IPv4 configuration tab:
DNS servers:
Auto:  NO
Primary DNS:  enter IP address of Pihole

PNPihole
Hooked
Posts: 9
Registered: ‎09-08-2022

Re: Getting Pihole to work with Hub2

Ahh ok. Strange thing is some of my other devices are in the .64-.253 range and the IPv4 table shows them as having a static address status. Regarding your note on disabling IPV6. I believe I've found the relevant tickbox (Settings > DHCP >  Enable IPv6 support) but it doesn't allow me to unselect the tickbox 😑.

 

Also curiously, I've just found out that the RPi connects to the wifi network but isn't able to connect to the internet. I tried updating the OS and Pihole but got a load of failures. Opened Chromium and got a 'DNS not resolved' message. It's getting wiped and a fresh install tonight. Lets see how that goes.

Dan_the_Van
Hero
Posts: 3,155
Thanks: 1,573
Fixes: 90
Registered: ‎25-06-2007

Re: Getting Pihole to work with Hub2

As I asked previously has the network changed from your previous ISP. Some routers use 192.268.0.0/24 now you're 192.168.1.0/24 this could explain why you can't connect to the internet.
using a terminal try
ip add to check the IP address route to check gateway addresses
PNPihole
Hooked
Posts: 9
Registered: ‎09-08-2022

Re: Getting Pihole to work with Hub2

Apologies for missing this. No change in the network paths. Both use 192.168.1.xxx
npr
Pro
Posts: 1,898
Thanks: 119
Fixes: 9
Registered: ‎21-01-2013

Re: Getting Pihole to work with Hub2

As you're doing a fresh install of the os, can I suggest you try installing dietpi, it's much easier to use for those of us not that familiar with Linux.
There's a menu system to setup your network addresses and to install pihole etc.
 
https://dietpi.com

PNPihole
Hooked
Posts: 9
Registered: ‎09-08-2022

Re: Getting Pihole to work with Hub2

Finally it looks like its working. Ads are gone on PC, Firestick Apps (4od and ITV player) as well as mobile apps. Hallelujah. In case anyone else comes across the same issue:

 

I wiped the Pi and installed DietPi along with Pihole and Unbound (FYI Unbound is a alternative DNS server that the pihole will use in place of Google, Cloudflare etc. It is not essential but supposed to offer more security and doesn't take much time to install). Set up both IPv4 and IPv6 settings during pihole installation. Switched RPi IPv4 address to an alternative below xxx.xxx.x.64 rather than .123 (which it defaulted to again despite wiping everything on the RPi. I take it this was assigned based on the device MAC?) based on @npr advice and made it static. Pihole also gave me an IPv6 DNS address. Put both of these into the respective DNS settings in the PNHub2 config page. Once pihole was up and running, I added a load of adlists from here. Pihole now has around 1.2m domains on the blocklist.

IPv6 Config page is now showing

ULA - Enabled

IPv6 address allocation mode - Stateful

DNS 

Auto - No

Primary/Secondary both assigned to the same ipv6 provided by Pihole.

I dont know if these are doing anything but now its working, I'm going to leave them be. Funnily enough now no devices are showing under IPV6 in the PNHub2 admin console and they are all showing under ipv4.

 

Thanks to everyone above for your input and help. Awesome community.