sidboy55555's picture

Hi, I reinstalled webmin in a attemp to upgrade it. did´t work trough..

But now I have a problem with the stunnel4 and webmin, when I try to connact to https://mydomain.com:12321 I get there´s no page. what settings do I need to change in the webmin config´s to let it work probelly with stunnel4 again?

- S Teelen

Forum: 
Jeremy Davis's picture

In our default config (as of v14.0+) Webmin listens on it's default port (10000) via HTTP but only on localhost. Stunnel links external port 12321 (HTTPS) to internal port 1000 (HTTP).

So things that come to mind that may be wrong are:

  • Webmin not running
  • stunnel not running
  • Webmin port changed
  • Webmin using SSL/HTTPS [stunnel can't connect]

    Some useful tools and commands:

  • netstat -l [lists listening ports]
  • service SERVICENAME status [status of SERVICENAME; [webmin|stunnel4]]
  • cat /etc/stunnel/stunnel.conf [displays stunnel config file]
  • COMMAND | grep KEYWORD [searches the output of COMMAND for lines that contain KEYWORD]
  • grep KEYWORD /PATH/TO/FILE [search FILE for lines which contain KEYWORD]
  • sidboy55555's picture

    how do I set webmin on localhost only? i set ssl to 0 in the webkin miniserv.conf, and the port is 10000. stunnel is running and webmin aswel. but i cant connect to https://mydomain.com:12321

    Jeremy Davis's picture

    I'm not 100% sure what are the most important ones, but I've pulled the ones that look like they may be important from a working Webmin config (/etc/webmin/miniserv.conf)
    port=10000
    ssl=
    no_ssl2=1
    no_ssl3=1
    no_tls1=1
    no_tls1_1=1
    listen=10000
    bind=127.0.0.1
    sockets=
    no_resolv_myname=0
    ipv6=0
    

    The I suggest that you restart both Webmin and Stunnel, and double check that they are indeed both running:

    service webmin restart
    service stunnel4 restart
    service webmin status
    service stunnel4 status
    
    Additionally, perhaps there may be some useful info in he default webmin logs?: /var/webmin/miniserv.log & /var/webmin/miniserv.error
    sidboy55555's picture

    I edited the config with the settings you said, and checked logs and errors but noting, could you send the entire webmin config? then I will paste it all in.

    sidboy55555's picture

    nvm, I installed turnkey on virtualhost and copied the config. but it did´t work... and everything is runniong fine without errors...

    Jeremy Davis's picture

    Make sure that your stunnel config (/etc/stunnel/stunnel.conf) includes the following:
    [webmin]
    accept  = 12321
    connect = 127.0.0.1:10000
    
    And if it doesn't, add it and restart stunnel.

    If you have done that and it still doesn't work, I've run out of ideas... To summarise, these are the things you need for it to work:

  • Webmin running
    • listening on localhost port 10000
    • no SSL/TLS - just plain HTTP
  • Stunnel running
    • listening on port 12321 (HTTPS)
    • allowing connections from anywhere
    • forwarding traffic to localhost port 10000
  • Explicitly accessing Webmin via https://IP_OR_FQDN:12321 from web browser that has network access to the VM. If you are using the default self-signed certificate, you may need to click through a browser warning/error message regarding that.

    So if you can confirm network access between your browser and the server and the above conditions have been met, there is no reason I am aware of for why it shouldn't work...

  • Add new comment