IPTables Flashcards
Learn basic and moderate things about iptables
What is a rule chain ?
It is a list of sequential rules. That list may be built-in or defined by the administrator.
What are the default chains in iptable ?
INPUT, OUTPUT, FORWARD
What are the default chains in iptable ?
INPUT, OUTPUT, FORWARD
Which technology iptables have replaced ?
ipfw
Which technology have replaced iptables ?
NFT
What is IP MASQUERADING ?
It is a simple and partial implementation of NAT, allowing many Internal hosts to access to internet with a single public IP address.
With Netfilter which “subsystem” is the first entry point of a packet.
The first subsystem through which an incoming packet pass is the “routing function”.
With Netfilter, to which chain the routing function forward accepted packet ?
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:
With Netfilter, what comes after the INPUT chain ?
Either a drop, or a local process (logging or destination process), or another user-defined chain
With Netfilter, what comes after the FORWARD chain ?
Either a drop or the Interface through which the packet must go through.
With Netfilter, what comes before the OUTPUT chain ?
Only the local process
With Netfilter, what comes after the OUTPUT chain ?
Either a drop or the Interface through which the packet must go through.
What is the main difference between Netfilter (iptables) and IPFW (ipchains) ?
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.
What are the default packet matching tables in Netfilter §
filter, nat, mangle, raw, security
What is the default table in Netfilter ?
filter
What are the chains inside the filter table ?
INPUT, OUTPUT, FORWARD and user-defined chains.
What is the aim of the NAT table ?
The NAT table is used to provide NAT and related functions
What is the aim of the mangle table ?
The mangle table is used when the packet will be altered by the firewall.
What is the must classical layout of the iptable command ?
iptables
Why the option -A is used for in iptables command ?
It is use to append a rule onto the end of rule set.
What is the in an iptables command ?
The matching criteria set the conditions for the rule to be applied
What is the target in an iptables command ?
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
How are tables implemented in Netfilter ?
As separate table modules.
What are 2 types of the filter table feature extensions ?
target extensions and match extensions
Example of packet dispositions in target extensions
REJECT, BALANCE, MIRROR, TEE, IDLETIMER, AUDIT, CLASSIFY, CLUSTERIP, CONNMARK, TRACE, LOG, ULOG
What are the 2 target extensions of the mangle table ?
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.
What are the target extensions of the nat table ?
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)