RPI3+, cannot login to WUI

I installed IPfire core 176 to microSDHC card (size is 32 GB) from this image. I have RPI 3B+ (RPI 3B with WiFi module).

I connect to RPI with HDMI monitor and wireless keyboard, I do not use serial console.
I use USB2ETH adapter for RED interface. I use RJ45 socket on RPI board for GREEN interface.
IP address for GREEN interface is 192.168.111.1. RED interface is configured as DHCP client.

First I have some trouble, U-boot stopped on message “scan USB devices”. It took me about two hours to find that my wireless keyboard dongle is troublemaker, that I have to unplug it otherwise U-boot will not start. I have to disconnect my wireless keyboard on every reboot :frowning: Raspbian on the same hardware doesn’t have this issue, I assume it is linked to U-boot used in IPfire image…

I configured IPfire, I can install packages with pakfire (RED is working), I can ping GREEN interface. But I cannot login to WUI and I assume this is a bug in IPfire.

I started with my web browser, I opened “http://192.168.111.1:81/” and I receive error “gpl.cgi not found”.

Replication with curl:

curl http://192.168.111.1:81
HTTP/1.1 301 Moved Permanently
...
< Location: /cgi-bin/gpl.cgi
...
curl http://192.168.111.1:81/cgi-bin/gpl.cgi
HTTP/1.1 301 Moved Permanently
...
< Location: https://192.168.111.1:444/gpl.cgi
...
<p>The document has moved <a href="https://192.168.111.1:444/gpl.cgi">here</a>.</p>
...
curl -k https://192.168.111.1:444/gpl.cgi
HTTP/1.1 404 Not Found

I enabled manually SSH access; not an easy task when WUI is not working…

I enabled SSH access from console:

[root@rpifire ~]# touch /var/ipfire/remote/enablessh
[root@rpifire ~]# # review and modify /var/ipfire/remote/settings, next lines shows the result...
[root@rpifire ~]# cat /var/ipfire/remote/settings
ENABLE_SSH_KEYS=off
ENABLE_SSH_PASSWORDS=on
ENABLE_SSH_PORTFW=off
ENABLE_SSH=on
SSH_PORT=on
[root@rpifire ~]# sshctl

I can ssh to my IPfire running at RPI, so I can troubleshoot. ssh root@192.168.111.1

I see in /var/log/httpd/error_log that gpl.cgi is searched at wrong location:

[Tue Jul 25 23:09:34.192927 2023] [cgid:error] [pid 2080:tid 281472785301824] [client 192.168.111.200:42726] AH01264: script not found or unable to stat: /srv/web/ipfire/html/gpl.cgi
[Tue Jul 25 23:09:48.660918 2023] [cgid:error] [pid 2080:tid 281472618918208] [client 192.168.111.200:47378] AH01264: script not found or unable to stat: /srv/web/ipfire/html/gpl.cgi

Correct location is /srv/web/ipfire/cgi-bin/gpl.cgi

[root@rpifire ~]# pakfire status
Core-Version: 2.27-aarch64
Core-Update-Level: 176
Last update: 15d 3h 51m 29s ago
Last core-list update: 1s ago
Last server-list update: 4s ago
Last packages-list update: 3s ago
Core-Update available: no
Package-Updates available: 0
Reboot required: no

Any advice what is wrong with HTTP server configuration??


I think I have found the troublemaker. Script /srv/web/ipfire/cgi-bin/index.cgi has this code:

if ( ! -e "/var/ipfire/main/gpl_accepted" ) {
        print "Status: 302 Moved Temporarily\n";
        print "Location: gpl.cgi\n\n";
        exit (0);
}

The WUI is at
Https://192.168.111.1:444
Ther is no http address.

2 Likes

When I connect to http://192.168.111.1:81, I am redirected to HTTPS access at port 444. It works…

When I manually disable “gpl” check from console ([root@rpifire ~]# touch /var/ipfire/main/gpl_accepted), I can connect with port “81”.

When I enforce the first login with GPL text ([root@rpifire ~]# touch /var/ipfire/main/gpl_accepted) I cannot login, I end with ERROR 404. I tried to fix this issue but I failed…

When I try to connect to the port 444, then it works. This is simulation with curl

curl -k https://192.168.111.1:444/
...
< HTTP/1.1 302 Moved Temporarily
...
< Location: /cgi-bin/gpl.cgi
...
curl -k https://192.168.111.1:444/cgi-bin/gpl.cgi
...
< HTTP/1.1 401 Unauthorized
...
<title>401 Unauthorized</title>
...