Wrong IP Address Shown in Admin Interface

Current versions:
Pi-hole Version v3.3.1 Web Interface Version v3.3 FTL Version v3.0

Expected Behaviour:

The /admin interface should show the proper IPv4 address of the Pi-Hole device.

Actual Behaviour:

When viewing the /admin interface for my pi-hole, the IP v4 address of the device is showing up as +1 above what it really is. So, the local IPv4 address (that I access the /admin page through) is 192.168.0.20. . . but in the admin interface under settings/system tab, it shows 192.168.0.21

More Info
So, I'm also using DietPi as my base 'image'. No matter what I set in dietpi-config, the settings there would show the proper IP address for ETH0, but pihole always showed +1. I even manually specified a static ipaddress in dietpi-config and then did pihole -up, no change.

I did find, however, that I could go in and manually edit the /etc/pihole/setupVars.conf file to the correct address and now everything is peachy. Not sure if it's a problem with DietPi, PiHole or something else entirely, but I thought I'd mention it in case anyone else has the trouble. Interestingly enough, the Pi was working fine 99% of the time, but sometimes when a blocked script would run, it would have to time-out, instead of being blocked right away, so it caused the web to "slow to a crawl" according to the users on this network. Once I updated the IP address and rebooted, now the /admin page shows the correct IP and all is lightning quick again.

Did you configure a static IP address? If so, which one, 192.168.0.20 or 192.168.0.21?

I used dietpi-config to set .20, but the /admin dashboard and sysvars file would both show .21. Even re-running dietpi-config, setting to DHCP and then back to static IP address, the dietpi config and ifconfig from the shell/terminal command line would always show/be correct, while the pi-hole IP/sysvar file continued/always showed +1 (again, until I manually edtted this file

The value in setupVars.conf would only be changed by a pihole -r + Reconfigure. It is static, otherwise.

So, wild thought here but are you connected to your pi via wired ethernet? If so, the wireless adapter is also being assigned an IP and apparently is successfully connecting to your router. Thus, you can use either IP address to connect and have one of them configured in pi-hole but use the other one to ssh in. Look in your router and see if you can view all connected machine names, and compare the two IP addresses to see if they are the same name.

So, after I ran dietpi-config, which properly sets the ipconfig info to the address I specified (.20), I did re-run pihole -r and it still remained at the invalid/incorrect IP of .21 - but only in setupVars.conf. ifconfig and dietpi both showed .20 and also, I could access my pihole admin interface at .20/admin, and nothing happened at .21 or .21/admin.

RE: WiFi, I have the WiFi adapter physically disabled, well, I mean, in dietpi-config I set it to disabled and restarted, so no WiFi adapter here. Good thought, though, Mushu

I said

did you use "reconfigure" or maybe only "repair" ?

Apologies, I read to quickly... I only ran pihole -r, not +Reconfigure. I ended up manually changing the file with a text editor instead. I'm going to see if I can reproduce the error on a different Pi, though, since this one is now fixed and in use.

There is no need for this as we know that the IP doesn't change without Reconfigure. Maybe we should change this to auto-detection of the IP also during Repair, but what if a machine has multiple (connected) Ethernet ports? Or, more realistic with respect to Raspberry Pis, what if both, WiFi and Ethernet, are up and connected? Which IP is the correct one? I see lots of problem with trying to update this without user interaction (and the repair option is meant to be running automatically).

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.