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
April 17, 2010
got error ??
#yum –enablerepo=webmin install webmin
Loaded plugins: fastestmirror, priorities
Error getting repository data for webmin, repository not found
April 17, 2010
Have you imported: jcameron-key.asc
And created the repo file for webmin?