Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Are you able to access it from inside your network? –  Good Time Tribe Oct 3 '09 at 1:35

7 Answers 7

up vote 8 down vote accepted

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
share|improve this answer

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).

share|improve this answer
    
Yes, trying https://localhost:10000 with wget grabs the regular login page. So internally it seems to be working fine. –  DisgruntledGoat Sep 14 '09 at 16:58

Also make sure webmin is configured to listen from remote addresses. This is under webmin configuration>IP access control.

share|improve this answer
    
...but I can't access Webmin. I suppose I may be able to use Lynx locally to check, but Lynx is always funny with anything more than basic HTML (i.e. certificates, cookies, etc). I'm sure by default you can access from remote addresses - that's what it's for! –  DisgruntledGoat Sep 15 '09 at 9:59

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.

share|improve this answer

as another possible solution (since you didn't mention this...) if possible, VPN to your network. VPN should permit connectivity.

share|improve this answer

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/
share|improve this answer
    
don't you mean to use 10000 and not 1000? –  Falcon Momot Feb 28 at 0:19
    
use another port (ex: 1000) instead of 10000 –  Tayba Mar 1 at 7:56

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 in iptables -L but after specifying the interface, it worked like a charm.

From the iptables -h docs:

[!] --in-interface -i input name[+]
                                network interface name ([+] for wildcard)

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.