IPTables Flashcards

Learn basic and moderate things about iptables

1
Q

What is a rule chain ?

A

It is a list of sequential rules. That list may be built-in or defined by the administrator.

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

What are the default chains in iptable ?

A

INPUT, OUTPUT, FORWARD

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

What are the default chains in iptable ?

A

INPUT, OUTPUT, FORWARD

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

Which technology iptables have replaced ?

A

ipfw

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

Which technology have replaced iptables ?

A

NFT

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

What is IP MASQUERADING ?

A

It is a simple and partial implementation of NAT, allowing many Internal hosts to access to internet with a single public IP address.

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

With Netfilter which “subsystem” is the first entry point of a packet.

A

The first subsystem through which an incoming packet pass is the “routing function”.

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

With Netfilter, to which chain the routing function forward accepted packet ?

A

If the packet is to be delivered on the local host, it is transferred to the INPUT chain. Otherwise it is transferred to the FORWARD chain:

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

With Netfilter, what comes after the INPUT chain ?

A

Either a drop, or a local process (logging or destination process), or another user-defined chain

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

With Netfilter, what comes after the FORWARD chain ?

A

Either a drop or the Interface through which the packet must go through.

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

With Netfilter, what comes before the OUTPUT chain ?

A

Only the local process

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

With Netfilter, what comes after the OUTPUT chain ?

A

Either a drop or the Interface through which the packet must go through.

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

What is the main difference between Netfilter (iptables) and IPFW (ipchains) ?

A

It is the packet traversal through the different network functions and built-in chains. With Netfilter, packet always go through only 1 chain (except for loopback packets which are filtered twice). With IPFW, packet can go through 2 or 3 chains.

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

What are the default packet matching tables in Netfilter §

A

filter, nat, mangle, raw, security

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

What is the default table in Netfilter ?

A

filter

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

What are the chains inside the filter table ?

A

INPUT, OUTPUT, FORWARD and user-defined chains.

16
Q

What is the aim of the NAT table ?

A

The NAT table is used to provide NAT and related functions

17
Q

What is the aim of the mangle table ?

A

The mangle table is used when the packet will be altered by the firewall.

18
Q

What is the must classical layout of the iptable command ?

A

iptables

19
Q

Why the option -A is used for in iptables command ?

A

It is use to append a rule onto the end of rule set.

20
Q

What is the in an iptables command ?

A

The matching criteria set the conditions for the rule to be applied

21
Q

What is the target in an iptables command ?

A

The target sets the action to perform on a matching packet. The target can be something as simple as DROP to silently discard the packet or it can send the matching packet to a user-defined chain or it can perform any other configured action in iptables

22
Q

How are tables implemented in Netfilter ?

A

As separate table modules.

23
Q

What are 2 types of the filter table feature extensions ?

A

target extensions and match extensions

24
Q

Example of packet dispositions in target extensions

A

REJECT, BALANCE, MIRROR, TEE, IDLETIMER, AUDIT, CLASSIFY, CLUSTERIP, CONNMARK, TRACE, LOG, ULOG

25
Q

What are the 2 target extensions of the mangle table ?

A

MARK supports assiging a value to the packet’s mark field that iptables maintain.

TOS supports setting the value of TOS field in the IP header.

26
Q

What are the target extensions of the nat table ?

A

They support these forms of NAT:

  • SNAT
  • DNAT
  • MASQUERAD (a specialized form of source NAT for connections that are assigned a temporary, changeable, dynamically assigned IP address)
  • REDIRECT (a specialized form of destination NAT that redirects the packet to the local host regardless of the address in the IP headers destination field)