Which command adds a NAT rule using MASQUERADE for traffic leaving through WAN?

Study for the MTCNA Foundation Exam. Prepare with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your certification!

Multiple Choice

Which command adds a NAT rule using MASQUERADE for traffic leaving through WAN?

Explanation:
Masquerade is used for outbound traffic to the Internet, translating internal source addresses to the router’s WAN IP so return traffic can come back properly. To apply this to traffic leaving the network, you must use the srcnat chain and specify the interface through which traffic exits. The rule should target traffic that goes out through the WAN, with the masquerade action to perform the dynamic SNAT. Therefore, the command that fits is one that adds a NAT rule with chain=srcnat, out-interface=wan, and action=masquerade. The other options mix up the direction or the type of NAT: using in-interface=wan NATs inbound traffic from the Internet, dstnat is for port forwarding inbound to internal hosts, and out-interface=LAN targets traffic leaving toward the LAN, not toward the Internet.

Masquerade is used for outbound traffic to the Internet, translating internal source addresses to the router’s WAN IP so return traffic can come back properly. To apply this to traffic leaving the network, you must use the srcnat chain and specify the interface through which traffic exits. The rule should target traffic that goes out through the WAN, with the masquerade action to perform the dynamic SNAT.

Therefore, the command that fits is one that adds a NAT rule with chain=srcnat, out-interface=wan, and action=masquerade. The other options mix up the direction or the type of NAT: using in-interface=wan NATs inbound traffic from the Internet, dstnat is for port forwarding inbound to internal hosts, and out-interface=LAN targets traffic leaving toward the LAN, not toward the Internet.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy