Fedora 40 mirrors : errors leading from Western Europe to mirrors based in UA & RU?

Keep in mind that DNF should verify downloads with checksums and GPG signatures, so all of this is likely irrelevant.

Anyway, you can limit the metalink result to specific countries:

COUNTRY="BE,CH,DE,FR,NL,SE"
URL="$(grep -o -m 1 -e "^metalink=.*basearch" /etc/yum.repos.d/fedora.repo)"
sudo dnf config-manager --save --setopt "fedora.${URL}&country=${COUNTRY}"
URL="$(grep -o -m 1 -e "^metalink=.*basearch" /etc/yum.repos.d/fedora-updates.repo)"
sudo dnf config-manager --save --setopt "updates.${URL}&country=${COUNTRY}"

HTTP 301 is not an error, but a redirection status code.
Download managers normally follow redirects.

4 Likes