Server Hosting Secrets
January 20th in Tutorials, Virtualmin / Webmin by Claudiu Popescu .

How To install Webmin Securely on CentOS

In this tutorial I’ll explain how to install webmin securely with ssl on CentOS 5.4. Only https connections will be accepted, and a few options will be changed also for security reasons.

Let’s start by installing all the needed packages for webmin


yum install openssl perl-Net-SSLeay perl-Crypt-SSLeay

Now let’s import the GPG key

rpm --import http://www.webmin.com/jcameron-key.asc

The last step before we start installing webmin is to create it’s repo file /etc/yum.repos.d/webmin.repo


[Webmin]
 name=Webmin
 baseurl=http://download.webmin.com/download/yum
 enabled=1

Now we can install webmin

yum --enablerepo=webmin install webmin

Before you start using webmin I recommend that you should change webmin’s default port 10000 into let’s say 4525, or you can pick a number.
Edit /etc/webmin/miniserv.conf, make sure that ssl is set to 1 and the port is different then 10000

port=4525
listen=4525
ssl=1

In this example I used port 4525, change that to a number bellow 65535, but make sure that it’s not in use.
You can find out what ports are in use by running:


netstat -nlp

As a final step restart webmin


service webmin restart

Now access webmin using this format:


https://IP-OF-THE-SERVER:4525

If you can’t access this web page make sure that the firewall allows incoming connections on port 4525.
You can check the firewall by running:


iptables -nvL
VN:F [1.9.3_1094]
Rating: 10.0/10 (3 votes cast)
How To install Webmin Securely on CentOS, 10.0 out of 10 based on 3 ratings
The Short URL of this blog posting is http://tyn.li/K
Twitter this blog posting

2 Comments

  • shafiq
    April 17, 2010
  • Claudiu Popescu
    April 17, 2010

Leave A Comment.