Ip access control

Ubuntu Linux 20.04.2
1.973

You can set the IP addresses to be blocked at Webmin Configuration - IP Access Control.
There is lots of documentation on how to do it. There is one thing is not clearly explained however:
If I block a certain IP address at the “Webmin Configuration - IP Access Control” is the blocking applied to the access to my Webmin control panel only, or to the content of the “public_html” folders in all domains hosted on the server?
Thanks

Only Webmin. Everything in Webmin Configuration is literally configuring Webmin, and has nothing to do with any other services.

If you want to block an IP entirely, add it to the firewall. (Which firewall you have, and whether you have a firewall at all, depends on a variety of factors.)

I see. What happens if you restrict webmin panel access to one IP address? Let’s say your home IP address, and for some reason the IP address is no longer available. Will you lock out yourself forever from Webmin? Will you still have access to webmin through command line or any other recovery options? Thanks

You can edit Webmin’s configuration, including blocked/allowed IPs, directly in the config files in /etc/webmin (but be careful not to bungle them, as options in miniserv.conf being wrong could make Webmin not able to start).

There is also a webmin CLI command which can configure most Webmin options, including this one (I think this one is just allow and deny, but you’ll want to confirm that in /etc/webmin/miniserv.conf after you make your changes so you know how to fix it when the time comes).

You can do webmin --man to get the documentation for the webmin command and webmin --man set-config to get the docs for the set-config subcommand. But, you have to know what you’re doing to set things…it can set any value in any module configuration, but you have to dig into the config file yourself to figure out what value names are.

e.g. assuming you allow just one IP:

webmin set-config --option "allow" --value "8.8.8.8"
1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.