ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 103 - XK0-005 discussion

Report
Export

A cloud engineer needs to block the IP address 192.168.10.50 from accessing a Linux server. Which of the following commands will achieve this goal?

A.
iptables -F INPUT -j 192.168.10.50 -m DROP
Answers
A.
iptables -F INPUT -j 192.168.10.50 -m DROP
B.
iptables -A INPUT -s 192.168.10.30 -j DROP
Answers
B.
iptables -A INPUT -s 192.168.10.30 -j DROP
C.
iptables -i INPUT --ipv4 192.168.10.50 -z DROP
Answers
C.
iptables -i INPUT --ipv4 192.168.10.50 -z DROP
D.
iptables -j INPUT 192.168.10.50 -p DROP
Answers
D.
iptables -j INPUT 192.168.10.50 -p DROP
Suggested answer: B

Explanation:

The correct command to block the IP address 192.168.10.50 from accessing a Linux server is iptables -A INPUT -s 192.168.10.50 -j DROP. This command appends a rule to the INPUT chain that matches the source address 192.168.10.50 and jumps to the DROP target, which discards the packet. The other commands are incorrect because they either have invalid syntax, wrong parameters, or wrong order of arguments. Reference: CompTIA Linux+ Study Guide, Fourth Edition, page 457-458.

asked 02/10/2024
Amirouche Rahani
48 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first