ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 299 - XK0-005 discussion

Report
Export

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?

A.

iptables -A POSTROUTING -s 172.17.0.0/16 -o eth0 -j MASQUERADE

Answers
A.

iptables -A POSTROUTING -s 172.17.0.0/16 -o eth0 -j MASQUERADE

B.

firewalld -A OUTPUT -s 172.17.0.0/16 -o eth0 -j DIRECT

Answers
B.

firewalld -A OUTPUT -s 172.17.0.0/16 -o eth0 -j DIRECT

C.

nmcli snasq-traffic eth0 -s 172.17.0.0/16 -j MASQUERADE

Answers
C.

nmcli snasq-traffic eth0 -s 172.17.0.0/16 -j MASQUERADE

D.

ifconfig --nat eth0 -s 172.17.0.0/16 -j DIRECT

Answers
D.

ifconfig --nat eth0 -s 172.17.0.0/16 -j DIRECT

Suggested answer: A

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.

asked 09/10/2024
Joza Pakledinac
29 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first