In the previous example, where the squid service only required a single port, we could easily add a port rule to allow access to a service. Although the process is simple, in some organizations, the preference will still be to create the service file that documents the need of the port in the description field.
If we need to add a port, we have similar options in
--remove-port. The following command shows how to add the squid TCP port
3128 to the work zone without the need to define the service file:
# firewall-cmd --permanent --add-port=3128/tcp --zone=work # firewall-cmd --reload