Skip to main content

Using DNF on an IPv6-only host

I created a Stardust instance on ScaleWay, and used IPv6 exclusively (didn't use IPv4, much cheaper this way).

The issue is, dnf would often not work. After using -d 3 to figure out where it stalls, it became clear that dnf was resolving the mirror domain names to IPv4, and then failing to connect to them because we don't have IPv4.

The solution is to edit /etc/dnf/dnf.conf and add this line:

ip_resolve=6

For other options, read the man page of dnf.conf.

There was some effort to enable a drop-in configuration diretory /etc/dnf/conf.d, but the patch never got merged.

Anyway, after reconfiguring DNF to resolve domain names to IPv6 only, it works fine.