While troubleshooting firewall rules on a new application host, you must determine which TCP ports between 8000 and 8050 are listening on the server 10.0.5.20. The command must:
perform a zero-I/O scan that does not transmit data
display verbose output for each probe
skip DNS look-ups to speed execution
use the default TCP protocol
Which single netcat (nc) command meets all of these requirements?
The zero-I/O scan requirement is fulfilled only by the -z option, which tells nc to report connection status without exchanging data. Verbose output is enabled with -v. Skipping DNS resolution is done with -n. Because no -u flag is present, nc uses TCP by default. Port ranges are specified at the end of the command. Therefore the correct syntax is:
nc -z -v -n 10.0.5.20 8000-8050
Why the other commands fail:
nc -l -v -n 10.0.5.20 8000-8050 places nc in listen mode (server) rather than scanning a remote host.
nc -z -u -v -n 10.0.5.20 8000-8050 performs a zero-I/O scan but forces UDP with -u, contradicting the TCP requirement.
nc -v 10.0.5.20 8000-8050 uses TCP and verbose output but lacks -z, so it attempts full connections and sends data, violating the zero-I/O condition.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the '-z' flag do in the netcat command?
Open an interactive chat with Bash
Why is the '-n' option used when using netcat?
Open an interactive chat with Bash
How does netcat distinguish between TCP and UDP scanning?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access