How Destination NAT (DNAT) Handles TCP SYN Packets
Network Topology
A client on the internet sends a TCP SYN packet to 10.0.1.10:8080. The router receives it on eth0. According to the exhibit, what will happen to the packet?
Quick Answer
The answer is that the TCP SYN packet is forwarded to 10.0.2.5:80 via eth1 with the source IP unchanged. This occurs because the router applies a Destination NAT (DNAT) rule that rewrites the packet’s destination IP and port from 10.0.1.10:8080 to the internal server’s address, while leaving the source address untouched—DNAT only modifies the destination, not the origin. On the LPIC-2 exam, this scenario tests your understanding of stateless NAT behavior in a port forwarding context; a common trap is assuming the source IP is also translated, which would require Source NAT (SNAT) or masquerading. Remember that DNAT is a one-way street: it changes where the packet is going, not where it came from. For the exam, keep this memory tip in mind: “DNAT changes the ‘to,’ not the ‘from’.”
⚠ Common exam trap
A common mix-up: candidates confuse DNAT with SNAT and assume the source IP is also changed, or they think the packet is dropped because the destination IP is not directly connected to the router's LAN interface.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The packet is forwarded to 10.0.2.5:80 via eth1, with source IP unchanged.
The router performs destination NAT (DNAT) on the packet, changing the destination from 10.0.1.10:8080 to 10.0.2.5:80, and forwards it out eth1 with the source IP unchanged. Therefore, option D is correct. Option A is incorrect because the packet is not dropped. Option B is incorrect because the packet is not simply forwarded to the default gateway; the DNAT rule overrides the destination. Option C is incorrect because no source NAT (SNAT) is performed, so the source IP remains the same.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The packet is dropped because the destination IP is not directly connected.
Why it's wrong here
DNAT changes the destination to a directly connected network (10.0.2.0/24).
- ✗
The packet is forwarded to 10.0.1.1 because it is the default gateway.
Why it's wrong here
After DNAT, the destination is 10.0.2.5, so routing will send it to that network, not the default gateway.
- ✗
The packet is forwarded to 10.0.2.5:80 via eth1, with source IP changed to 10.0.2.20.
Why it's wrong here
MASQUERADE would only change source if the packet originated from 10.0.2.0/24.
- ✓
The packet is forwarded to 10.0.2.5:80 via eth1, with source IP unchanged.
Why this is correct
As described, DNAT changes destination, routing sends it to eth1, and no SNAT is applied.
Visual reference
Go deeper
Related to this question
About these practice questions
This LPIC-2 question is part of Courseiva's 507-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on LPIC-2
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. You are a network administrator for a medium-sized company. The company has a Linux server acting as a router/firewall with three network interfaces: eth0 (public, 203.0.113.2/24, gateway 203.0.113.1), eth1 (DMZ, 10.0.1.1/24), and eth2 (internal, 192.168.1.1/24). The DMZ hosts a web server with IP 10.0.1.100, and the internal network has client machines. The firewall rules are currently set to default DROP on INPUT and FORWARD, ACCEPT on OUTPUT. The administrator wants to allow internal clients (192.168.1.0/24) to access the web server (10.0.1.100) on port 80. Additionally, the administrator wants to allow external users (from the internet) to access the web server's public IP (203.0.113.2) on port 80, which should be DNATed to 10.0.1.100. The administrator has enabled IP forwarding and added the following rules: iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to-destination 10.0.1.100:80 iptables -A FORWARD -i eth0 -o eth1 -p tcp --dport 80 -j ACCEPT iptables -A FORWARD -i eth1 -o eth0 -p tcp --sport 80 -j ACCEPT Internal clients cannot access the web server. External users are able to access the web server successfully. What is the most likely reason internal clients cannot access the web server?
hard- ✓ A.The DNAT rule does not apply to traffic coming from the internal network because it is not received on eth0.
- B.The web server cannot route back to the internal clients because it is in the DMZ.
- C.The FORWARD rule for return traffic does not match because the destination is the client.
- D.IP forwarding is not enabled for the internal interface.
Why A: The DNAT rule is placed in the PREROUTING chain of the nat table, which only processes packets arriving on the specified interface (eth0). Internal clients (192.168.1.0/24) sending traffic to the web server (10.0.1.100) do not enter via eth0; they are routed through eth2. Therefore, the DNAT rule never matches their packets, and the destination remains 10.0.1.100, which is directly reachable without NAT. However, the FORWARD rules only allow traffic from eth0 to eth1 and back, so internal client traffic from eth2 to eth1 is implicitly dropped by the default FORWARD policy, causing the failure.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-2 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-2 exam.