DNS issues in Kali HVM

I set up a new Kali HVM by following this article:

I logged into Kali and set the IP address, netmask, gateway, etc using several methods. The result was that I could ping 8.8.8.8 but not google dot com:

  1. Use the Advanced Network Configuration GUI to set the parameters as they are shown in my Kali qube settings. I copied the ip, gateway, virtual DNS, and tried a netmask of 255.255.255.255 and 255.255.255.0. I also tried OpenDNS instead of the virtual DNS.

  2. Same addressing as above, but I edited /etc/network/interfaces like this:

    auto eth0
    iface eth0 inet static
    address 10.137.0.18
    netmask 255.255.255.0
    gateway 10.137.0.6
    dns-nameservers (tried both virtual 10.139.1.1 and 208.67.220.220)

  3. Same addressing but I followed this article and used systemd-networkd, so that my 50-static.network file looked like:

    [Match]
    Name=eth0

    [Network]
    Address=10.137.0.18/24
    Gateway=10.137.0.6
    DNS=10.139.1.1

After methods 1,2 and 3, the result is the same. I cannot ping google dot com or view the webpage but I can ping 8.8.8.8.

EDIT: I restarted the network services and sometimes the VM after each case.

bump

Hi. I can’t comment about this installation method, but some other methods in that guide are broken (such as the one where you start on debian and dist-updade into kali.

These guides break from time to time and if no one bothers to update them, they will stay like that and many users may fall into a trap. This seems to be one of those cases, which is unfortunate. Qubes has been purging out the external documentation from the “official docs” for this reason.

I would advise you checking out the kali template that’s being worked on.

bump bump
(though from the “kali template available” post i am understanding that it will only work on qubes4.1, bummer).

The fix for this is to delete the symlink /etc/resolve.conf and then recreate the file with the nameservers assigned by Qubes OS.

The steps specifically (for me) are as follows:

  • sudo rm /etc/resolv.conf
  • sudo vi /etc/resolve.conf
  • nameserver xx.xxx.x.1
  • nameserver xx.xxx.x.2

It’s because of the nameservers in resolv.conf, do this:

sudo echo "nameserver 8.8.8.8" > /etc/resolv.conf

Now it should work. If you reboot the system you’ll have to do that again, otherwise place it in ~/.zshrc or whatever it is for zsh.

if this doesn’t work you’re probably messing something up with your firewall, check it through dom0 commandline:
qvm-firewall <qube-name> list #execute this on dom0