Home > Others > Checking port available or not instead of using `telnet`.

Checking port available or not instead of using `telnet`.

Checking port available on a remote machine using nc command instead of telnet.
Same command can be used to check on a remote server as well, change the 127.0.0.1 with IP address of the server.
Single Port Check
nc -zv 127.0.0.1 80
Range of ports:
nc -zv 127.0.0.1 20-30
Output :
root@server ~]# nc -zv 127.0.0.1 443
Connection to 127.0.0.1 443 port [tcp/https] succeeded!
[root@server ~]# nc -zv 127.0.0.1 443-445
Connection to 127.0.0.1 443 port [tcp/https] succeeded!
Connection to 127.0.0.1 444 port [tcp/snpp] succeeded!
nc: connect to 127.0.0.1 port 445 (tcp) failed: Connection refused
[root@server ~]#

from Blogger http://ift.tt/1RQV3r9
via IFTTT

Advertisements
Categories: Others Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: