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?
The command "iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT –-to-destination 192.0.2.25:3128" will temporarily redirect all HTTP traffic to the new proxy server at IP address 192.0.2.25 and port 3128. The options used in this command are:
-t nat: Specifies the table (nat) to be used for this operation
-A PREROUTING: Specifies that the rule should be added to the PREROUTING chain, which is used to manipulate incoming packets before they are processed by the routing decision
-p tcp: Specifies that the rule should apply to TCP packets
--dport 80: Specifies that the rule should apply to incoming packets destined for port 80 (the default HTTP port)
-j DNAT: Specifies that the target of the rule should be DNAT (Destination NAT), which rewrites the destination address of a packet
--to-destination 192.0.2.25:3128: Specifies the destination address and port to which incoming packets should be redirected
Note: After executing this command, the administrator should make sure to save the iptables configuration, so that it will persist after a reboot.
This section is not available anymore. Please use the main Exam Page.XK0-005 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
linux_admin
Highly Voted 1 year, 2 months agoAlizadeh
Most Recent 8 months, 3 weeks agoHuckleberry
1 year, 3 months agobjornborg
1 year, 6 months agoNvoid
1 year, 5 months ago