Firewall Flashcards

1
Q

where are system-defined zone rules stored

A

/usr/lib/firewalld/zones

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

where are user-defined zone rules stored

A

/etc/firewalld/zones

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

status of firewalld

A

sudo firewall-cmd –state

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

determin the name of the current default zone

A

sudo firewall-cmd –get-default-zone

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

add permanent rule to allow http

A

sudo firewall-cmd –permanent –add-service http
sudo firewall-cmd –reload
sudo firewall-cmd –list-services

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

see services running

A

sudo firewall-cmd –list-services
or
cat /etc/firewalld/zones/public.xml

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

add permanent rule for internal zone with a TCP port range 5901-5910

A

sudo firewall-cmd –add-port 5901-5910/tcp –permanent –zone internal
sudo firewall-cmd –reload

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

change default zone

A

sudo firewall-cmd –set-default-zone internal
confirm:
sudo firewall-cmd –get-default-zone

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

remove http from public zone

A

sudo firewall-cmd –remove-service=http –zone public –permanent

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