Restoring Dead VirtualMin after changed to port 1

Hi All,

It appears one cannot use port 1 as the access point to Web/VirtualMin (i.e. and attempting to do so kills VirtualMin. Specifically, after moving my new staging server to port 2, I wanted to move my live site to port 1 and my “lab” (experimental server) to port 3.

The change was made at the same page as here:

I can no longer access VirtualMin to fix the error, so I suppose I need to know: which config file(s) do I need to edit (location/filename) to reset the port to something other than 1?

As noted, I have no access to VirtualMin now, so the fix will have to be via terminal, methinks…please and thank you:)


OS type and version Ubuntu 22.04
Virtualmin version 7.7

I think you are looking for etc/webmin/miniserv.conf
(first line: port=…)

Not sure why port 1 would not work, did you add it to the firewall first?

Webmin → Networking → FirewallD → Add allowed port → Create. Than hit the ‘Reload the FirewallD’ button and you are good to go.

Thanks Mikky, that would be my mistake lol. I’ll try to add port 1 to FirewallD in a terminal before trying to edit the miniserv.conf file.

Glad to hear I can still use port 1, too:)

Thanks for your quick and precise help…

Using port 1 is a bad idea. Period.

1 Yes Assigned TCP Port Service Multiplexer (TCPMUX). Historic. Both TCP and UDP have been assigned to TCPMUX by IANA,[2] but by design only TCP is specified.[7]

Thanks for that…it’s amazing how much damage a bit of courage and a lot of stupidity can cause lol. Is port 11 ok for this intended use, instead? I don’t know which of Yes/Unofficial/Assigned/No/Reserved are open for my use on your Wiki page.

Either way, I’m still down.

I’ve modified miniserv.conf to “port=11” on line 1 and saved the file.

I’ve added port 11 to FirewallD: sudo firewall-cmd --zone=public --add-port=11/tcp --permanent;

Reloaded FirewallD: sudo firewall-cmd --reload

Restarted FirewallD: sudo systemctl start firewalld

Restarted apache: sudo systemctl restart apache2

My hosts file: localhost box

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters box

Just restarted the computer, and I’m still out, no VirtualMin access…and no external access to my domain. But the domain and both subs work internally lol!

Hopefully this can be solved because the TimeShift file with my original config was destroyed (with the toasted drive it was housed on).

I think VM uses a range of ports. Regardless, do not use any of the low number ports. Change it back to 10000 and make sure things work.

There is an official list of ports as used by different services. I wouldn’t put my nose in the first 1000. If you want to set a port for Webmin then somewhere as far as possible up to 65535. Obviously it can be scanned with nmap, but this can also be blocked by an IDS. As far as I’m concerned, in 10 years of Webmin I haven’t changed the default port. Administrators have the right to start the webmin service while working in the interface and then close the service. If the servers restart, the service is by default stopped

One more thing, if you set webmin service to listen on port 1 and a bot finds it out, it attacks your login form and you have to take protective measures. As in the case of moving the SSH port from 22 somewhere as far as possible, so here. If you set it to port 51237 when nmap is scanning the server, you can detect it and block the IP with an IDS.

A bot much rather finds the port 10000 rather than 1.

You didn’t mention restarting Webmin, which is necessary after editing miniserv.conf file by running systemctl restart webmin command.

Is this for security reasons? I just restrict to my IP, no one else can access. or 2FA.

1 Like

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