When I run tcpdump, I do so after having connected to an access point. Is there a way to run tcpdump without having connected already?
2 Answers
Use tcpdump -I
. -I
will put the chosen interface into monitor mode, and doesn't need to be connected to an access point.
The full command would be (if your Wi-Fi interface is en0):
sudo tcpdump -Ii en0
My solution requires a connection to an access point; however, no actual access point must exist.
Creating an Ad Hoc access point on OS X
- From the Wi-Fi Status icon in the menu bar, choose Create Network.
- Give your ad hoc network a name
- Choose security type (not required) and click Create.
Now you can run tcpdump without connection to a valid access point.