I am launching an application which broadcasts udp packets. I also have a simple python script to confirm that these packets are being broadcast:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) sock.bind(('188.8.131.52', 1060)) while True: message,source = sock.recvfrom(4096)
However, I wish to see these packets using tcpdump but no matter what I try I cant see them. For example, I have tried:
sudo tcpdump -nnXi any > ~/out.txt sudo tcpdump -nnXi any port 1060 > ~/out.txt sudo tcpdump -n udp dst port 1060 > ~/out.txt
The two last command give me empty logs. What am I doing wrong?