Close port dont work

Operating system:
Debian 10

Virtualmin GPL

I try to close an Port on the Server and reload firewall-cmd. But the port is still accessable on ip-adress:port

I would have only access to this port on Apache reverse Proxy with


You’re going to have to be more specific about what you did to try to close the port…obviously it should work, and it works for me, so you did something wrong or missed a step, but I can’t guess what or where.

i would close an Port. So that this port cant access from outside. Only local access from the Reverse Proxy is possible.

We understood that, but like Joe said you need to mention the steps you took to close it.
You might have missed a simple parameter or command…

ah okay,

okay i got the Webmin Panel into the Menu >> Networking >> FirewallD and remove the Port from the List. and i tried it over SSH with

sudo firewall-cmd --zone=public --remove-port=8043/udp --permanent
sudo firewall-cmd restart

UDP is probably wrong. HTTP is TCP.

sorry TCP is correct. i get this ouput.

larsmueller@server:~$ sudo firewall-cmd --zone=public --remove-port=8043/tcp --permanent

Warning: NOT_ENABLED: 8043:tcp

but the Port is still open

You probably have the default high ports rule. (port range 1025-65535)

That’s going to allow any user port. Removing 8043 doesn’t do anything if another rule happens to include it in its allowed ports. So, if you don’t need high ports to be open, delete that rule.

Here the ports there are open. No portrange match 8043.