Linux and KVM Qemu VM - "Couldn't ARP for host" despite that host and VM are both bridged and in the same subnet
0
votes
1
answer
396
views
I am using KVM Qemu in Kali linux host, and trying to practice ARP spoofing. In the Kali linux (which is connected to wired ethernet network), I have set up the following configuration (from tutorials I followed) in **
Then inside the VM, I gave it the static IP of
/etc/network/interfaces
** to configure my KVM VMs to use bridged mode of networking.
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
auto br0
iface br0 inet static
address 192.168.10.12
broadcast 192.168.10.255
netmask 255.255.255.0
gateway 192.168.10.1
bridge_ports eth0
bridge_stp off
bridge_waitport 0
bridge fd 0
To provide further information, following is the result of running ip a
in my host machine:
└─$ ip a
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qdisc fq_codel master br0 state UP group default qlen 1000
link/ether 10:7b:44:35:45:29 brd ff:ff:ff:ff:ff:ff
3: wlan0: mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 56:1b:f4:e4:1e:67 brd ff:ff:ff:ff:ff:ff permaddr 34:f6:4b:ff:c2:01
4: br0: mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 10:7b:44:35:45:29 brd ff:ff:ff:ff:ff:ff
inet 192.168.10.12/24 brd 192.168.10.255 scope global br0
valid_lft forever preferred_lft forever
inet6 fe80::127b:44ff:fe35:4529/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
5: virbr0: mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:07:00:25 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
6: vnet0: mtu 1500 qdisc noqueue master br0 state UNKNOWN group default qlen 1000
link/ether fe:54:00:d6:07:c1 brd ff:ff:ff:ff:ff:ff
inet6 fe80::fc54:ff:fed6:7c1/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
7: vnet1: mtu 1500 qdisc noqueue master br0 state UNKNOWN group default qlen 1000
link/ether fe:54:00:f4:dd:55 brd ff:ff:ff:ff:ff:ff
inet6 fe80::fc54:ff:fef4:dd55/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
Now, when creating my KVM VM, I set it up to use **bridged** networking mode, as can be seen in the following screenshot.

192.168.10.301
by doing the following configuration in /etc/network/interfaces
file:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
#The primary network interface
allow-hotplug enp1s0
iface enp1s0 inet static
address 192.168.10.30
netmask 255.255.255.0
gateway 192.168.10.1
Both the host and the VM *can ping each other*. However, when I try to run **arpspoof
** by executing **sudo arpspoof -i eth0 -t 192.168.10.30 192.168.10.1
** on the host machine, I get **arpspoof: couldn't arp for host 192.168.10.30
**. **The question is why and what do I do to fix it?**
____________________________
***WHAT I TRIED:***
Ofcourse I tried to search it before posting here, and I found a ton of results, including those on this forum, but they were for VMWare or Virtual Box, and the OP would either try it accross different subnets or would not be bridged mode of networking etc. I took care of all those things.
Asked by Shy
(649 rep)
Nov 9, 2023, 12:24 PM
Last activity: Nov 9, 2023, 01:18 PM
Last activity: Nov 9, 2023, 01:18 PM