Re: [gentoo-user] [OT] network discovery tools

2011-05-26 Thread Florian Philipp
Am 25.05.2011 21:45, schrieb Harry Putnam:
 There must be a number of people who post here that have had to do
 this problem.
 
 Discover the addresses of computers on a home network that have
 connected by way of DHCP.  For example: Several wireless connections.
 
 I've used static IPS for around 10 yrs, always seemed handier for
 things like ssh between home lan computers. 
 
 But recently started using DHCP for wireless connections.  It must be
 such a popular method for some reason.
 
 But when you do it that way, and say want to VNC or ssh or the like to
 something connected by a dhcp serving WAP then how do you find the
 address?
 
 That is, besides something like accessing the WAP and checking the IPs
 connected to it.
 
 Is there some quick and sure way to discover any IPs on the home lan?
 
 Some kind of mapper tool?
 
 

While I personally prefer a combined DHCP+DNS server like dnsmasq, you
can also take a look at the whole Zeroconf/MDNS/Avahi/Bonjour stack.

I'm not really sure if you can configure common devices and Linux PCs to
use the DNS server for internet addresses and MDNS for local ones. In
theory, it should be possible since you can distinguish them (local
addresses should not be fully qualified _or_ have the domain .local).

net-misc/mDNSResponder, sys-auth/nss-mdns and net-dns/avahi are probably
good starting points.

Hope this helps,
Florian Philipp



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] [OT] network discovery tools

2011-05-26 Thread Mick
On Thursday 26 May 2011 17:24:05 Florian Philipp wrote:
 Am 25.05.2011 21:45, schrieb Harry Putnam:
  There must be a number of people who post here that have had to do
  this problem.
  
  Discover the addresses of computers on a home network that have
  connected by way of DHCP.  For example: Several wireless connections.
  
  I've used static IPS for around 10 yrs, always seemed handier for
  things like ssh between home lan computers.
  
  But recently started using DHCP for wireless connections.  It must be
  such a popular method for some reason.
  
  But when you do it that way, and say want to VNC or ssh or the like to
  something connected by a dhcp serving WAP then how do you find the
  address?
  
  That is, besides something like accessing the WAP and checking the IPs
  connected to it.
  
  Is there some quick and sure way to discover any IPs on the home lan?
  
  Some kind of mapper tool?
 
 While I personally prefer a combined DHCP+DNS server like dnsmasq, you
 can also take a look at the whole Zeroconf/MDNS/Avahi/Bonjour stack.
 
 I'm not really sure if you can configure common devices and Linux PCs to
 use the DNS server for internet addresses and MDNS for local ones. In
 theory, it should be possible since you can distinguish them (local
 addresses should not be fully qualified _or_ have the domain .local).
 
 net-misc/mDNSResponder, sys-auth/nss-mdns and net-dns/avahi are probably
 good starting points.

netdiscover seems to do exactly what the OP asked for, although I have used 
arping and a couple of scripts I found on the net and modified them.

The first looks like this:
=
#!/usr/bin/env bash

quit_on_found=0
packet_count=2
subnet=
verbose=-q

usage()
{
cat  EOF
find_ip 1.0 Robin Wood (dni...@gmail.com) (www.digininja.org)

Find used and unused IPs on a network you don't haven an IP address on

usage: $0 options

OPTIONS:
-hShow this message
-c packet count The number of ping packets to send, default 2
-s subnet   First 3 parts of the subnet to test, default 
192.168.0
-qQuit when found first free address, default keep 
going
-vVerbose

EOF
}

have_arping=`which arping`

if [[ $have_arping ==  ]]
then
cat  EOF
usage: $0 options

You must have arping installed and in the current path for this scanner to 
work
EOF
exit 1
fi

while getopts  :hvs:qc: flag
do
case $flag in
h)
usage
exit 1
;;
c)
packet_count=$OPTARG
;;
q)
quit_on_found=1
;;
s)
subnet=$OPTARG
;;
v)
verbose=
;;
?)
usage
exit 1
;;
esac
done

if [[ $subnet ==  ]]
then
cat  EOF
usage: $0 options

You must provide a subnet
EOF
exit 1
fi

if [[ $verbose ==  ]]
then
if [[ $quit_on_found == 1 ]]
then
echo Quiting when found a free address
fi
echo Testing subnet $subnet.0/24
echo Sending $packet_count packets per IP
fi

for i in {1..254}
do
IP=$subnet.$i
arping $verbose -c $packet_count $IP
result=$?
if [[ $result == 0 ]]
then
echo $IP Used
else
echo $IP Free
if [[ $quit_on_found == 1 ]]
then
exit
fi
fi
done
=

Google for find_ip.sh

The other which I can't find at the moment prints out the MAC address of each 
IP address that is in use.  Alternatively, run the above script with the -v 
option and then scroll back to look at the MAC addresses.

Of course, I was using this before I knew that netdiscover existed - thanks 
for sharing!
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


[gentoo-user] [OT] network discovery tools

2011-05-25 Thread Harry Putnam
There must be a number of people who post here that have had to do
this problem.

Discover the addresses of computers on a home network that have
connected by way of DHCP.  For example: Several wireless connections.

I've used static IPS for around 10 yrs, always seemed handier for
things like ssh between home lan computers. 

But recently started using DHCP for wireless connections.  It must be
such a popular method for some reason.

But when you do it that way, and say want to VNC or ssh or the like to
something connected by a dhcp serving WAP then how do you find the
address?

That is, besides something like accessing the WAP and checking the IPs
connected to it.

Is there some quick and sure way to discover any IPs on the home lan?

Some kind of mapper tool?




Re: [gentoo-user] [OT] network discovery tools

2011-05-25 Thread Stéphane Guedon
On Wednesday 25 May 2011 21:45:07 Harry Putnam wrote:
 There must be a number of people who post here that have had to do
 this problem.
 
 Discover the addresses of computers on a home network that have
 connected by way of DHCP.  For example: Several wireless connections.
 
 I've used static IPS for around 10 yrs, always seemed handier for
 things like ssh between home lan computers.
 
 But recently started using DHCP for wireless connections.  It must be
 such a popular method for some reason.
 
 But when you do it that way, and say want to VNC or ssh or the like to
 something connected by a dhcp serving WAP then how do you find the
 address?
 
 That is, besides something like accessing the WAP and checking the IPs
 connected to it.
 
 Is there some quick and sure way to discover any IPs on the home lan?
 
 Some kind of mapper tool?

dhcp can assign static adresses ! Thus, it's easier to manage (only the dhcp 
server to admin !)

I am not english, thus, don't know website with such doc (in english) but you 
can easily find it on internet !

You have also dnsmasq that makes both dns (for lan) + dhcp (whereas commonly, 
this functions are split)
-- 
Stéphane Guedon
page web : http://www.22decembre.eu/
carte de visite : http://www.22decembre.eu/downloads/Stephane-Guedon.vcf
clé publique gpg : http://www.22decembre.eu/downloads/Stephane-Guedon.asc


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] [OT] network discovery tools

2011-05-25 Thread Vincent-Xavier JUMEL
Le 25 mai à 21:54 Stéphane Guedon a écrit
 On Wednesday 25 May 2011 21:45:07 Harry Putnam wrote:
  There must be a number of people who post here that have had to do
  this problem.
  
  Discover the addresses of computers on a home network that have
  connected by way of DHCP.  For example: Several wireless connections.
  

« ip a s » to get your IP with your mask and then « nmap
ip.in.v4.format/mask »

  I've used static IPS for around 10 yrs, always seemed handier for
  things like ssh between home lan computers.
  
  But recently started using DHCP for wireless connections.  It must
  be such a popular method for some reason.
  
  But when you do it that way, and say want to VNC or ssh or the like
  to something connected by a dhcp serving WAP then how do you find
  the address?
  
avahi and zeroconf could be an help. With avahi-daemon running every
where and avahi-dnsconfd I just type « ssh -l login myhostname.local »
or « ssh -l login myhostname.lan » depending on your configuration.

  That is, besides something like accessing the WAP and checking the IPs
  connected to it.
  
  Is there some quick and sure way to discover any IPs on the home lan?
 
  Some kind of mapper tool?
You've got lanmap to, though it doesn't seem maintained IMHO and it
depends on nmap.

 
 dhcp can assign static adresses ! Thus, it's easier to manage (only the dhcp 
 server to admin !)
 
 I am not english, thus, don't know website with such doc (in english) but you 
 can easily find it on internet !
 
Configuration sample are even given in isc-dhcp-server default conf
file, richly commented out.

 You have also dnsmasq that makes both dns (for lan) + dhcp (whereas commonly, 
 this functions are split)
-- 
Vincent-Xavier JUMEL GPG Id: 0x2E14CE70 http://thetys-retz.net

Rejoignez les 5398 adhérents de l'April http://www.april.org/adherer
Parinux, logiciel libre à Paris : http://www.parinux.org



Re: [gentoo-user] [OT] network discovery tools

2011-05-25 Thread Neil Bothwick
On Wed, 25 May 2011 14:45:07 -0500, Harry Putnam wrote:

 Is there some quick and sure way to discover any IPs on the home lan?
 
 Some kind of mapper tool?

Do you know the MAC address of the device? That's usually written on the
box somewhere, so you can usually examine the output of arp -n to findthe
associated IP address.

If it's not in the arp table, and it's your network, a QAD method is

sudo nmap -sP 192.168.0.1-254 | grep -B 3 MACaddress

Substituting the address range of your network if it's not 192.168.0.


-- 
Neil Bothwick

WinErr 007: System price error - Inadequate money spent on hardware


signature.asc
Description: PGP signature