RSS Amplifier

Bash Prompt · Dec 12, 2023

How to Quickly Check If A Port Is Open With netcat

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

Sometimes you need to check if a port is open and available e.g. not firewalled, from your current location. &#xA; The following netcat command will instantly tell you if you a port is open and you can connect to it on a remove server: &#xA; netcat -w1 -z -v <HOST> <PORT>&#xA; E.g.: &#xA; netcat -w1 -z -v bash-prompt.net 443&#xA; If the port is open you&rsquo;ll get the following response: &#xA; $…

Sometimes you need to check if a port is open and available e.g. not firewalled, from your current location.

The following netcat command will instantly tell you if you a port is open and you can connect to it on a remove server:

netcat -w1 -z -v <HOST> <PORT>

E.g.:

netcat -w1 -z -v bash-prompt.net 443

If the port is open you’ll get the following response:

$ netcat -w1 -z -v bash-prompt.net 443
bash-prompt.net [5.161.150.90] 443 (https) open

And if it’s closed:

Read on bash-prompt.net

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.