Firewall Flashcards
How do you list firewall zones?
firewall-cmd –get-zones
How do you get the default zone?
firewall-cmd –get-default-zone
How do you assign an IP range to a firewall zone?
firewall-cmd –zone= –add-source=<192.168.0.0/24>
What is the difference between a run level vs persistent change?
A run level change does not require firewall-cmd –reload
A persistent change –permanent requires service to be reloaded
Why is a firewall zone useful?
You can group multiple ip ranges (sources) into a zone and apply rules efficiently
How do you list firewall rules for a zone?
firewall-cmd –zone= –list-all
How would you add a firewall to accept http on the home zone?
firewall-cmd –zone=home –add-port=80/tcp
firewall-cmd –zone=home –add-service=http
How do you make firewalld block everything with only system access via local console?
firewall-cmd –panic-on
firewall-cmd –query-panic *get status