LFCS · Question #221
Which of the following are builtin chains for the iptables nat table? (Select THREE correct answers)
The correct answer is A. OUTPUT D. POSTROUTING E. PREROUTING. This question asks to identify the standard, built-in chains available within the iptables Network Address Translation (NAT) table.
Question
Options
- AOUTPUT
- BINPUT
- CPROCESSING
- DPOSTROUTING
- EPREROUTING
How the community answered
(38 responses)- A89% (34)
- B8% (3)
- C3% (1)
Why each option
This question asks to identify the standard, built-in chains available within the `iptables` Network Address Translation (NAT) table.
The OUTPUT chain in the `nat` table processes packets generated by the local host before they are sent out. This allows for source NAT (SNAT) or destination NAT (DNAT) on locally generated traffic.
The INPUT chain is a built-in chain for the `filter` table, not the `nat` table. It processes packets destined for the local host.
PROCESSING is not a standard built-in chain in any `iptables` table.
The POSTROUTING chain in the `nat` table is used to perform NAT on packets just before they leave the host. This is typically where Source NAT (SNAT) is applied to change the source IP address of outgoing connections.
The PREROUTING chain in the `nat` table is used to perform NAT on packets as soon as they arrive at the host, before routing decisions are made. This is typically where Destination NAT (DNAT) is applied to change the destination IP address of incoming connections.
Concept tested: Iptables NAT table chains
Source: https://linux.die.net/man/8/iptables
Topics
Community Discussion
No community discussion yet for this question.