DEV Community

webduvet
webduvet

Posted on

3

Scanning for open ports

lsof

list of open files

lsof -i -P -n | grep LISTEN
Enter fullscreen mode Exit fullscreen mode

netstat

Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships

netstat -tulpn | grep LISTEN
Enter fullscreen mode Exit fullscreen mode

ss

utility to investigate sockets

ss -tulpn | grep LISTEN
Enter fullscreen mode Exit fullscreen mode

nmap

network exploration tool, port scanner

nmap -open 192.168.3.34
Enter fullscreen mode Exit fullscreen mode

scanning open ports on remote IP address

nc -zv 192.168.3.34 2>&1 1-1024 | grep -v refused
Enter fullscreen mode Exit fullscreen mode

this scans open ports in the range of 1 to 1024 on the above IP address.
redirects the error output to standard outoput and matches all lines except refused

scanning all open ports on the subnet using nmap

nmap -n 192.168.3.0/24
Enter fullscreen mode Exit fullscreen mode

Sources

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more