Can I monitor who is using my Mac OS X Internet Sharing?
Solution 1:
Well, if your Airport is the only wireless router you have, you can always find out who is connected to it.
To do that :
- Start Airport Utility
- Double-click your Airport
- Start Manual Setup mode
- Navigate to Airport > Summary
- Choose "Wireless Clients"
You should now see a complete list of the clients connected to your Airport.
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.
Solution 2:
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.
Solution 3:
If you want to graphically display all your local network connections, you may be interested in etherape. Otherwise, I'd go with @caliban