In this article, we are going to learn How to Install Webmin with SSL in Linux. Webmin is a Web Interface application written in Perl language used for Graphical Configuration of Linux Operating System. It is possible to do all that configuration through webmin that you are doing through terminal. Those peoples who found Linux is a difficult operating system to configure due to it’s terminal and command-line interface Webmin is useful for them. Now it’s also possible to use Webmin web interface with an SSL certificate. The default port of Webmin is 10000. This application was coded by Jamie Cameron. For more details on Webmin, you can visit the official Website of Webmin.
Follow the below Steps to Install Webmin with SSL in Linux – A Web Interface to Configure Linux:
Install Webmin .rpm based Package:
It is recommended to update all packages and dependencies before any new package installation. But It’s not necessary and totally upon you. You can use the below command to update your Linux System.
[root@localhost ~]# yum update # Update all Packages & Repositories
Download the Webmin .rpm based package using the below command.
[root@localhost app]# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.840-1.noarch.rpm # Download Webmin .rpm Based Package --2017-06-15 09:28:58-- http://prdownloads.sourceforge.net/webadmin/webmin-1.840-1.noarch.rpm Resolving prdownloads.sourceforge.net... 216.34.181.59 Connecting to prdownloads.sourceforge.net|216.34.181.59|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: http://downloads.sourceforge.net/project/webadmin/webmin/1.840/webmin-1.840-1.noarch.rpm [following] --2017-06-15 09:28:58-- http://downloads.sourceforge.net/project/webadmin/webmin/1.840/webmin-1.840-1.noarch.rpm Resolving downloads.sourceforge.net... 216.34.181.59 Connecting to downloads.sourceforge.net|216.34.181.59|:80... connected. HTTP request sent, awaiting response... 302 Found Location: https://excellmedia.dl.sourceforge.net/project/webadmin/webmin/1.840/webmin-1.840-1.noarch.rpm [following] --2017-06-15 09:28:59-- https://excellmedia.dl.sourceforge.net/project/webadmin/webmin/1.840/webmin-1.840-1.noarch.rpm Resolving excellmedia.dl.sourceforge.net... 202.153.32.19 Connecting to excellmedia.dl.sourceforge.net|202.153.32.19|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 28817918 (27M) [application/octet-stream] Saving to: “webmin-1.840-1.noarch.rpm” 100%[=========================================================================================>] 28,817,918 366K/s in 90s 2017-06-15 09:30:34 (314 KB/s) - “webmin-1.840-1.noarch.rpm” saved [28817918/28817918]
As you can see below we have the latest version of Webmin package.
[root@localhost app]# ls webmin-1.840-1.noarch.rpm
Now we can go ahead and install Webmin package. While installing the Webmin package it’s asked for some dependencies as you can see on sample output below. So before we start the installation of Webmin we have to install the required dependencies.
[root@localhost app]# rpm -ivh webmin-1.840-1.noarch.rpm warning: webmin-1.840-1.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 11f63c51: NOKEY error: Failed dependencies: perl(Net::SSLeay) is needed by webmin-1.840-1.noarch perl(Encode::Detect) is needed by webmin-1.840-1.noarch
Follow the below command to install the required dependencies for webmin.
[root@localhost ~]# yum -y install perl-Encode-Detect perl-Net-SSLeay # Install dependencies of Webmin Loaded plugins: fastestmirror, refresh-packagekit, security Determining fastest mirrors * base: mirror.nbrc.ac.in * extras: mirrors.viethosting.com * updates: mirrors.viethosting.com base | 3.7 kB 00:00 extras | 3.4 kB 00:00 extras/primary_db | 29 kB 00:00 updates | 3.4 kB 00:00 updates/primary_db | 1.4 MB 00:15 Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package perl-Encode-Detect.x86_64 0:1.01-2.el6 will be installed ---> Package perl-Net-SSLeay.x86_64 0:1.35-10.el6_8.1 will be installed --> Finished Dependency Resolution Dependencies Resolved =================================================================================================================================== Package Arch Version Repository Size =================================================================================================================================== Installing: perl-Encode-Detect x86_64 1.01-2.el6 base 80 k perl-Net-SSLeay x86_64 1.35-10.el6_8.1 base 174 k Transaction Summary =================================================================================================================================== Install 2 Package(s) Total download size: 255 k Installed size: 781 k Downloading Packages: (1/2): perl-Encode-Detect-1.01-2.el6.x86_64.rpm | 80 kB 00:00 (2/2): perl-Net-SSLeay-1.35-10.el6_8.1.x86_64.rpm | 174 kB 00:00 ----------------------------------------------------------------------------------------------------------------------------------- Total 257 kB/s | 255 kB 00:00 warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 Importing GPG key 0xC105B9DE: Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org> Package: centos-release-6-5.el6.centos.11.1.x86_64 (@anaconda-CentOS-201311272149.x86_64/6.5) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : perl-Encode-Detect-1.01-2.el6.x86_64 1/2 Installing : perl-Net-SSLeay-1.35-10.el6_8.1.x86_64 2/2 Verifying : perl-Net-SSLeay-1.35-10.el6_8.1.x86_64 1/2 Verifying : perl-Encode-Detect-1.01-2.el6.x86_64 2/2 Installed: perl-Encode-Detect.x86_64 0:1.01-2.el6 perl-Net-SSLeay.x86_64 0:1.35-10.el6_8.1 Complete!
So we have installed the required dependencies for webmin. now we can go ahead and install Webmin package using the below command.
[root@localhost app]# rpm -ivh webmin-1.840-1.noarch.rpm # Install Webmin .rpm Package warning: webmin-1.840-1.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 11f63c51: NOKEY Preparing... ########################################### [100%] Operating system is CentOS Linux 1:webmin ########################################### [100%] Webmin install complete. You can now login to https://localhost.localdomain:10000/ as root with your root password.
Installation of webmin completed successfully. As you can see on able output we can access webmin web interface using the URL : http://localhost:10000 OR http://IP_ADDRESS:10000
To access the webmin from other system you have to bypass the webmin port i.e. 10000 from Linux Firewall (iptables). To do so just edit the /etc/sysconfig/iptables file and add the below Highlighted Line.
[root@localhost app]# nano /etc/sysconfig/iptables # Bypass the Webmin Port from Linux Firewall -A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT
Then restart the iptables service using below command.
[root@localhost app]# /etc/init.d/iptables restart # Restart the IPtables Service iptables: Setting chains to policy ACCEPT: filter [ OK ] iptables: Flushing firewall rules: [ OK ] iptables: Unloading modules: [ OK ] iptables: Applying firewall rules: [ OK ]
Also Read – Secure Linux FTP Server (VSFTPD Server) Using SSL Encryption/TLS Encryption
Follow the below steps to Install Webmin .tar based package
Install required dependencies for webmin
[root@localhost app]# yum -y install perl-Encode-Detect perl-Net-SSLeay
Download webmin .tar-based package using the below command.
[root@localhost app]# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.840.tar.gz # Download Webmin .tar based Package --2017-06-15 10:17:01-- http://prdownloads.sourceforge.net/webadmin/webmin-1.840.tar.gz Resolving prdownloads.sourceforge.net... 216.34.181.59 Connecting to prdownloads.sourceforge.net|216.34.181.59|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: http://downloads.sourceforge.net/project/webadmin/webmin/1.840/webmin-1.840.tar.gz [following] --2017-06-15 10:17:02-- http://downloads.sourceforge.net/project/webadmin/webmin/1.840/webmin-1.840.tar.gz Resolving downloads.sourceforge.net... 216.34.181.59 Connecting to downloads.sourceforge.net|216.34.181.59|:80... connected. HTTP request sent, awaiting response... 302 Found Location: https://excellmedia.dl.sourceforge.net/project/webadmin/webmin/1.840/webmin-1.840.tar.gz [following] --2017-06-15 10:17:03-- https://excellmedia.dl.sourceforge.net/project/webadmin/webmin/1.840/webmin-1.840.tar.gz Resolving excellmedia.dl.sourceforge.net... 202.153.32.19 Connecting to excellmedia.dl.sourceforge.net|202.153.32.19|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 28966740 (28M) [application/x-gzip] Saving to: “webmin-1.840.tar.gz” 100%[=========================================================================================>] 28,966,740 1.41M/s in 25s 2017-06-15 10:17:28 (1.12 MB/s) - “webmin-1.840.tar.gz” saved [28966740/28966740]
As you can see below we have latest version wemin .tar based package.
[root@localhost app]# ls webmin-1.840.tar.gz
Now extract the package.
[root@localhost app]# tar -xzvf webmin-1.840.tar.gz # Extract the Webmin .tar based Package
Once you extract the .tar file you will get a directory named Webmin-1.840.
[root@localhost app]# ls webmin-1.840 webmin-1.840.tar.gz [root@localhost app]# cd webmin-1.840
just go in to the extracted directory and run the setup.sh script. refer the command below.
Once you run the script system will ask for some settings (eg : Config file directory, Log file directory, Login name, Login password..etc..) that you have to answer as per your setup and requirement or just press ENTER to take default the settings.
[root@localhost webmin-1.840]# ./setup.sh # Install Webmin Package *********************************************************************** * Welcome to the Webmin setup script, version 1.840 * *********************************************************************** Webmin is a web-based interface that allows Unix-like operating systems and common Unix services to be easily administered. Installing Webmin in /root/app/webmin-1.840 ... *********************************************************************** Webmin uses separate directories for configuration files and log files. Unless you want to run multiple versions of Webmin at the same time you can just accept the defaults. Config file directory [/etc/webmin]: Press ENTER to use Default Setting Log file directory [/var/webmin]: Press ENTER to use Default Settings *********************************************************************** Webmin is written entirely in Perl. Perl 5 interpreter on your system. Full path to perl (default /usr/bin/perl): # Press ENTER to use Default Setting Testing Perl ... Perl seems to be installed ok *********************************************************************** Operating system name: CentOS Linux Operating system version: 6.5 *********************************************************************** Webmin uses its own password protected web server to provide access to the administration programs. The setup script needs to know : - What port to run the web server on. There must not be another web server already using this port. - The login name required to access the web server. - The password required to access the web server. - If the webserver should use SSL (if your system supports it). - Whether to start webmin at boot time. Web server port (default 10000): Login name (default admin): root # Enter the Username that you will use to Login Webmin Portal Login password: # Enter your Password Password again: # Confirm your Password Use SSL (y/n): y # Enter y to Access Webmin Web Portal Securly Start Webmin at boot time (y/n): y # Enter y to start the Webmin service at Startup *********************************************************************** Creating web server config files.. ..done Creating access control file.. ..done Inserting path to perl into scripts.. ..done Creating start and stop scripts.. ..done Copying config files.. ..done Configuring Webmin to start at boot time.. ..done Creating uninstall script /etc/webmin/uninstall.sh .. ..done Changing ownership and permissions .. ..done Running postinstall scripts .. ..done Enabling background status collection .. ..done Attempting to start Webmin mini web server.. Starting Webmin server in /root/app/webmin-1.840 Pre-loaded WebminCore ..done *********************************************************************** Webmin has been installed and started successfully. Use your web browser to go to https://localhost.localdomain:10000/ and login with the name and password you entered previously. Because Webmin uses SSL for encryption only, the certificate it uses is not signed by one of the recognized CAs such as Verisign. When you first connect to the Webmin server, your browser will ask you if you want to accept the certificate presented, as it does not recognize the CA. Say yes.
To access the Webmin Web Access open your web browser and enter the below URL :
http://IP_ADDRESS_OF_YOUR_SYSTEM:10000 (Here my system’s IP Address is 192.168.0.103 where I installed the Webmin Service, so the URL would be https://192.168.0.103:10000)
The Uninstallation script of webmin is stored in /etc/webmin directory. So to Uninstall the webmin package refer the below command.
[root@localhost webmin-1.840]# /etc/webmin/uninstall.sh # Uninstall the Webmin Service Are you sure you want to uninstall Webmin? (y/n) : y Stopping Webmin server in /root/app/webmin-1.840 Running uninstall scripts .. Subroutine list_servers redefined at /root/app/webmin-1.840/servers/servers-lib.pl line 92. Subroutine list_servers_sorted redefined at /root/app/webmin-1.840/servers/servers-lib.pl line 111. Subroutine get_server redefined at /root/app/webmin-1.840/servers/servers-lib.pl line 143. Subroutine save_server redefined at /root/app/webmin-1.840/servers/servers-lib.pl line 158. Subroutine delete_server redefined at /root/app/webmin-1.840/servers/servers-lib.pl line 175. Subroutine can_use_server redefined at /root/app/webmin-1.840/servers/servers-lib.pl line 188. Subroutine list_all_groups redefined at /root/app/webmin-1.840/servers/servers-lib.pl line 208. Subroutine logged_in redefined at /root/app/webmin-1.840/servers/servers-lib.pl line 278. Subroutine get_server_types redefined at /root/app/webmin-1.840/servers/servers-lib.pl line 303. Subroutine this_server redefined at /root/app/webmin-1.840/servers/servers-lib.pl line 313. Subroutine get_my_address redefined at /root/app/webmin-1.840/servers/servers-lib.pl line 332. Subroutine address_to_broadcast redefined at /root/app/webmin-1.840/servers/servers-lib.pl line 361. Subroutine test_server redefined at /root/app/webmin-1.840/servers/servers-lib.pl line 375. Subroutine find_cron_job redefined at /root/app/webmin-1.840/servers/servers-lib.pl line 394. Subroutine find_servers redefined at /root/app/webmin-1.840/servers/servers-lib.pl line 407. Deleting /root/app/webmin-1.840 .. Deleting /etc/webmin .. Done!
That’s all, In this article, we have explained the How to Install Webmin with SSL in Linux – A Web Interface to Configure Linux. I hope you enjoy this article. If you like this article, then just share it. If you have any questions about this article, please comment.