Firewall Flashcards

1
Q

How do you list firewall zones?

A

firewall-cmd –get-zones

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you get the default zone?

A

firewall-cmd –get-default-zone

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you assign an IP range to a firewall zone?

A

firewall-cmd –zone= –add-source=<192.168.0.0/24>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the difference between a run level vs persistent change?

A

A run level change does not require firewall-cmd –reload

A persistent change –permanent requires service to be reloaded

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Why is a firewall zone useful?

A

You can group multiple ip ranges (sources) into a zone and apply rules efficiently

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you list firewall rules for a zone?

A

firewall-cmd –zone= –list-all

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How would you add a firewall to accept http on the home zone?

A

firewall-cmd –zone=home –add-port=80/tcp

firewall-cmd –zone=home –add-service=http

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you make firewalld block everything with only system access via local console?

A

firewall-cmd –panic-on

firewall-cmd –query-panic *get status

How well did you know this?
1
Not at all
2
3
4
5
Perfectly