Languages
[Edit]
EN

Bash - how to scan open ports with netcat / nc in Debian Linux?

3 points
Created by:
Khloe-Kaiser
578

Using Bash it is possible to scan open ports with netcat (nc command) in Debian family Linux in the following way.

Quick solution:

Hints:

  • 127.0.0.1 should be changed to the scanned computer IP address,
  • to install nc command got to the description in the last section.

 

Reusable script example

Edit

Simple steps:

1. create port_scanner.sh script file:

 

2. assign permissions to execute the script with:

 

3. run port_scanner.sh script with the following command:

Where:

  • 127.0.0.1 should be changed to the scanned computer IP address.

Example output: 

Note: click Ctrl+C to stop script.

 

Netcat installation

Edit

Use the following commands to install nc command:

 

Alternative titles

  1. Bash - check open ports under Linux
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Bash

Bash - scan open ports with netcat / nc in Debian Linux
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join