Sec. 36 Firewalls Flashcards

1
Q

firewalls are used to _______ ______ ________ and _________ access to your systems and local ________.

A

firewalls are used to control both incoming and outgoing access to your systems and local network.

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

Packets are made up of what the items?

A

Header , footer , payload

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

What information does the header and footer contain?

A
  • destination - source addresses - type of packing it is - which protocol it obeys - and other meta data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Almost all firewalls are based on _______ ________?

A

Packet Filtering .

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

Packet filtering intercepts packets at one more stages in the network transmission , including ___________, ___________, _____________, and ___________.

A

application, transport, network, and datalink.

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

Firewalls establish rules by which each packet may be :

A
  • accepted or rejected based on content, addresses -mangled in some way -redirected to another address -inspected for security reasons.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the two main utilities of the firewalld package?

A
  1. firewall-cmd 2. firewall-config.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

where are the configuration files for firewalld located? which one should the system admin use?

A
  1. /etc/firewalld, /usr/lib/firewalld 2. /etc/fireealld. why ? because the /etc/firewalld will override the other file rules.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

firewalld is the _________ __________ ________.

A

Dynamic firewall manager

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

firewalld utilizes ________/______ zones.

A

network/firewall zones.

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

firewalld also separates _______ and _________ changes to configuration files .

A

runtime , permanent(persistent)

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

what is the command line tool for firewalld?

A
  1. firewall-cmd.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

if i would like help with the firewall-cmd command what could i type in the command line?

A

$ firewall-cmd –help

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

it is an error to run both _______ and _________ at the same time.

A

firewalld and iptables

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

using the cmd line how would i enable and start the firewalld service?

A

to enable : - $ sudo systemctl enable/disable to start: -& sudo systemctl start/stop

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

using the cmd line what are two ways that i could see the status of firewalld ?

A
  1. $ sudo systemctl status firewalld 2. $ sudo firewall-cmd –state
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

firewalld works with ______.

A

zones .

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

what does the zone: drop do w.r.t. firewalld ?

A

Zone: Drop - all incoming packets are dropped with no reply. only outgoing connections are permitted.

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

What does the zone: block do w.r.t. firewalld?

A

Zone: Block – all incoming connections are rejected. The only permitted connections are those from within the system

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

Define the Zone : Public w.r.t. firewalls

A

Zone: Public – Do not trust any computers on the network; only certain consciously selected incoming connections are permitted.

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

Define the zone: external w.r.t firewalls

A

Zone: External – used when masquerading is being used. such as in routers. Trust levels are the same as public.

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

Define the zone: dmz w.r.t firewalls

A

Zone: dmz (Demilitarized Zone) – used when access to some (but not all) services are allowed to the public. only particular incoming connections are allowed.

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

what is the zone: work w.r.t firewalls ?

A

Zone: work –trust (but not completely) connected nodes to be harmful. Only certain incoming connections are allowed.

24
Q

define the zone: home wrt firewalls ?

A

Zone: Home – you mostly trust the other network nodes, but still select which incoming connections are allowed.

25
Q

define the zone : trusted wrt firewalls

A

Zone: trusted – all network nodes are allowed.

26
Q

Information: ———————– on system installation, most , if not all Linux distributions , will select the public zone as default for all interfaces.

A

Information: ——————————— the differences between some of the zones we mentioned are not obvious, and we do not need to go into that much detail here. but note that one should not use more open zone than is nesseary.

27
Q

what does the command $ sudo firewall-cmd –get-default-zone return?

A

the default zone.

28
Q

to obtain a list of zones that are in use i can run the following command $ sudo firewall-cmd –get-active-zones .

A

if i would like to list all available zones i can run the command $ sudo firewall-cmd –get-zones

29
Q

if i would like to obtain the list of the zones being used w.r.t firewalls. what command could I use

A

Command: >>> $ sudo firewall-cmd –get-active-zones

30
Q

What command could i run if i want to list all available zones?

A

Command: >>> % sudo firewall-cmd –get-zones

31
Q

Information: ——————————————- if i would like to find out which zone is associated with a particular interface I could run the command. >>>$ sudo firewall-cmd –get-zone-of-interface= eno1 return >>> public. –where the eno1 is the interface in question. – the zone of eno1 is public .

A

Information: ————————————- if I would like to change the zone of a particular interface permanently I would run the following command: >>$ sudo firewall-cmd –permanent –zone=inteatrnal –change-interface=eno1. return >>> success – where the interface in question is en01 – the zone it was changed to was internal .

32
Q

How would I find out what zone was associated with the interface eno1?

A

Command: >>>$ sudo firewall-cmd –get-zone-of-interface=eno1.

33
Q

Information: ——————————- controlling firewalld is done through the firewall-cmd program. More detailed information can be obtained with: >>>$ man firewalld-cmd

A

Education: ——————————– Any zone can be bound not just to a network interface, but also to particular network addresses. A packet is associated with a zone if: – It comes from a source address already bound to the zone;or it not –it comes from an interface bound to the zone. Any packet not fitting the above criteria is assigned to the default zone(i.e. usually public.)

34
Q

A packet is associated with a zone if ….? any packet not fitting the answer to the above question is assigned to what zone?

A
  1. a. it comes from a source address already bound to the zone. ; or if not. b. it comes from an interface bound to a zone. 2. default zone ( usually public)
35
Q

Education: ——————————————— To assign a source to a zone (permanetly): >>>& sudo firewall-cmd –permanent –zone=trusted –add-source=192.168.1.0/24 # this says anyone with the ip address of 192.168.1.x will be added to the trusted zone.

A

Education: —————————————– I can list the sources bound to a zone with: >>>$ sudo firewall-cmd –permanent –zone=trusted –list-sources # if I were to leave out the –permanent option the change would only last as long as the runtime of the computer.

36
Q

How would I assign a source to a zone(permanently)?

A

>>> $ sudo firewall-cmd –permanent –zone=trusted –add-source=198.168.1.0/24

37
Q

If I would like to see all the available services connected to firewalld what command can I use?

A

>>>$ sudo firewall-cmd –get-services # this command will show me all services available.

38
Q

what command could I use to see the services currently accessible in a particular zone?

A

>>> $ sudo firewall-cmd –list-services –zone=public # Will return the services accessible in the public zone.

39
Q

If I would like to add a service to a zone, what command could I use?

A
  • $ sudo firewall-cmd –permanent –zone=home –add-service=dhcp
  • $ sudo firewall-cmd –reload # the last command will make the change effective from the first command.
40
Q

If I would like to add a new services to firewalld what configuration file would I update?

A

/etc/firewalld/services

41
Q

If I would like to add a port to the zone home, how would i use the firewall-cmd program?

A

>>> $ sudo firewall-cmd –zone=home –add-port=21/tcp

42
Q

If would would like to ascertain what a certain port corresponds to what file could I look up?

A

/etc/services

43
Q

how would I use the firewall-cmd program to list what ports are associated with the zone home?

A

>>> $ sudo firewall-cmd –zone=home –list-ports

44
Q

how would I show my current ip address ?

A

>>> $ ip addr show [put device name here] or >>> ifconfig [put device name here]

45
Q

how would I a look up the default route?

A

>>> $ ip route or >>> $ route -n

46
Q

what command would i use to copy a file?

A

command : cp

47
Q

what is firewall-cmd?

A

firewall-cmd is the command line client of the firewalld daemon

48
Q

firewall-cmd acts as an _________ to manage runtime and permanent configuration

A

interface

49
Q

can firewall-cmd make permanent changes ?

A

yes

50
Q

firewall-cmd –state ; what does this do?

A

checks whether the firewall daemon is active

-returns 0 if its active

51
Q

what is the purpose of the following comand : firewall-cmd –reload

A

reloads firewall rules and keep state information -permanent config will become runtime conf.

52
Q

what is the purpose of the following command: firewall-cmd –runtime-to-permanent runtim

A

saves runtime config and makes it permanent

53
Q

what is the purpose of the following command : firewall-cmd –check-config

A

runs checks on permanent configuration.

54
Q

what is the purpose of the following command : firewall-cmd –get-log-denied

A

prints the log denied settings

55
Q

what is the purpose of the following command : firewall-cmd –permanentq

A

can be used to set options permanently

*changes will be effective after restart /reload

56
Q

what is the purpose of the following command : firewall-cmd –get-default-zone

A

prints default zone for connections and interfaces

57
Q

what is the purpose of the following command: firewall-cmd –set-default-zone=zone

A

set default zone for connections and interfaces . where no zone is selected.