User Tools

Site Tools


linux:notes:firewalld

Firewalld

List Active Rules

sudo firewall-cmd --list-all

List Available Services

sudo firewall-cmd --get-services

Show Service Info

  • Change x to name of a service from above
  • This shows what ports and protocols a service covers
sudo firewall-cmd --info-service=x

Reload

sudo firewall-cmd --reload

Add/Remove Service

  • Add --permanent as-needed to allow the rule to persist
sudo firewall-cmd --add-service=x
sudo firewall-cmd --remove-service=x

Add/Remove Port

  • Add --permanent as-needed to allow the rule to persist
  • Change tcp to udp as-needed
sudo firewall-cmd --add-port=x/tcp
sudo firewall-cmd --remove-port=x/tcp
/usr/local/www/wiki/data/pages/linux/notes/firewalld.txt · Last modified: by 127.0.0.1