CompTIA Linux+ XK0-005 Practice Question
Which command should be used to verify that the rules currently loaded into the kernel's packet filter are allowing inbound SSH traffic on port 22?
iptables -L
ifconfig
netstat -tuln
nmap -p 22 localhost
🏆 Win a Lifetime Membership! Click here to enter.
Which command should be used to verify that the rules currently loaded into the kernel's packet filter are allowing inbound SSH traffic on port 22?
iptables -L
ifconfig
netstat -tuln
nmap -p 22 localhost
The correct answer is iptables -L
, which lists all current firewall rules set by iptables, including those that pertain to the default port for SSH traffic (port 22). It's important to inspect these rules when SSH traffic is being blocked, as a misconfigured or overly restrictive rule might prevent inbound connections. ifconfig
is used for configuring network interfaces, not for checking firewall rules. The netstat
command is used to display network connections, listening ports, and routing tables, but it doesn’t provide information about firewall rules. nmap
is a network scanner and while it can show which ports are open, it does not display actual firewall rules.
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
All Information Technology Package plans include the following perks and exams .
Our pricing is simple. Full access to all certifications and exams in each package, for one price.
As many practice tests for as many topics as you want.
Use study mode non-stop, no limits.
Access to our AI assistant, Bash, trained to help you pass your exam.
Track your scores over time in study mode and report cards.
See how you improve over time, and where you need to focus.
Access our store with even bigger discounts than before.
Unlimited access to all performance questions and be prepared for the real thing.
All Information Technology Package plans include unlimited access to the following study materials.
Create an account or sign in to access our study materials.