FirewallD Flashcards

1
Q

To Enable FirewallD

A

systemctl enable

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

To disable FirewallD

A

systemctl disable

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

To start Firewalld

A

systemctl start

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

To stop firewallD

A

systemctl stop

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

To view the status of FirewallD

A

firewall-cmd –state

or

systemctl status firewalld

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

To see the default zone

A

firewall-cmd –get -default-zone

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

To change the default zone

A

firewall-cmd –set-default-zone= work

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

To see the zones used by the network interface

A

firewall-cmd –get -active-zones

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

To see the area of an interface

A

firewall-cmd –get -zone-of-interface=eth0

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

To change the zone of an interface via firewalld

A

firewall-cmd –zone= work –change-interface=eth0

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

To change the zone of an interface via Network manager

A

nmcli connection modify eth0 connection.zone work

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

To see the zones used by the network interfaces

A

firewall-cmd –get -active-zones

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

To see the configuration of a specific zone

A

firewall -cmd –zone=public –list -all

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

To see the configuration of all zones

A

firewall-cmd –list -all-zones

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

Create a new area

A

firewall-cmd –permanent –new-zone docker

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

where can you find the files for default configurations?

A

/ usr /lib /firewalld /services

17
Q

Where can you find custom configuration files?

A

/etc / firewalld / services

18
Q

To see existing services

A

firewall-cmd –get -services

19
Q

To authorize service on a zone

A

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

or

firewall-cmd –zone=work – add -service=http –permanent

20
Q

How to remove a service from a zone

A

firewall -cmd –zone= work –remove -service ==http

or

firewall -cmd –zone= work –remove -service ==http –permanent

21
Q

To authorize a port on a zone

A

firewall-cmd –zone= work – add -port=2222/ tcp

or

firewall-cmd –zone= work – add -port=2222 /tcp –permanent

and

firewall-cmd –zone= work – add -port=126/ udp

or

firewall-cmd –zone= work – add -port=126/ udp –permanent

22
Q

To remove a port from a area

A

firewall-cmd –zone= work – remove -port=2222/ tcp

or

firewall-cmd –zone= work – remove -port=2222/ tcp – permanent

23
Q

To redirect one port to another on the same machine

A

firewall-cmd –zone= work – add - forward -port=port=80 :proto=tcp:toport =9000

24
Q

To forward a port to another machine

A

firewall-cmd –zone= work –add -forward - port=port=80:proto= tcp:toport =8080:toaddr=192.168.10.5

25
Q

To enable masquerade

A

firewall-cmd –zone=public –add -masquerade –permanent

26
Q

To validate the masquerade info

A

cat /proc /sys /net/ipv4/ ip_forward 0

0 = not enabled, 1 = enabled

27
Q

To view the list of ICMP messages

A

firewall-cmd –get-icmptypes

28
Q

To block an Icmp message (ping)

A

firewall-cmd –zone= work – query - icmp -block = echo-request – permanent

firewall-cmd –zone= work –query icmp -block= echo-reply –permanent