Security
A web application listens on TCP port 8080 on the local host. Clients connecting through the public zone use port 80, so incoming TCP port 80 traffic must be forwarded to port 8080 on the same host. Which command adds this rule to the public zone's runtime configuration?
Show the answer
Correct answerB. firewall-cmd --zone=public --add-forward-port=port=80:proto=tcp:toport=8080
--add-forward-port takes the incoming port in port= and the destination port in toport=. The reversed version would send port 8080 traffic to port 80, and toaddr expects an IP address, not a port. --add-port only opens a port and has no port-mapping syntax.