Gen 04

Controllare e chiudere le porte aperte

Tag: Appuntifenix @ 21:08

Per controllare quali porte sono aperte, è possibile utilizzare il tool nmap, uno scanner di rete molto efficiente e potente.
Ad sempio, per controllare le porte aperte in locale, basta aprire un terminale e digitare:

[email protected]:~$ nmap localhost

Che naturalmente si generalizza in :

[email protected]:~$ nmap INDIRIZZO_IP

L’ output, potrebbe essere qualcosa di simile a questo:

[email protected]:~$ nmap localhost

Starting Nmap 5.00 ( ) at 2010-01-04 12:45 EET
Interesting ports on localhost (
Not shown: 1711 closed ports
25/tcp open smtp
80/tcp open http

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

Per chiudere le porte trovate, occorre da root utilizzare il seguente comando, nell’ esempio la porta del web server:

fuser -k 80/tcp

9 Responses to “Controllare e chiudere le porte aperte”

  1. Mariana says:

    the two -v tags makes the scan give you more information as it goes. the -v is for voberse, and it can be repeated.the -P0 means that I do not want nmap to ping the target first. If this is not set Nmap will attempt to ping the target first in order to determine if the host is up. SInce many systems block pings, this can often cause a false negative. -P0 makes sure that it assumes the host is up by not pinging first.

  2. says:

    That’s the perfect insight in a thread like this.

  3. says:

    Heck yeah bay-bee keep them coming!

  4. says:

    This article is a home run, pure and simple!

  5. says:

    Everyone would benefit from reading this post

  6. says:

    Damn, I wish I could think of something smart like that!

  7. says:

    Woah nelly, how about them apples!

  8. says:

    We’ve arrived at the end of the line and I have what I need!

  9. says:

    Thinking like that shows an expert’s touch

Leave a Reply

Hello !