
You use the ping command to send ICMP ECHO_REQUEST packets to network computers, routers, switches and more. Ping is using ICMP protcol. The ping command can not be used to ping a specific port. However, use any one of the following command to see if a port is open or not as follows:
Use telnet command
The syntax is:
Sample outputs:
telnet {host} {port}
telnet www.cyberciti.biz 80
telnet 192.168.2.254 80
Sample outputs:
Trying 192.168.2.254...
Connected to router.
Escape character is '^]'.
^]
telnet> q
Connection closed.
To close your session, press Ctrl+]+q.
Use nc command
The syntax is:
Sample outputs:
nc -vz {host} {port}
nc -vz 192.168.2.254 80
nc -vz www.cyberciti.biz 443
Sample outputs:
found 0 associations found 1 connections: 1: flags=82outif utun1 src 10.8.0.2 port 54997 dst 104.20.187.5 port 443 rank info not available TCP aux info available Connection to www.cyberciti.biz port 443 [tcp/https] succeeded!
Use nmap command
The syntax is:
Sample outputs:
nmap -PNp {port} {host}
nmap -p {port} {host}
nmap -p 22 www.cyberciti.biz
nmap -p 443 192.168.2.254
Sample outputs:
Starting Nmap 7.40 ( https://nmap.org ) at 2017-05-24 01:00 IST
Nmap scan report for router (192.168.2.254)
Host is up (0.00034s latency).
PORT STATE SERVICE
443/tcp open https
Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds
See “Top 32 Nmap Command Examples For Sys/Network Admins” for more info.
Use bash shell
Sample outputs:
Close 22 Open 443
Use nping command
Nping is an open-source tool for network packet generation, response analysis and response time measurement. Nping allows users to generate network packets of a wide range of protocols, letting them tunevirtually any field of the protocol headers. While Nping can be used as a simple ping utility to detect active hosts, it can also be used as a raw packet generator. The syntax is:
Sample outputs:
sudo nping --tcp -p {port} {host}
sudo nping --tcp -p 443 www.cyberciti.biz
Sample outputs:

Không có nhận xét nào :
Đăng nhận xét