Py-KMS-Organization / py-kms

KMS Server Emulator written in Python
https://py-kms.readthedocs.io/en/latest/readme.html
The Unlicense
628 stars 113 forks source link

PY-KMS doesn't like IPv6 GRUB modification #127

Open virgo77 opened 2 weeks ago

virgo77 commented 2 weeks ago

Hi! Just for information: As I'm using Debian Bookworm (12.x), py-kms won't start if IPv6 is disabled through GRUB modification like this:

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet"
GRUB_CMDLINE_LINUX="ipv6.disable=1"

So it returns an error saying that the service is deactivated when launching a systemctl status And if you run the command manually, you will see these errors:

dualstack_ipv6 not supported on this platform. Creating not dualstack sockets...

[Errno 97] Address family not supported by protocol. Exiting... 

(maybe a bit similar to this post?)

So, If you really need to disable IPv6, the fix is to go in this folder /etc/sysctl.d and create the file 70-disable-ipv6.conf then insert these 3 lines:

net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

Then launch sysctl -p -f /etc/sysctl.d/70-disable-ipv6.conf or reboot and, magic! py-kms works.

Do you think to do an update? As there will be soon Windows Server 2025, Office 2025, Windows 12, etc.

Thanks a lot :)

Regards, V.

didotb commented 2 weeks ago

I suggest a title change for more clarity, since you suggested an alternative solution to grub modification.