Configuring Firewalld 

Basic commands to get started with firewalld 

  • Installing Firewalld

  • yum install firewalld
  • Start/ Stop Firewalld

  • firewalld must be running in order to configure rules

    systemctl start firewalld
    systemctl stop firewalld
  • Enable/ Disabled Firewalld

  • You must enable firewalld in order for firewall rules to survive a reboot.
    Its best to enable Firewalld only after rules have been set and you can confirm they are working.

    systemctl enable firewalld
    systemctl disable firewalld
  • See if Firewalld is running

  • firewall-cmd --state
  • Adding ports & services

  • firewall-cmd --add-port=5500/tcp --permanent
    firewall-cmd --add-service=https --permanent
  • Reload the firewall after making changes

  • firewall-cmd --reload
  • Review firewall rules

  • firewall-cmd --list-all
  • Create port forwarding rules

  • firewall-cmd --add-forward-port=port=443:proto=tcp:toport=5500 --permanent
  • Removing ports & services

  • firewall-cmd --remove-port=5500/tcp --permanent