I am using the command line of Windows 10 to ping a device that is not on my LAN. I am using a VPN connection to communicate with that device. The device responds to all the ping requests that I send from the command line.
But when I send the ICMP echo requests with scapy, I don't get any response. The only difference between the command line ping and the scapy ping is that the latter doesn't fill the Identifier and Sequence fields of the ICMP packet (the default value is probably 0 in both fields).
This is my python code:
from scapy.all import IP, ICMP, sr1
reply = sr1(IP(dst=dst_ip)/ICMP())
I have tried both ping requests with the windows firewall off.
What could be wrong? How can I get response with the scapy ping?