Iptables Flashcards

1
Q

iptables -I INPUT -s 198.51.100.0 -j DROP

A

Command adds a rule to the beginning of the chain that will drop all packets from the address 198.51.100.0

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

-I option

A

sing a rule with the insertion option will add it to the beginning of a chain and will be applied first. To indicate a specific placement in the chain

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

-s parameter

A

indicates the source.

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

he -j parameter

A

stands for jump. It specifies the target of the rule and what action will be performed if the packet is a match.

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

-p, –protocol

A

The protocol, such as TCP, UDP, etc.

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

-s, –source

A

Can be an address, network name, hostname, etc.

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

-d, –destination

A

An address, hostname, network name, etc.

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

-g, –goto chain

A

Specifies that the processing will continue in a user-specified chain.

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

-i, –in-interface

A

Names the interface from where packets are received.

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

-o, –out-interface

A

Name of the interface by which a packet is being sent.

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

-f, –fragment

A

The rule will only be applied to the second and subsequent fragments of fragmented packets.

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

-c, –set-counters

A

Enables the admin to initialize the packet and byte counters of a rule.

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

Filter table

A

This is the default table. Its built-in chains are:

  1. Input: packets going to local sockets
  2. Forward: packets routed through the server
  3. Output: locally generated packets
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Nat table

A

When a packet creates a new connection, this table is used. Its built-in chains are:

  1. Prerouting: designating packets when they come in
  2. Output: locally generated packets before routing takes place.
  3. Postrouting: altering packets on the way out
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Mangle table

A

Used for special altering of packets. Its chains are:

  1. Prerouting: incoming packets
  2. Postrouting: outgoing packets
  3. Output: locally generated packets that are being altered
  4. Input: packets coming directly into the server
  5. Forward: packets being routed through the server
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Raw table

A

Primarily used for configuring exemptions from connection tracking. The built-in chains are:

  1. Prerouting: packets that arrive by the network interface
  2. Output: processes that are locally generated
17
Q

Security table

A

Used for Mandatory Access Control (MAC) rules. After the filter table, the security table is accessed next. The built-in chains are:

  1. Input: packets entering the server
  2. Output: locally generated packets
  3. Forward: packets passing through the server
18
Q

iptables command: -A –append

A

Add one or more rules to the end of the selected chain.

19
Q

iptables command: -C –check

A

Check for a rule matching the specifications in the selected chain.

20
Q

iptables command: -D –delete

A

Delete one or more rules from the selected chain.

21
Q

iptables command: -F –flush

A

Delete all the rules one-by-one.

22
Q

iptables command: -I –insert

A

Insert one or more rules into the selected chain as the given rule number.

23
Q

iptables command: -L –list

A

Display the rules in the selected chain.

24
Q

iptables command: -n –numeric

A

Display the IP address or hostname and post number in numeric format.

25
Q

iptables command: -N –new-chain

A

Create a new user-defined chain.

26
Q

iptables command: -v –verbose

A

Provide more information when used with the list option.

27
Q

iptables command: -X –delete-chain

A

Delete the user-defined chain.