CompTIA Linux+ XK0-005 – Question004

A Linux administrator needs to redirect all HTTP traffic temporarily to the new proxy server 192.0.2.25 on port 3128. Which of the following commands will accomplish this task?

A.
iptables -t nat -D PREROUTING -p tcp –sport 80 -j DNAT – -to-destination 192.0.2.25:3128
B. iptables -t nat -A PREROUTING -p top –dport 81 -j DNAT -to-destination 192.0.2.25:3129
C. iptables -t nat -I PREROUTING -p top –sport 80 -j DNAT -to-destination 192.0.2.25:3129
D. iptables -t nat -A PREROUTING -p tcp –dport 80 -j DNAT -to-destination 192.0.2.25:3128

Correct Answer: D