How to disable DHCP in Whonix and ensure no leaks

Hello, I need to disable DHCP in Whonix, I have static IP on my host but running htop on my host shows dnsmasq is being ran with a “DHCP ip lease script”, which has the path to a binary with name “libvirtd_lease_script”. dnsmasq config file has DHCP disabled so the one running the binary is actually libvirtd, I managed to stop it by simply renaming the binary to “test” and killing dnsmasq

Now the problem is I am not sure if DHCP is disabled in Gateway, and most importantly that there were no leaks by me fiddling around with dnsmasq, so my question is actually 2 separate questions:

  1. How to absolutely make sure that there are no leaks from Whonix ? is there a list of standard tests used by you to ensure that there are no leaks?

  2. How to disable DHCP and set static IP for Whonix

@Patrick @HulaHoop I would like to add that I am an activist and live in a country that is worse than North Korea, a big tool that I depend on to continue living is Whonix.

Reason why I need to disable DHCP is closely related to the activism I know it does not makes sense but I am not allowed to explain it here

And reason why I need to ensure there are no leaks is because my life literally depends on there being no leaks, this is not about going to prison but life or death situation so please any help related to the 2 questions above would be massive thank you

Sorry duplicates and typos

related:

There’s no absolute security anywhere. Best available is:

See also:

This documentation is a crash course in anonymity and security on the Internet. Whonix ™ is a technological means to anonymity, but staying safe necessitates complete behavioral change; it is a complex problem without an easy solution. The more you know, the safer you can be.

Then even learning about these tools would be dangerous. Be careful. I am not sure any software based solution can help you if the stakes are that high.


Note: I am not a maintainer of Whonix KVM so I cannot answer the main question.

Thanks for leak tests page but I am still in a tight situation due being unsure if DHCP is really disabled or no and thus still trapped and cannot use Whonix for anything sensitive.

Do you know when will @HulaHoop will answer my question?

If you could tell me how to disable DHCP in virtualbox port of Whonix It might help me figure this out myself

Whonix VirtualBox doesn’t use DHCP. For more detailed Whonix VirtualBox question please open separate, new (a) forum thread(s).

No, I don’t know that.

Also an option is it will not be replied to as per:
Bug Reports, Software Development and Feature Requests chapter Support Request Policy in Whonix wiki

I think it will not be replied to due fact @HulaHoop has not been seen for more than a month

I made sure that Whonix KVM does not run or need DHCP in any way shape or form to function. That is why you need to also import an extra external network settings file since all IPs are static and hardcoded.

1 Like

Thanks for clearing that out! But why does dnsmasq run with this libvirtd “DHCP lease script” (that is actually a binary) ? While we are at it would be nice to clear out why is dnsmasq is needed as well (separate questions)

On the KVM wiki page under chapter Optional there is a chapter DHCP.

https://www.whonix.org/wiki/KVM#DHCP

Did you see that already?

Quote Whonix ™ for KVM chapter Debian in Whonix wiki (bold added):

For Debian bullseye+ on Intel / AMD you need to install:

sudo apt install --no-install-recommends qemu-kvm libvirt-daemon-system libvirt-clients virt-manager gir1.2-spiceclientgtk-3.0 dnsmasq qemu-utils

What’s the purpose of package dnsmasq in the installation list?

Is it optional?

Can KVM work without that package being installed?

@HulaHoop

I don;t know the details of dnsmasq’s functionality, but I have confirmed from sources in documentation and technical forums that a very limited subset of functionality of dnsmasq is being exposed to libvirtd. dnsmasq is what the KVM team settled on to handle DHCP leases and DNS request resolution.

It is needed for the normal functioning of the default NAT network that Kicksecure or other generic distro VMs use to connect. The fact that it’s installed has no bearing on the code running within Whonix and cannot be abused to unmask you. Gutting it out would require a lot of manual reconfiguratoin of the VMs and host to restore connectivity and is beyond the scope of Whonix support.

1 Like

No not really.

1 Like

Yes and it was not helpful

I mentioned earlier that I am not allowed to tell you why I need to disable DHCP but it is very important. I also mentioned that I am not using DHCP on my host so manual reconfiguration is limited to I guess only Gateway so it shouldn’t be out of scope? Any pointers will help

Didn’t you say it is possible to have dnsmasq removed but requires alot of manual reconfiguration? I am confused

Maybe it’s possible. But even if it is, it seems an impasse was reached here. As per:

Therefore the only way forward that I can see here is:
Bug Reports, Software Development and Feature Requests chapter Generic Bug Reproduction in Whonix wiki

  1. “forget” about Whonix
  2. make KVM work without dnsmasq using Debian (stable)
  3. make KVM work (using Debian (stable)) with a network configuration similar to Whonix-Gateway without dnsmasq

If you find out more, please keep us posted. Could be interesting and might be considered for future development.

1 Like

4 posts were split to a new topic: Whonix KVM Security Bug Report

Since that seems a different issue, I moved it to [INVALID] Whonix KVM Security Bug Report - SPICE remote desktop protocol listening on all network interfaces

The title of the other forum thread will most likely be improved after the (potential) issue has been published.

A post was split to a new topic: Whonix KVM dnsmasq - listen port on host operating system - attack surface reduction