Packet Filtering Flashcards

1
Q

Outline briefly the three main functions provided by a Packet Filter in Linux

A

Control
– Allow only those packets that you are interested
to pass through.

Security
– Reject packets from malicious outsiders

Watchfulness
– Log packets to/from outside world

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

Which firewall chain is used in IPTABLES for packets that are NOT destined for a local prcess running on the device itself?

A

The FORWARD chain

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

Explain in detail the purpose of the following rule that is defined using IPTABLES format

iptables -A FORWARD –p tcp –s 93.107.200.110 –syn –j DROP

A

This rule is adding a new rule to the FORWARD chain stating that all connection requests passing through from 93.107.200.110 using tcp should be dropped.

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

Explain in detail the purpose of the following rule that is defined using IPTABLES format

iptables -A PREROUTING -t nat -p icmp -d 137.189.89.176\ -j DNAT –to 137.189.89.178

A

This rule is appending a new rule to the PREROUTING chain and specifically to the nat table. All icmp packets destined for X should be redirected to Y instead.

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

What is the difference between DNAT and SNAT in iptables?

A

DNAT changes destination address in packets passing through network
Changes public IP to private IP.

SNAT changes source addresses in packets passing through network.
Changes private IP to public IP

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

When configuring firewall rules for IPTABLES, what do the following mean?

  • A , -I, -D
  • t, -i, -p, -j
A
  • A; Append a new rule to
  • I: Insert a new rule at a certain point in chain
  • D: Delete a rule from chain
  • t: - Table to add rule to
  • i: Input interface
  • p: Specifiying protocol
  • j: Jump target - Specefies which chain to jump to
How well did you know this?
1
Not at all
2
3
4
5
Perfectly