firewall-cmd command examples
firewall-cmd – firewalld command line client
For more examples see http://fedoraproject.org/wiki/FirewallD
Example 1
Enable http service in default zone. This is runtime only change, i.e. effective until restart.
firewall-cmd --add-service=http
Example 2
Enable port 443/tcp immediately and permanently in default zone. To make the change effective immediately and also after restart we need two commands. The first command makes the change in runtime configuration, i.e. makes it effective immediately, until restart. The second command makes the change in permanent configuration, i.e. makes it effective after restart.
firewall-cmd --add-port=443/tcp firewall-cmd --permanent --add-port=443/tcp