Hello, I have a question/issue that I am encountering when I try to route my Kali HVM qube through my Standalone MullvadVPN VM I Will try to explain as best I can in detail What’s happening.
A while back I wanted to create a VPN qube to route some of my VM’s through a VPN and i found this really good guide on here which I followed. The only difference really is the template VM is a debian-12-minimal. I’ve been using this VM for a while now with my appVMs and they work without any issue.
The issue I am encountering is recently I wanted to create a Kali linux HVM and have the net qube be my MullvadVPN qube, So I set up my Kali HVM and set the ip address of the HVM with the ip address in the Kali HVM qube settings which was: 10.137.0.31, I set the netmask to 255.252.0.0 which is what i have to do with my other HVM’s to get internet working (other HVM’s use sys-firewall as net qube) and I set the gateway ip on my Kali HVM to: 10.137.0.28 which is the gateway ip in the kali HVM qube settings when I select the MullvadVPN VM as my net qube and set my DNS to the corresponding ips in my qube settings as well which are: 10.139.1.1, 10.139.1.2. Now usually on my other HVM’s that I’ve setup I should now have internet access and it should be routing my traffic through my specified net qube but when I tried to go on the internet and load up a webpage or ping an ip it would not work. At first I thought it might not be configured properly in the HVM but going through my config files and NetworkManager, And listing my network interface info all was configured correctly. I tried switching netmask to different values and it still was not working, So I switched the net qube to sys-firewall without changing the gateway ip at first and it started working now, But the gateway ip was still on the ip of my MullvadVPN VM. I then switched the gateway ip to sys-firewall ip which was 10.138.7.34 and it was still working, But then i decided to change my net qube back to my MullvadVPN VM without changing the gateway ip in the HVM and rebooted the HVM and saw I now have internet connection and my internet was being routed correctly to my MullvadVPN VM. Which I thought was very odd so then I changed the gateway ip address in my HVM to a random ip 10.137.0.11 and rebooted my HVM and it was still working. I was still routing my connection through my MullvadVPN VM with my outward facing public ip as the server specified in the MullvadVPN App. It is only when I change the gateway ip address to the ip address of the MullvadVPN VM which is specified in the Kali HVM qube settings when i select the MullvadVPN VM as my net qube that my internet stops working. I’ve only exhibited this behavior with my HVM’s and not my other AppVMs that use the MullvadVPN VM as their net qube. I then tried using sys-whonix as my net qube for the kali HVM and it wouldn’t work at all even if i changed the gateway ip to a random ip or to the specified gateway ip in the qube settings or even changing netmask to different values I couldn’t get it to work at all.
I would just like to understand why this is happening and if this is intended behavior for HVMs or specifically for a VPN Standalone VM and a HVM. If anyone can give more insight as to what is happening here and why my HVM does not have internet connection when I configure the gateway ip of the HVM to be the ip of the MullvadVPN VM and instead does work if the gateway ip is set to a incorrect value. Is this safe to do, And use the HVM with the gateway set to the wrong ip yet still is working and routing my traffic through the specified MullvadVPN VM, I would assume so as this is all happening internally but i would like you hear your thoughts on this. I also can’t help to assume maybe it has something to do with the fact that my MullvadVPN VM template is debian-12-minimal which does not include qubes suite of packages but I am not sure. I would also like to know why sys-whonix does not work in any regard if possible, Thanks in advance and apologies for the text wall.
tl;dr: My HVM only has internet connection when my gateway ip is set to a incorrect value and when set to the ip specified in my HVM qube settings it fails to route my traffic through my net qube.