tshark: The file to which the capture would be saved ('xxxx.pcap') could not be opened: Permission denied.To capture network traffic only between two IP addresses on ports 80 or 443 only, use this example command: $ sudo tcpdump -i eth0 -w /tmp/capfile.pcap -C 1 -W 2 ' (port 80 or port 443) and ( ( host 172.31.23.29) and (host 18.211.196.51))' &.a FREE half-day online conference focused on AI & Cloud – North America: Nov 2 – India: Nov 9 – Europe: Nov 14 – Asia Nov 23 Register now.