Scan specific ports by nmap

How to Scan specific ports by nmap

 

Example 1: Scan port 80

[root@localhost ~]# nmap -p 80 98.139.183.24
Starting Nmap 5.51 ( http://nmap.org ) at 2012-12-09 23:43 PST
Nmap scan report for ir2.fp.vip.bf1.yahoo.com (98.139.183.24)
Host is up (0.36s latency).
PORT STATE SERVICE
80/tcp open httpNmap done: 1 IP address (1 host up) scanned in 1.06 seconds
[root@localhost ~]#

Example 2: Scan port 80,443

[root@localhost ~]# nmap -p 80,443 98.139.183.24
Starting Nmap 5.51 ( http://nmap.org ) at 2012-12-09 23:44 PST
Nmap scan report for ir2.fp.vip.bf1.yahoo.com (98.139.183.24)
Host is up (0.35s latency).
PORT STATE SERVICE
80/tcp open http
443/tcp open httpsNmap done: 1 IP address (1 host up) scanned in 0.94 seconds
[root@localhost ~]#

Example 3: Scan all ports

[root@localhost ~]# nmap -p “*” 98.139.183.24
Starting Nmap 5.51 ( http://nmap.org ) at 2012-12-09 23:46 PST
Nmap scan report for ir2.fp.vip.bf1.yahoo.com (98.139.183.24)
Host is up (0.31s latency).
Not shown: 4236 filtered ports
PORT STATE SERVICE
80/tcp open http
443/tcp open httpsNmap done: 1 IP address (1 host up) scanned in 265.58 seconds

Example 4: Scan UDP Ports: 53,111,137, TCP21-25, 80,139,8080

[root@localhost ~]# nmap -p U:53,111,137,T:21-25,80,139,8080 8.8.8.8
Starting Nmap 5.51 ( http://nmap.org ) at 2012-12-10 00:01 PST
Nmap scan report for google-public-dns-a.google.com (8.8.8.8)
Host is up (0.15s latency).
PORT STATE SERVICE
21/tcp filtered ftp
22/tcp filtered ssh
23/tcp filtered telnet
24/tcp filtered priv-mail
25/tcp filtered smtp
80/tcp filtered http
139/tcp filtered netbios-ssn
8080/tcp filtered http-proxyNmap done: 1 IP address (1 host up) scanned in 2.79 seconds
[root@localhost ~]#

That’s all. Thanks for using IThelpblog.com.

Tags:  

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>