Tecnologias da Informação
How to Install Webmin on Debian 11

How to Install Webmin on Debian 11

Managing and administering Linux servers from the command line is very difficult for any beginner Linux user. In this case, you can use Webmin to manage your Linux server from the web-based interface. Webmin is a free and open-source application platform that provides a graphical user interface to manage and control the Linux server. Using Webmin, you can create user accounts, set up Apache, DNS, and FTP server, share files, configure firewalls, and more.

Prerequisites

  • A server running Debian 11.
  • A root password is configured on the server.

Getting Started

Before starting, it is recommended to update your system’s package cache to the latest version. You can update it using the following command:

apt-get update -y

After updating the package cache, install other required dependencies using the following command:

apt-get install gnupg2 curl -y

Once all the required dependencies are installed, you can proceed to the next step.

Install Webmin

By default, the Webmin package is not included in the Debian 11 default repository. So you will need to add the Webmin repository to the APT.

First, download and add the GPG key with the following command:

wget -qO - http://www.webmin.com/jcameron-key.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/jcameron-key.gpg

Next, add the Webmin repository to the APT using the following command:

sh -c 'echo "deb http://download.webmin.com/download/repository sarge contrib" > /etc/apt/sources.list.d/webmin.list'

Once the repository is added, update the repository and install the Webmin with the following command:

apt-get update -y
apt-get install webmin -y

Once the Webmin is installed, you can proceed to the next step.

Manage Webmin Service

You can start, stop, restart and check the status of the Webmin easily from the init service.

To start the Webmin service, run the following command:

service webmin start

To restart the Webmin service, run the following command:

service webmin restart

To stop the Webmin service, run the following command:

service webmin stop

To check the status of the Webmin service, run the following command:

service webmin status

By default, Webmin listens on port 100000. You can check it using the following command:

ss -antpl | grep 10000

You should see the following output:

LISTEN 0      4096         0.0.0.0:10000      0.0.0.0:*    users:(("miniserv.pl",pid=4073,fd=5))

Configure Firewall for Webmin

It is also recommended to secure your server with a UFW firewall. To do so, install the UFW firewall with the following command:

apt-get install ufw -y

Once the UFW firewall is installed, allow ports 22 and 10000 with the following command:

ufw allow 22
ufw allow 10000

Next, enable the UFW firewall using the command below:

ufw enable

Next, verify the firewall with the following command:

ufw status

You should get the following output:

Status: active

To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere                  
10000                      ALLOW       Anywhere                  
22 (v6)                    ALLOW       Anywhere (v6)             
10000 (v6)                 ALLOW       Anywhere (v6)             
Tags :