Updated: 28 September 2026 · Applies to: Webmin 2.670

Webmin can manage everything on your server, so it is a favourite target for attackers. Two simple measures make it much safer: move it away from the well-known port 10000, and allow only your own IP addresses to connect. Both are set in Webmin's own configuration module.

Change the port

  1. Log in to Webmin.
  2. Open Webmin › Webmin Configuration and click Ports and Addresses.
  3. In Listen on port enter the new port number, for example 12345. Choose a number between 1024 and 65535 that no other service uses.
  4. Click Save. Your browser is sent to the new port; if it does not follow, open https://YOUR-SERVER-IP:12345 yourself.
  5. Open the new port in the firewall and close the old one:
    # Ubuntu / Debian with ufw
    sudo ufw allow 12345/tcp
    sudo ufw delete allow 10000/tcp
    
    # AlmaLinux / Rocky / RHEL with firewalld
    sudo firewall-cmd --permanent --add-port=12345/tcp
    sudo firewall-cmd --permanent --remove-port=10000/tcp
    sudo firewall-cmd --reload

Do the firewall change before or right after you save; if you saved first and the port is blocked, the page will not open. To undo it from the server, edit /etc/webmin/miniserv.conf, set port=10000 and run sudo systemctl restart webmin.

Allow only your own IP addresses

  1. Find your public IP address, for example by opening curl https://ifconfig.me on your computer or by asking your provider. If your address changes often, use a network range or a VPN with a fixed address.
  2. In Webmin open Webmin › Webmin Configuration › IP Access Control.
  3. Select Only allow from listed addresses.
  4. Enter your address (or a network such as 192.168.1.0/255.255.255.0), one per line. Hostnames are also accepted.
  5. Click Save.

By default Webmin accepts connections from any address and relies on the password alone. After this change, anyone else gets a refusal before they can even try a password. Make sure the list contains the address you use right now, or you lock yourself out. If that happens, remove the line starting with allow= in /etc/webmin/miniserv.conf from an SSH session and restart Webmin (sudo systemctl restart webmin).

Even better: block the port and use an SSH tunnel

Keep port 10000 closed in the firewall and connect through SSH when you need Webmin:

ssh -L 10000:127.0.0.1:10000 user@YOUR-SERVER-IP

Then open https://127.0.0.1:10000. For this to work, Webmin must accept connections from the server itself, which is the default.

More protection

Frequently asked questions

Is changing the port real security?
It reduces automatic scans, but it does not replace a firewall or a strong password. Use it together with IP access control.

I cannot reach Webmin after changing the port.
The firewall does not allow the new port. See How to fix Webmin not opening on port 10000?.

Official documentation: Webmin documentation: Webmin Configuration.

Need a server for Webmin, or a hand with the setup?

Prefer a hand with the setup? Our engineers can do it for you: Hire an Expert, or use our on-demand server management.

Was this answer helpful? 0 Users Found This Useful (0 Votes)