Locked out of Webmin?

Webmin, and its big brother, Virtualmin, are control panels for managing Linux servers. They take care of all aspects of virtual hosting. And they are superb. Oh, and free.

Annoyingly, I sometimes get locked out of the Webmin interface. I check the Webmin service is running:

service webmin status

I check the port is open:

netstat -an | grep :10000

 

But I’m still locked out. The answer? Firewall. Each and every time. So to help me next time my firewall rules keep me from accessing my own server, this is what I need to do. Start by flushing everything. I guess this kinda disables the firewall completely.

sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT
sudo iptables -t nat -F
sudo iptables -t mangle -F
sudo iptables -F
sudo iptables -X

 

Now log into Webmin. Finally, reset the firewall, clicking the option that states: “Block all except ports used for virtual hosting”.

Done.

Ben Roberts

Thank you for reading! I'm Ben, a web developer from Hertfordshire. I love writing about problems I've been able to solve, or very ocasionally, those that I can't. Sometimes I write about other things, such as cybersecurity, which has always fascinated me. If there is anything you'd like help with, or explained better, let me know in the comments below.