English Spanish
$ sudo firewall-cmd --remove-port=port-number/port-type
List all allowed ports:
Remove the port from the allowed ports to close it for the incoming traffic:
This command will only give you a list of ports that have been opened as ports. You will not be able to see any open ports that have been opened as a service. Therefore, you should consider using the --list-all option instead of --list-ports.