I am running a kali linux terminal using wsl2. I seem to be having some network issus or possebly missing something.
When I try to ping anything on my local network or outside I get no response at all
I also made a script that should ping every machine connected to the network and I get no response there eiter, here is the code for that :
from scapy.all import Ether, ARP, srp
if __name__ == "__main__":
#If all bits of a MAC address is set to 1 it will broadcast to all devices in a network
broadcast = "FF:FF:FF:FF:FF:FF"
#Create a ethernet layer packet
ether_layer = Ether(dst = broadcast)
#This represent that we want to scan all devices with IP addresses from 192.168.74.1 up tp 192.168.74.255
ip_range = "192.168.0.1/24"
arp_layer= ARP(pdst = ip_range)
packet = ether_layer / arp_layer
ans, unans = srp(packet, iface="eth0", timeout=2)
for snd, rcv in ans:
ip = rcv[ARP].psrc
mac = rcv[Ether].src
print("IP = ", ip, " MAC = ", mac)
Any tip would be greatly appreciated.[PingTest][1]
[1]: https://i.sstatic.net/S2Iqg.png