I'm trying to capture wifi radio packets with Wireshark, but I can't seem to configure the network interfaces correctly. While working on this I tried Kismet and that worked. After running Kismet I can then can capture successfully with Wireshark.
I compared the network interface configuration and network related services (systemctl | grep network
) and found that the Kismet-generated configuration and my manually generated configuration are identical.
So why doesn't my configuration work while Kismet does? What am I missing?
Here are the commands I use to configure the network interface (sudo is omitted for clarity):
systemctl stop NetworkManager
systemctl disable NetworkManager
iw phy phy0 interface add wlp0s20f3mon type monitor
ip link set wlp0s20f3mon promisc on
ip link set wlp0s20f3mon up
iw dev wlp0s20f3mon set freq 2427
Here is the iwconfig and ifconfig output after my manual configuration and Kismet configuration (they are the same):
wlp0s20f3 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=-2147483648 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on
wlp0s20f3mon IEEE 802.11 Mode:Monitor Frequency:2.427 GHz Tx-Power=-2147483648 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1242 bytes 106449 (106.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1242 bytes 106449 (106.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp0s20f3mon: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST> mtu 1500
unspec E0-D0-45-3E-18-90-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
RX packets 2 bytes 140 (140.0 B)
RX errors 0 dropped 2 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Here is the ouput of systemctl | grep etwork:
networkd-dispatcher.service loaded active running Dispatcher daemon for systemd-networkd
systemd-resolved.service loaded active running Network Name Resolution
systemd-timesyncd.service loaded active running Network Time Synchronization
network-online.target loaded active active Network is Online
network.target loaded active active Network
nss-lookup.target loaded active active Host and Network Name Lookups
Here is my system info:
System: Kernel: 5.14.0-1054-oem x86_64 bits: 64 compiler: N/A Desktop: Gnome 3.36.9 wm: gnome-shell dm: GDM3 3.36.3
Distro: Ubuntu 20.04.5 LTS (Focal Fossa)
Machine: Type: Laptop System: LENOVO product: 21CBCTO1WW v: ThinkPad X1 Carbon Gen 10 serial: <filter> Chassis: type: 10
serial: <filter>
Mobo: LENOVO model: 21CBCTO1WW serial: <filter> UEFI: LENOVO v: N3AET69W (1.34 ) date: 12/05/2022