KVM noob here, doing this all with the “virtual machine manager” GUI.
My setup
Virtual network 10.0.0.0/24 in isolated mode. DHCP disabled.
pfSense VM. WAN = macvtap bridge to host NIC. LAN = virtual network (has IP address 10.0.0.1)
Windows VM. LAN = virtual network (got IP address 10.0.0.2 from pfSense). I can access the internet and the pfSense web interface.
Xubuntu 18.04 VM. LAN = virtual network (got IP address 10.0.0.10). I can’t access the internet and when I go to 10.0.0.1 I see a webserver from the host instead of the pfSense web interface.
I can’t find any logical explanation for this, since the network settings are exactly the same. Maybe one of you can help?
robin@xubuntuvm:~$ arp
Address HWtype HWaddress Flags Mask Iface
_gateway ether 52:54:00:bf:90:0f C enp1s0
robin@xubuntuvm:~$ ip route
default via 10.0.0.1 dev enp1s0 proto dhcp metric 100
10.0.0.0/24 dev enp1s0 proto kernel scope link src 10.0.0.10 metric 100
169.254.0.0/16 dev enp1s0 scope link metric 1000
I’ve edited my OP with a screenshot that hopefully makes this clearer. When I access the gateway IP in the guest, I get a webserver the host is running which is not related to any of this.
Yeah, I am going to port 80, but the host webserver is set up to redirect port 80 to 443 which apparently works as well. (the host is an Ubuntu machine with a lot of services, docker containers, etc)
robin@xubuntuvm:~$ wget -O- http://10.0.0.1
--2020-02-04 22:22:55-- http://10.0.0.1/
Connecting to 10.0.0.1:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://10.0.0.1/ [following]
--2020-02-04 22:22:55-- https://10.0.0.1/
Connecting to 10.0.0.1:443... connected.
ERROR: certificate common name ‘*.derkades.xyz’ doesn't match requested host name ‘10.0.0.1’.
To connect to 10.0.0.1 insecurely, use `--no-check-certificate'.