Pi-Hole Query
FIXED- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- Pi-Hole Query
Re: Pi-Hole Query
20-04-2024 8:17 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I'm currently in the process of trying to set up my own pi-hole on a Pi Zero 2w. Bit of a pain to get it going because the case the vendor recommended doesn't let the mini HDMI cable they sell seat enough to work, so I had to take it back out until it was on Wi-Fi with SSH turned on.
Anyway, now I'm struggling with assigning the fixed IP. I wanted to give it 192.168.1.32, and I found the relevant bit of the Hub's web interface, but no matter how many times I change either the 'Always use this IP address:' slider or type in my preferred address, it doesn't stick. As soon as I exit to 'my devices' and find the pi in the list again, it's back to "Always use this IP address: No"
I've tried saving after each step, I've tried rebooting the router and/or the pi, I've tried changing the router config while the Pi is disconnected. I'd even accept the random IP the Hub gave it via DHCP the first time, but while that's been consistent (at least until the lease ends), it still says it's not fixed every time I re-enter.
Any Idea where I'm going wrong?
Re: Pi-Hole Query
20-04-2024 9:14 PM - edited 20-04-2024 9:18 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
There’s two ways of doing this.
1. You set a fixed IP address in the pi, not the router. If you set it to 192.168.1.32 then the hub will connect to this address automatically. You do not reserve the address in the hub.
2. If instead you use the default settings when installing the operating system then the router will assign an IP address. You can reserve so effectively fix this address by using the always use this IP address field in the router settings.
I used the second option. Having done this, to always use pi-hole filtering you enter this as both the primary and secondary DNS addresses in the hub settings.
Moderator and Customer
If this helped - select the Thumb
If it fixed it, help others - select 'This Fixed My Problem'
Re: Pi-Hole Query
20-04-2024 10:08 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thanks, so can option1 only be done during installation, or can I set it afterwards?
I've tried doing option 2, but my issue is that the "always use this IP address" toggle always seems to reset to off as soon as I leave that screen. It might actually be fixed on the DHCP address, and the UI resetting to 'no' is just a visual bug, but other than 'wait and see' there doesn't appear to be any way to confirm
Re: Pi-Hole Query
20-04-2024 11:20 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Are you aware that you need to log in to the hub and reserve the address on the Advanced Settings / My Network page? It sounds like you are on the Home / My Devices page.
Moderator and Customer
If this helped - select the Thumb
If it fixed it, help others - select 'This Fixed My Problem'
Re: Pi-Hole Query
21-04-2024 8:15 AM - edited 21-04-2024 8:17 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
The Hub two can be a bit difficult proving a fixed IP, If you prefer a static IP Address, let it boot up and receive a IP from the Hub.
Then make the following changes to /etc/dhcpcd.conf
sudo nano /etc/dhcpcd.conf
Add the following to the end of the file, (this assumes the Hub's IP Address is the default 192.168.1.254).
interface wlan0
static ip_address=192.168.1.32/24
static routers=192.168.1.254
static domain_name_servers=192.168.1.254
Save the file using CTRL + X and reboot.
HTH
Re: Pi-Hole Query
21-04-2024 9:36 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Yes, I'm on the advanced settings. This is what I'm looking at
If I flip the 'always use this' toggle and save (and get the green confirmation), then leave the page and return, it just reverts to this.
@Dan_the_Van Thanks, I'll try that.
Re: Pi-Hole Query
21-04-2024 9:37 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@Dan_the_Van wrote:
The Hub two can be a bit difficult proving a fixed IP, If you prefer a static IP Address, let it boot up and receive a IP from the Hub.
Then make the following changes to /etc/dhcpcd.conf
I thinnk that's only applicable to Debian 11 based Raspberry Pi OS; for a Debian 12 base I believe networking is handled by NetworkManger by default so static IP would be set using nmcli or nmtui (/etc/dhcpcd won't exist).
Re: Pi-Hole Query
21-04-2024 9:39 AM - edited 21-04-2024 9:42 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Yes, but
pi@pi-hole:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
EDIT: The raspberry pi imager uses this version for the Pi Zero 2W
Re: Pi-Hole Query
21-04-2024 9:55 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Well I never!
I've just looked at mine and it looks exactly the same!
Mine obviously is working even though claiming 'not connected'. Can you log into yours on 192.168.1.236/admin? The query log will show if it's whirring away doing its thing.
It's obviously a 'feature' that I had not noticed.
Moderator and Customer
If this helped - select the Thumb
If it fixed it, help others - select 'This Fixed My Problem'
Re: Pi-Hole Query
21-04-2024 10:03 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I made the change to dhcpdcd.conf (the file was otherwise blank) but after restart it's still stubbornly sticking to 192.168.1.236.
I started out with the Pi OS that came pre-installed on the Micro SD I bought with the Pi, which auto-updated the first time it got online.
the hostnamectl output is
Static hostname: raspberrypi
Icon name: computer
Machine ID: 0781a73b1bfe48f7bc655759366265c5
Boot ID: 517e08e3c5aa4a9b81b59102777bb50a
Operating System: Raspbian GNU/Linux 12 (bookworm)
Kernel: Linux 6.6.20+rpt-rpi-v7
Architecture: arm
Does that mean I need a different approach, or do I need to wipe and re-image it with a different version?
@Baldrick1 Yes, I can ssh into the Pi on 192.168.1.236
Re: Pi-Hole Query
21-04-2024 10:32 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: Pi-Hole Query
21-04-2024 10:39 AM - edited 21-04-2024 10:40 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
nmcli device status
DEVICE TYPE STATE CONNECTION
eth0 ethernet connected Ethernet connection 1
lo loopback connected (externally) lo
wlan0 wifi unavailable --
Depending on the hardware platform may need to change the syntax to
sudo nmtui edit "Ethernet connection 1"
HTH
Re: Pi-Hole Query
21-04-2024 11:10 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thanks both, I also found this myself, but the UI makes it a bit easier to follow what's happening.
https://i.imgur.com/04e0ZSe.png
The "gateway" entry is blank, should that be the router's address?
The Pi no longer appears as a device on the network on the router (on the basic or advanced list) but I can ssh into it and access the pi-hole web interface from the browser. I'm not sure the Pi itself can see the outside world though, I tried updating gravity and they all came back refused?
Re: Pi-Hole Query
21-04-2024 11:32 AM - edited 21-04-2024 11:41 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Yes, I definitely broke it, entering the gateway (192.168.1.254) didn't help, setting it back to automatic did, but that also put me back on the original dhcp address.
As may be apparent, this is all uncharted waters for me.
Edit: But... I just discovered that the Pi is still also reachable on the fixed address i gave it. so... I guess it doesn't matter? I can just use the fixed address as the DNS and ignore the DHCP one?
Now I just need to figure out why it's not actually blocking anything...
Re: Pi-Hole Query
21-04-2024 11:45 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Have you cleared your browser cache?
Moderator and Customer
If this helped - select the Thumb
If it fixed it, help others - select 'This Fixed My Problem'
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page