This guide will demo how to add a service with firewall-cmd.
First, we like to add an HTTP service to the firewall, we could use below snippet:
Also, we like to add an HTTPS service to the firewall, just like below:
firewall-cmd --zone=public --add-service=http
Then we need to apply above setting in the firewall, use below snippet:
firewall-cmd --zone=public --add-service=https
Finally, confirm that port or service was opened successfully:
Copyright © 2020 by 940Apps Co., Ltd. All rights reserved.