18

I'm running Snow Leopard and I'm sharing my Verizon connection via my Mac's built-in AirPort. Is there any way for me to identify who/what is using my shared connection?

System Preferences » Sharing » Internet Sharing: sharing my Internet access from my Verizon USB Modem (aka Pantech USB Modem) to other computers, through my AirPort card.

alt text

I'm sharing my AirPort out to others as an Access Point.

(For Windows, see How can I find out who is using my Windows Internet Connection Sharing (ICS)?)

Jason
  • 1,059

6 Answers6

15

I've figured out that the list of DHCP leases for the wifi that AirPort on the Mac publishes is kept in "/private/var/db/dhcpd_leases". This is not a list of currently connected clients, however. To figure out which "hosts" are still "up", I use the nmap utility (easily installed with Homebrew):

grep ip_address /private/var/db/dhcpd_leases | cut -d= -f2 | nmap -iL - -sn

Sample output:

...
Nmap scan report for 10.0.2.3
Host is up (0.74s latency).
Nmap scan report for 10.0.2.4
Host is up (0.11s latency).
Nmap done: 23 IP addresses (4 hosts up) scanned in 18.36 seconds

Next, lookup the same IPs back in the "dhcpd_leases" file to find out the client name and MAC address.

Glorfindel
  • 4,158
mislav
  • 2,340
8

If you want to graphically display all your local network connections, you may be interested in etherape. Otherwise, I'd go with @caliban

alt text

Gareth
  • 19,080
DaveParillo
  • 14,761
6

Well, if your Airport is the only wireless router you have, you can always find out who is connected to it.

To do that :

  1. Start Airport Utility
  2. Double-click your Airport
  3. Start Manual Setup mode
  4. Navigate to Airport > Summary
  5. Choose "Wireless Clients"

You should now see a complete list of the clients connected to your Airport.

alt text

Alternatively, you might want to run a network sniffer program such as KisMAC or iStumbler.

EDIT : Question asked is actually referring to Internet Sharing using a Mac + in-build Airport as gateway.

In that case, since your Mac is the gateway + router, you can use a network mapper utility to "map" out the network, thus finding out who is connected. You can try NMap, an opensource network mapping utility.

Gareth
  • 19,080
caliban
  • 20,411
4

there is a way of listing dhcp addresses if you enter in terminal:

arp -i en1 -a

sample output (10.0.2.1) is your mac's default address as an airport router :

? (10.0.2.1) at 60:33:4b:20:2e:e2 on en1 ifscope permanent [ethernet]
? (10.0.2.2) at (incomplete) on en1 ifscope [ethernet]
Bjuncek
  • 41
  • 2
2

I like iftop, which you can install with MacPorts

enter image description here

2
arp -i bridge0 -a 

If you are using Internet Sharing on Mac OS X

marjinn
  • 31