Webmin is a powerful, web-based interface for system administration for Unix. When you deploy a LAMP or WordPress appliance at Tilaa, Webmin is often included to help you manage your server.
This guide covers three essential security steps:
- Securing the Webmin access itself.
- Hardening SSH access.
- Enabling SSL (HTTPS) for your WordPress site.
Part 1: Securing Webmin
1. Login
Access your Webmin interface via your browser:
-
URL:
https://<your-ip>:12321(e.g.,https://192.168.1.1:12321) -
Username:
root - Password: Your initial root password.
2. Change Root Password
We strongly recommend changing the root password immediately.
- Go to System > Change Passwords.
- Select the user root.
- Enter a new, strong password and click Change.
Part 2: Hardening SSH Access
Changing the default SSH port (22) drastically reduces brute-force attacks.
- Go to Servers > SSH Server.
- Click on Networking.
- Change Port from
22to a custom port (e.g.,2200). - Click Save.
Don't lock yourself out!
Before restarting SSH, you must update the firewall to allow the new port.
Before restarting SSH, you must update the firewall to allow the new port.
Update Firewall (Webmin)
- Go to Networking > Linux Firewall.
- Find the rule allowing port 22 (SSH).
- Edit it to allow your new port (e.g.,
2200). - Click Apply Configuration.
- Now go back to the SSH Server page and click Apply Changes (or restart SSH).
Part 3: Securing WordPress with SSL
To get the green padlock on your WordPress site, you need to install an SSL certificate in Apache.
1. Upload Certificates
You need your certificate files (certificate.crt, private.key, ca_bundle.crt) from your SSL provider.
- Go to Tools > File Manager.
- Navigate to
/etc/ssl/certs/. - Upload your 3 files here.
2. Configure Apache
- Go to Servers > Apache Webserver.
- Click on the Virtual Host for port 443 (SSL).
- Click SSL Options.
- Link the files you just uploaded:
-
Certificate/Cert file:
/etc/ssl/certs/certificate.crt -
Private Key file:
/etc/ssl/certs/private.key -
Certificate Authority file:
/etc/ssl/certs/ca_bundle.crt
-
Certificate/Cert file:
- Ensure SSL Protocol is set to disable old versions (uncheck SSLv2/SSLv3).
- Click Save and then Apply Changes (top right) to restart Apache.
Part 4: Force HTTPS in WordPress
Now that the server supports SSL, tell WordPress to use it.
- In File Manager, open
/var/www/wordpress/wp-config.php. - Add this line above "That's all, stop editing":
define('FORCE_SSL_ADMIN', true); - Save the file.
- Log in to your WordPress Admin Dashboard (
/wp-admin). - Go to Settings > General.
- Change both "WordPress Address" and "Site Address" from
http://tohttps://.