Commonly used firewall commands enable the service firewall-cmd -- permanent [-- zone = & lt; zone & gt;] -- add-service = & lt; service & gt; this will permanently enable services in the region. If no region is specified, the default region is used. Disable a service in the region: firewall-cmd -- permanen
Common firewall commands
Enable services in the region
firewall-cmd --permanent [--zone=
] --add-service=
This will permanently enable services in the region. If no region is specified, the default region is used. A service in the disabled area
firewall-cmd --permanent [--zone=
] --remove-service=
Check whether the service in the region is enabled.
firewall-cmd --permanent [--zone=
] --query-service=
If the service is enabled, this command returns a value. This command has no output information. For example, enable the ipp-client service in the home region permanently.
firewall-cmd --permanent --zone=home --add-service=ipp-client
Permanently enable a port-protocol combination in the region
firewall-cmd --permanent [--zone=
] --add-port=
/
Permanently disable a port in the region-protocol combination
firewall-cmd --permanent [--zone=
] --remove-port=
/
Check whether the port-protocol combination is permanently enabled in the region
firewall-cmd --permanent [--zone=
] --query-port=
/