Tuesday, December 10, 2013

Find active ip address on the networ..

 I thought nmap will give you all the active hosts on the network but it was not working. I tried it but finally found it that the host I was working was natted.. lol...

[devi@localhost ~]$ for i in `seq 0  256`
> do
> ping 192.168.10. $i
> done

[devi@localhost ~]$ for i in `seq 2 256`; do ping 192.168.10.$i ; done
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=128 time=7.40 ms
64 bytes from icmp_seq=2 ttl=128 time=0.800 ms
64 bytes from icmp_seq=3 ttl=128 time=0.903 ms

[devi@localhost ~]$ for i in `seq 1 256`
> do
> echo $i
> done

[root@localhost ~]# nmap
-bash: nmap: command not found
[root@localhost ~]# yum search nmap
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

[root@localhost ~]# yum install nmap
Loaded plugins: product-id,

Resolving Dependencies
--> Running transaction check
---> Package nmap.i686 2:5.51-2.el6 will be installed
--> Finished Dependency Resolution

[root@localhost ~]# more /etc/yum.repos.d/file.repo

[root@localhost ~]# nmap -sP

Starting Nmap 5.51 ( http://nmap.org ) at 2013-12-10 19:52 PST
Nmap scan report for
Host is up (0.013s latency).
Nmap scan report for
Host is up (0.0023s latency).
Nmap scan report for

[root@localhost ~]# arp -an
? ( at 00:50:56:f8:39:53 [ether] on eth0
? ( at 00:50:56:c0:00:08 [ether] on eth0
? ( at 00:50:56:f9:55:21 [ether] on eth0
[root@localhost ~]#

No comments:

Post a Comment