A DevOps engineer needs to allow incoming traffic to ports in the range of 4000 to 5000 on a Linux server. Which of the following commands will enforce this rule?
A.
iptables -f filter -I INPUT -p tcp --dport 4000:5000 -A ACCEPT
B.
iptables -t filter -A INPUT -p tcp --dport 4000:5000 -j ACCEPT
C.
iptables filter -A INPUT -p tcp --dport 4000:5000 -D ACCEPT
D.
iptables filter -S INPUT -p tcp --dport 4000:5000 -A ACCEPT
The command iptables is used to manage the rules in the Linux kernel's firewall. The options used in the command determine how the rule will be enforced. In the case of option B, -t filter specifies that the rules should be applied to the filter table, which is used for packet filtering. The -A INPUT option specifies that the rule should be appended to the INPUT chain, which is used for incoming traffic. The -p tcp option specifies that the rule should only apply to TCP traffic, and the --dport 4000:5000 option specifies that the rule should only apply to incoming traffic to ports in the range of 4000 to 5000. The -j ACCEPT option specifies that the matching traffic should be accepted, allowing it to enter the system.
upvoted 5 times
...
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 8 months, 4 weeks ago