I'm learning how to use scapy to sniff packets. I have set up a simple echo server running on localhost on port 50420.
I then enter the following line in my terminal to sniff for packets on that port when I send traffic over it:
p = sniff(filter = 'port 50420')
However, no packets are captured, although the data flowed correctly. I have verified that sniffing works for other traffic not using localhost. How can I sniff this localhost traffic using Scapy, if at all possible?