Testing port connectivity Flashcards
how would I test connectivity on windows
Test-NetConnection
How would I test port connectivity on Linux and mac
netcat
What tool can we run through the command nc, and has two mandatory arguments, a host and a port?
Netcat
What happens if you run:
nc google.com 80
it will try to establish a connection on port 80 to google.com.
What happens if the nc connection fails?
the command will exit
What happens if the nc command succeeds?
you see a blinking cursor waiting for more input.
This is a way for you to actually send application layer dat to the listening service from your own keyboard.
the blinking cursor after an nc command succeeds.
What command can I issue if I’m only curious about the status of a port?
nc with the -z flag
what does the -z flag stand for in nc?
zero input output mode
what does the -v flag stand for?
verbose. Makes the command output useful to human eyes as opposed to non-verbose.
what output type is best for usage and scripts?
non-verbose.
What happens if I issue:
nc -z -v google.com 80
Connection to google.com 80 port [tcp/http] succeeded!
The command’s output will simply tell me if a connection to the port in question is possible or not.
Test-NetConnection google.com
running test connection with only the host specified
It will default to using an ICMP echo request, like Ping does, but displays more data.
What commmand result default displays data including the data link layer protocol being used, computer name, remote address, interface alias, sourceaddress, pingSucceeded, PingReplyDetails
Test-NetConnection
How can I ask Test-NetConnection to test connectivity to a specific port?
Test-NetConnection -port
what are tools used to test network connectivity and communication between devices?
Netcat (nc) for Linux and Macand Test-NetConnection for Windows
What tools check port connectivity at the transport layer, which creates and manages communications in a network through connections?
Netcat and Test-NetConnection