CMD > firewall-cmd

· EOG, like EOF


² FIREWALL firewall-cmd #

sudo firewall-cmd --help | grep list
  --list-all           # list everything added for or enabled [P] [Z] [O]
  --list-all-zones     # list everything added for or enabled in all zones [P]
  --list-all-policies  # list everything added for or enabled in all policies
  --list-services      # list services            added  [P] [Z]
  --list-ports         # list ports               added  [P] [Z] [O]
  --list-protocols     # list protocols           added  [P] [Z] [O]
  --list-source-ports  # list source ports        added  [P] [Z] [O]
  --list-forward-ports # list IPv4 forward ports  added  [P] [Z] [O]
  --list-rich-rules    # list rich language rules added  [P] [Z] [O]
  --list-interfaces    # list interfaces bound to a zone [P] [Z]
  --list-sources       # list sources    bound to a zone [P] [Z]
sudo firewall-cmd --list-all-zones | grep -A19 pub
#=> public (default, active)
#=>   target: default
#=>   interfaces: wlp2s0b1
#=>   icmp-block-inversion: no
sudo firewall-cmd --list-all-zones | grep active
#=> docker (active)
#=> public (default, active)

--list-services
 --add-service=          whether service was added [P] [Z] [O]

--list-ports            ports added [P] [Z] [O]
 --add-port=PORTID[-<PORTID>]/PROTOCOL whether the port has been added [P] [Z] [O]

--list-protocols     List protocols added [P] [Z] [O]
  --add-protocol=PROTOCOL

RELOAD!! #

firewall-cmd --reload