Firewalld commands

firewalld commands

  • to check the server
    sudo systemctl status firewalld
    sudo systemctl start firewalld
    sudo systemctl stop firewalld
    sudo systemctl restart firewalld
    

firewall-cmd commands

  • to list
    firewall-cmd --list-all
    firewall-cmd --list-services
    firewall-cmd --list-ports
    
  • to add
    sudo firewall-cmd --zone=public --permanent --add-port=PORT/tcp
    sudo firewall-cmd --reload
    
  • to close
    sudo firewall-cmd --zone=public --permanent --remove-port=PORT/tcp
    sudo firewall-cmd --reload
    
COMMENTS
Related Post