CompTIA Linux+ XK0-006 (V8) Practice Question

You are converting a Linux host into an edge router. The external interface eth0 receives its public IPv4 address dynamically from the ISP, and the internal subnet 192.168.50.0/24 must reach the Internet through that single address using port translation. Which single iptables command correctly enables Port Address Translation for this situation?

  • iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.50.10

  • iptables -t nat -A POSTROUTING -s 192.168.50.0/24 -o eth0 -j SNAT --to-source 203.0.113.5

  • iptables -t filter -A FORWARD -s 192.168.50.0/24 -o eth0 -j ACCEPT

  • iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot