2

Troubleshooting with nmap

 2 years ago
source link: https://www.vultr.com/docs/troubleshooting-with-nmap
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
<?xml encoding="utf-8" ??>

nmap is a useful tool to verify a server is up and the applications are listening for connections. Here are some common troubleshooting scenarios.

Inspect specific server ports

From an outside workstation, scan your server's IP address nmap. These are useful command switches:

-Pn : Treat all hosts as online and skip host discovery.
-p : List of ports to scan.
--reason : Display the reason a port is in a particular state.

Example: To scan ports 22, 53, 80, and 443 on IP address 192.0.2.2:

$ nmap -Pn -p 22,53,80,443 --reason 192.0.2.2

PORT    STATE    SERVICE REASON
22/tcp  open     ssh     syn-ack
53/tcp  filtered domain  no-response
80/tcp  filtered http    no-response
443/tcp filtered https   no-response

Nmap done: 1 IP address (1 host up) scanned in 12.64 seconds

This example shows ssh is available on port 22, while dns (53), http (80), and https (443) are not responding. If nmap reports the application port is open, it is not a firewall problem. If you have errors connecting, this could indicate a problem at a higher level in the application.

Want to contribute?

You could earn up to $600 by adding new articles


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK