Cannot reach Webmin anymore (port changed to non-standard)

SYSTEM INFORMATION
OS type and version Ubuntu 18.04
Webmin version 1.994

Suddenly today I can’t reach webmin anymore. I have checked that it runs and restarted it but I can’t reach the login page. A status check show this. Confused over users. there should be only one

● webmin.service - Webmin server daemon
   Loaded: loaded (/lib/systemd/system/webmin.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2022-07-28 18:43:51 CEST; 25min ago
  Process: 615 ExecStart=/etc/webmin/.start-init (code=exited, status=0/SUCCESS)
 Main PID: 1127 (miniserv.pl)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/webmin.service
           └─1127 /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf

Jul 28 19:08:07 jv74.se su[2290]: pam_unix(su:session): session opened for user jv80 by (uid=0)
Jul 28 19:08:07 jv74.se su[2290]: pam_unix(su:session): session closed for user jv80
Jul 28 19:08:07 jv74.se su[2306]: Successful su for goingebyn by root
Jul 28 19:08:07 jv74.se su[2306]: + ??? root:goingebyn
Jul 28 19:08:07 jv74.se su[2306]: pam_unix(su:session): session opened for user goingebyn by (uid=0)
Jul 28 19:08:07 jv74.se su[2306]: pam_unix(su:session): session closed for user goingebyn
Jul 28 19:08:07 jv74.se su[2323]: Successful su for goingebyn by root
Jul 28 19:08:07 jv74.se su[2323]: + ??? root:goingebyn
Jul 28 19:08:07 jv74.se su[2323]: pam_unix(su:session): session opened for user goingebyn by (uid=0)
Jul 28 19:08:07 jv74.se su[2323]: pam_unix(su:session): session closed for user goingebyn

Hello,

At first try force restarting Webmin by running /etc/webmin/restart-by-force-kill command.

If that doesn’t help, please provide the outputs of the following commands:

systemctl status webmin
ps aux | grep miniserv | grep -v grep
netstat -tnlp | grep perl
firewall-cmd --list-all

Also, provide a screenshot of what you’re seeing in a browser when trying to visit the login page.

Kill did not help. Status after restart:

● webmin.service - Webmin server daemon
   Loaded: loaded (/lib/systemd/system/webmin.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2022-07-28 21:07:19 CEST; 1min 29s ago
  Process: 8215 ExecStop=/etc/webmin/.stop-init (code=exited, status=0/SUCCESS)
  Process: 8221 ExecStart=/etc/webmin/.start-init (code=exited, status=0/SUCCESS)
 Main PID: 8222 (miniserv.pl)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/webmin.service
           └─8222 /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf

Jul 28 21:08:06 jv74.se su[8331]: pam_unix(su:session): session opened for user jv74 by (uid=0)
Jul 28 21:08:06 jv74.se su[8331]: pam_unix(su:session): session closed for user jv74
Jul 28 21:08:06 jv74.se su[8348]: Successful su for jv80 by root
Jul 28 21:08:06 jv74.se su[8348]: + ??? root:jv80
Jul 28 21:08:06 jv74.se su[8348]: pam_unix(su:session): session opened for user jv80 by (uid=0)
Jul 28 21:08:06 jv74.se su[8348]: pam_unix(su:session): session closed for user jv80
Jul 28 21:08:06 jv74.se su[8364]: Successful su for goingebyn by root
Jul 28 21:08:06 jv74.se su[8364]: + ??? root:goingebyn
Jul 28 21:08:06 jv74.se su[8364]: pam_unix(su:session): session opened for user goingebyn by (uid=0)
Jul 28 21:08:06 jv74.se su[8364]: pam_unix(su:session): session closed for user goingebyn
# ps aux | grep miniserv | grep -v grep
root      1125  0.0  0.3  82228 24524 ?        Ss   18:43   0:00 /usr/bin/perl /usr/share/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      8222  0.0  1.0 144488 87684 ?        Ss   21:07   0:00 /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf
root@jv74:~# netstat -tnlp | grep perl
tcp        0      0 0.0.0.0:20000           0.0.0.0:*               LISTEN      1125/perl           
tcp        0      0 0.0.0.0:3536            0.0.0.0:*               LISTEN      8222/perl           
tcp6       0      0 :::3536                 :::*                    LISTEN      8222/perl

Please check on which port Webmin is listening exactly by running the following command:

grep port /etc/webmin/miniserv.conf

Adjust the port if needed by editing miniserv.conf file and restart Webmin service by running:

systemctl restart webmin

ERR_TIMED_OUT indicates that connection is being blocked.

Try running the following command to open non-standard port for your Webmin service by running:

firewall-cmd --add-port=3536/tcp
root@jv74:~# grep port /etc/webmin/miniserv.conf
port=3536

Is the same in the miniserv. conf config:

port=3536
addtype_cgi=internal/cgi
realm=Webmin Server
logfile=/var/webmin/miniserv.log
errorlog=/var/webmin/miniserv.error
pidfile=/var/webmin/miniserv.pid
logtime=168
ssl=0
no_ssl2=1
no_ssl3=1
no_tls1=1
no_tls1_1=1
ssl_honorcipherorder=1
no_sslcompression=1
env_WEBMIN_CONFIG=/etc/webmin
env_WEBMIN_VAR=/var/webmin
atboot=1
logout=/etc/webmin/logout-flag
listen=10000
3536   ALLOW   185.60.237.38 from ufw

Try allowing opening the port 3536 for all IPs at first (or disabling firewall completely) and see if it works to deduct the problem.

Perhaps, it is a DNS issue? Try accessing you Webmin panel using IP address, like 1.2.3.4:3536 instead of a domain name.

Also, this is advised to enable SSL.

Well, using ip address was the trick. I could reach it and login. But this is ofc unsecure. Using the web address now have changed to that it cant provide a secure page, like ssl does not work. I trid to renew the certificate but it did not help.

Den tors 28 juli 2022 23:02Ilia via Virtualmin Community <noreply@forum.virtualmin.com> skrev:

Well I cant seem to sort out the ssl for webmin so I created a subdomin and used reverse proxy to send it to the webmin port. The subdomain is ssl and it works as it should. Strange solution but working.

It is also possible to go with https://1.2.3.4:10000 (while using IP address), and with self-signed SSL certificate – that would be secure enough.

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