Webmin and/or port 10000 not working

I've recently installed Webmin on a Ubuntu server but I can't get it to work. I asked a recent question about saving iptables but it turns out you don't need to "save" iptables changes.

Anyway, I still can't get Webmin working after opening the port up:

iptables -A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT

It seems that either the command is not opening up port 10000, or there is a separate problem with Webmin. If I run iptables -L I see lines like the following, but no port 10000:

ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:5555 state NEW
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:8002 state NEW
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:9001 state NEW

However, there is a line:

ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:webmin

Any ideas why Webmin is not working? The IP address works fine and we can view web sites on the server, but https://[ip]:10000/ (or http) doesn't work.


Solution 1:

I managed to fix this following the advice on this page by adding the rule to the beginning of the list, rather than the end. If you append it, the rule comes after all the traffic has been dropped, which doesn't work.

This command did it:

iptables -I INPUT 1 -p tcp --dport 10000 -j ACCEPT

Solution 2:

Try changing the port and listen in \etc\webmin\miniserv.conf

example:

port=1000
listen=1000

Then restart webmin:

/etc/init.d/webmin restart

Now use:

https://iporhost:1000/