How to change Webmin Port number using Terminal/SSH

change Webmin Port – Webmin is a powerful web-based interface for managing Unix-like systems, offering administrators an easy way to control their server settings. By default, Webmin runs on port 10101, but for security reasons or to avoid conflicts with other services, you might want to change this port. In this tutorial, we’ll guide you step by step on how to change the default Webmin port number using Terminal or SSH.

Why Change the Webmin Port?

Changing the default port for Webmin is recommended for several reasons:

  1. Enhanced security: Using a non-standard port helps reduce the chances of automated attacks on your server.
  2. Port conflict avoidance: If another service on your server is using port 10101, switching Webmin to a different port can prevent potential conflicts.
  3. Customization: Personalizing your Webmin setup can streamline your workflow and network configurations.

Prerequisites

  • SSH access to your server (using a terminal or an SSH client like PuTTY).
  • Root or sudo privileges.
  • Webmin installed and running.

Step-by-Step Guide to Change Webmin Port

Follow these steps to change the default Webmin port:

1. Connect to Your Server via SSH

You’ll need to log into your server (purchased from vpswebhostingindia) using SSH. For Windows users, use an SSH client like PuTTY.

change Webmin Port

2. Navigate to Webmin Configuration File

Webmin’s configuration file is typically located at /etc/webmin/miniserv.conf. You can open and edit this file using a text editor like nano or vi. Let’s use nano for this example:

3. Modify the Port Number

Once you have the configuration file open, look for the line that starts with port=10101. This specifies the port number Webmin is currently using. Change the port number to the desired value (e.g., port=30555).

Before Changing:

After Changing:

4. Save the Changes

If you’re using vi, save the file by pressing esc :wq and hit Enter

or

nano, save the file by pressing CTRL + O and hit Enter, then exit the editor by pressing CTRL + X.

5. Restart Webmin Service

To apply the changes, you’ll need to restart the Webmin service. Use the following command to restart it:

Alternatively, on older systems or if systemctl doesn’t work, you can use:

6. Access Webmin on the New Port

Now, Webmin should be accessible on the new port. Open your browser and go to:

For example, if you changed the port to 30555:

Make sure to replace your-server-ip with your actual server’s IP address and new-port with the port you configured.

7. Verify the Change

After accessing Webmin on the new port, verify that everything is functioning correctly by logging into the Webmin interface. If the connection fails, check your firewall rules and make sure the Webmin service restarted successfully.

Conclusion

Changing the default Webmin port (change webmin port) is a simple yet effective way to enhance your server’s security and prevent potential port conflicts. By following the steps above, you can quickly modify the Webmin port using SSH and adjust your server’s settings accordingly. Remember to always document the changes you make to avoid confusion down the road and ensure your firewall rules are properly configured to allow access on the new port.

Now that you’ve secured Webmin by changing its port, you can enjoy safer server management!

change webmin port change webmin port

Leave a Reply

Your email address will not be published. Required fields are marked *