nerdexam
CompTIA

XK0-005 · Question #10670

A systems administrator is configuring a Linux system so that network traffic from the internal network 172.17.0.0/16 going out through the eth0 interface would appear as if it was sent directly…

The correct answer is A. iptables -A POSTROUTING -s 172.17.0.0/16 -o eth0 -j MASQUERADE. The command iptables -A POSTROUTING -s 172.17.0.0/16 -o eth0 -j MASQUERADE configures Network Address Translation (NAT) using iptables. This ensures that traffic from the internal network (172.17.0.0/16) going out through the eth0 interface will appear to be originating from…

System Management

Question

A systems administrator is configuring a Linux system so that network traffic from the internal network 172.17.0.0/16 going out through the eth0 interface would appear as if it was sent directly from this interface. Which of the following commands will accomplish this task?

Options

  • Aiptables -A POSTROUTING -s 172.17.0.0/16 -o eth0 -j MASQUERADE
  • Bfirewalld -A OUTPUT -s 172.17.0.0/16 -o eth0 -j DIRECT
  • Cnmcli snasq-traffic eth0 -s 172.17.0.0/16 -j MASQUERADE
  • Difconfig --nat eth0 -s 172.17.0.0/16 -j DIRECT

How the community answered

(37 responses)
  • A
    76% (28)
  • B
    3% (1)
  • C
    8% (3)
  • D
    14% (5)

Explanation

The command iptables -A POSTROUTING -s 172.17.0.0/16 -o eth0 -j MASQUERADE configures Network Address Translation (NAT) using iptables. This ensures that traffic from the internal network (172.17.0.0/16) going out through the eth0 interface will appear to be originating from the eth0 IP address. This is commonly used for internet-sharing or NAT setups in Linux.

Topics

#iptables#NAT#Masquerading#Network Configuration

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice