ERR_CONNECTION_REFUSED when attempting to access web pi-hole admin page

After my installation of Pi-Hole, I am suffering an issue where I am getting ERR_CONNECTION_REFUSED when attempting to access the Pi-Hole admin page. I did some research and it seems to be an issue regarding my firewall and/or iptables.

The link to my pihole -d can be found here: https://tricorder.pi-hole.net/zzgejKF5/

If anyone can read over the log and see what's up, I would really appreciate it. I can't really find the issue in there but you may have better luck.

Which URL are you using to access the web interface?

Did you try http://192.168.2.33/admin ?

1 Like

Yeah tried both the domain admin page and also the IP admin page. Both had the same results with the ERR_CONNECTION_REFUSED.

Assuming Pi-hole is indeed working, it sounds like iptables is blocking your connection to Pi-hole.

What happens if you temporarily turn off or override iptables so that everything is allowed? Do the same access methods now work?

Do you have a browser extention which forces https on all URLs?

1 Like

So by default, it prompts me with a warning if the connection is not https, however, I do use the option to continue with the website, at which point it will hit me with the error mentioned above. I tried different browsers too, but, no luck.

There are quite a few lines indicating an invalid HTTP request in your debug log:

*** [ DIAGNOSING ]: contents of /var/log/lighttpd

-rw-r--r-- 1 www-data www-data 955 Nov 14 20:58 /var/log/lighttpd/error-pihole.log
   -----head of error-pihole.log------
   2022-11-14 20:57:56: connections.c.750) invalid request-line -> sending Status 400

If you monitor /var/log/lighttpd/error-pihole.log, would you be able to confirm that those lines would correlate with your failed attempts to login?
If so, would you be able to get hold of the HTTP request as sent by your browser?

1 Like

For whatever reason it does seem to work now, I didn't make any changes on any device after I posted this issue. Not sure what the issue could have been. Regardless I'll have a look at that log and see what I can find from there. Thanks for the help.

For anyone else experiencing the same issue honestly you might just need to wait for 12 hrs or so for it to work. If the issue does arise again, I'll make another post following up where I left off.

I only can guess, but I suspect a cookie your browser stored for your Pi-hole page may have become corrupted or incompatible with Pi-hole's new web UI, e.g. if it contained illegit characters. At least, that could have explained the 'invalid request line' errors.

If that would have been the case, clearing your browser's cookies may have helped.
But obviously, we won't be able to find out now. :wink:

Glad it's working for you again! :slight_smile:

1 Like

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