Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I made ad-hoc wireless network on my Gentoo workstation using NetworkManager. Is there any way to see what network adapters are connected to this network?

share|improve this question

migrated from stackoverflow.com Oct 6 '11 at 3:54

This question came from our site for professional and enthusiast programmers.

1 Answer 1

netstat should be able to show this.

netstat -aenp | grep 'INSERT_IP_OF_ETH_ADAPTER_HERE'

For example:

[ 12:13 root@host ~ ]# netstat -aenp | grep '10.10.1.11'
tcp        0     52 10.10.1.11:22               198.74.40.169:46429         ESTABLISHED 0          34722586   29599/sshd: jon [pr
tcp        0      0 10.10.1.11:5109             10.10.1.34:62142            ESTABLISHED 505        23721631   28772/istatd
udp        0      0 10.10.1.11:123              0.0.0.0:*                               38         30885053   1611/ntpd
......
......
......

should show who is connected on a certain interface. If you don't know the IP or interface to use, do ifconfig -a and see which is running your ad-hoc network and it should show the IP address.

share|improve this answer
1  
Thanks for answer. But I would rather want to know what device (mac address) is connected. Above shows connections made through my adapter. –  gumik Oct 5 '11 at 20:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.