Are you a Webmin system administrator and want to increase your security then it is recommended to change the Webmin Port?
You have the option to change it to a custom webmin’s port number.
So, In this post, I will show you how to change the Webmin port, 10000 to 10101 or any other port. I am going to show three methods.
- SSH Method
- Webmin method
- Virtualmin file manager method
You can follow any of the above methods that you feel easy.
SSH Method to change the Webmin Port
To change the default port of your Webmin you need to edit the /etc/webmin/miniserv.conf file. By default, it is 10000. You can replace it with any port number you like. For example 81, 443, 10101 etc.
So open your SSh client and run the below command
sudo nano /etc/webmin/miniserv.conf
It will open the miniserv.conf file on your nano editor.
port=10000 addtype_cgi=internal/cgi realm=Webmin Server logfile=/var/webmin/miniserv.log errorlog=/var/webmin/miniserv.error pidfile=/var/webmin/miniserv.pid logtime=168 ssl=1 no_ssl2=1 no_ssl3=1 no_tls1=1 no_tls1_1=1 ssl_honorcipherorder=1
On the first line, you will get the port number. Just replace it with 10101 (Any port number of your choice).
To save changes, press Ctrl +o and hit Enter. Finally, press Ctrl+x to exit the nano editor.
Next, restart your webmin to apply the change on your webmin system manager.
Debian/Ubuntu users run
sudo systemctl restart webmin
Redhat/CentOS users run
/etc/init.d/webmin restart
After this fresh restart, the Webmin server should run using your latest port.
Webmin method
If you have already installed Webmin GUI based Linux system manager then you use this method to change the Webmin port easily.
First, log in to the Webmin panel and expand Webmin and select Webmin configuration from the left panel as shown below.
Next, Click on Port and addresses.
Now, Change port 10000 to any other port of your choice and Save,
Finally restart the Webmin. You can run the command to restart the Webmin from the Webmin terminal. Or, Scroll down on the same page ie. Webmin configuration and click o Restart Webmin.
Virtualmin File Manager Method
Assuming that you have already installed the Virtualmin on your Webmin system manager. So, you must have a File Manager on the left sidebar.
Next, navigate to etc as shown in this image.
Next, open Webmin and right click on miniserv.conf file to edit.
This will open the miniserv.conf file in Virtualmin’s file editor as shown below. Here you need to change the port with your chosen one.
Next, click on the save icon from the top right corner of this editor. Finally restart the webmin. You can run the same commands given above to restart the Webmin from the Webmin terminal.
Debian/Ubuntu users run
sudo systemctl restart webmin
Redhat/CentOS users run
/etc/init.d/webmin restart
Or, Scroll down on the same page ie. Webmin configuration and click o Restart Webmin.
Thus, you can change the port of your Webmin.
That’s all in this tutorial. Thank you for reading.
Meaningful sharing changes the world. If this article is helpful then don’t forget to share. Have a great day.
Thanks for the article.
I was searching for this and I land here. Thanks to google for sending me here.
For me, it is very helpful and learned 3 types of problem-solving methods. Webmin is really awesome. If one system breaks then no need to worry because we have several options to solve the issue.
My kind request to you please publish more tutorials like this.
Just wanted to share this ^-^
Welcome to Higeeky. Sure we will upload more tutorials soon.
Thank you for the tutorial. It’s work for me.
My server is loading without SSL fro the beginning. Please guide me to solve the issue.
Or, provide some tutorial on this issue.
I will be really thankful to your team
regards
On the same file ie. miniserv.conf, confirm that ssl=1, not 0. If zero then replace it with 1 and renew SSL certificate from the Let’s Encrypt.
Finally, restart your webmin. Hope this will work.