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.
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:
Try changing the
port
andlisten
in \etc\webmin\miniserv.confexample:
Then restart webmin:
Now use:
Does it work locally on the server where webmin is installed (ie. http[s]://127.0.0.1:10000)? If you don't want to install a graphical webbrowser to test this, just try it with wget or something.
The dpt:webmin part of your output just means there is an entry for webmin on port 10000 in your /etc/services and iptables looks it up to give a more meaningful output (service type instead of hostname).
Also make sure webmin is configured to listen from remote addresses. This is under webmin configuration>IP access control.
maybe blocked/forwarded on the router? it's not a usual port to be open on every router... i happen to have it open on one only because it's DMZ'd. Also you don't mention how you're trying to connect. my corporate firewall blocks anything other than port 80 and 443 so to access from their system I have to change it to a port that they permit.
as another possible solution (since you didn't mention this...) if possible, VPN to your network. VPN should permit connectivity.
I had to modify the above answer to include the
-i
option which allows you to specify which interface the rule should be applied to. When I ran the rule without the option, it was not showing up iniptables -L
but after specifying the interface, it worked like a charm.From the iptables -h docs:
So, to apply the rule to any ethernet interface you would do the following:
iptables -I INPUT 1 -p tcp --dport 10000
-i eth+-j ACCEPT
Or, to listen on on a specific ethernet interface (eth1, for example) you would do:
iptables -I INPUT 1 -p tcp --dport 10000
-i eth1-j ACCEPT
Now,
iptables -L
should show it at the top of the output and you will be able to access webmin's web interface. HTH.