Deutsch   English   Français   Italiano  
<m931c4F8pgcU1@mid.individual.net>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: "Carlos E. R." <robin_listas@es.invalid>
Newsgroups: comp.os.linux.misc
Subject: Re: Linux advocacy
Date: Tue, 20 May 2025 11:46:44 +0200
Lines: 63
Message-ID: <m931c4F8pgcU1@mid.individual.net>
References: <pan$e6d88$f019cb49$2e3cccf9$253bfbf1@linux.rocks>
 <m8s17vF4395U2@mid.individual.net>
 <r7kh2ktuo8sl5hrn77gih786uqdklfnvqq@4ax.com>
 <m8smu5F4395U5@mid.individual.net>
 <w6GdneCj_9dqyrT1nZ2dnZfqnPGdnZ2d@giganews.com>
 <100c46e$3c1el$1@news1.tnib.de> <m91evtFfleU3@mid.individual.net>
 <100hcra$3nsq7$1@news1.tnib.de> <100hetv$24um2$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net yzAYiOAcO2PkGUJzxf2wbQHt2k1cElM4XqLSxpjLUqfqjiFUmX
Cancel-Lock: sha1:HklYdQnLE/WWzQZnNfd6cMB0+KQ= sha256:nr2WSVxjF8AxB4yyiOdEi/wTmGzkB/hTRU8CRxxeWco=
User-Agent: Mozilla Thunderbird
Content-Language: en-CA, es-ANY
In-Reply-To: <100hetv$24um2$2@dont-email.me>
Bytes: 2762

On 2025-05-20 10:36, Nuno Silva wrote:
> On 2025-05-20, Marc Haber wrote:


> 
> Maybe what's missing here for some of the affected people is configuring
> address lookup to prefer IPv4 if they're using nameservers that return
> AAAA records?
> 
> (Just a wild guess, but fitting enough that it's probably a good idea to
> drop this here:)
> 
>      news://news.gmane.io/m3msju6x5x.fsf@lugabout.jhcloos.org
> 
> Although I'm not sure, from the gai.conf online manual page, that just
> the mentioned line is sufficient, given it's said to disable the
> "default table". I didn't test this myself.

I knew and did the trick in the past, but I have forgotten, so I asked 
chatgpt:

Method 1: Edit /etc/gai.conf to prefer IPv4

The /etc/gai.conf file is used by the GNU C Library (glibc) to influence 
address selection when a hostname resolves to multiple addresses (e.g., 
both A and AAAA records).

     Open the file in a text editor as root:

sudo nano /etc/gai.conf

Find the following line (it’s usually commented out):

#precedence ::ffff:0:0/96  100

Uncomment the line by removing the #:

     precedence ::ffff:0:0/96  100

     This tells the system to prefer IPv4-mapped addresses over IPv6.

     Save and exit the editor.

This change takes effect immediately for new processes that use glibc’s 
getaddrinfo() function.

Method 2: Disable IPv6 (not recommended unless necessary)

(skip)

Verify Preference

You can test the preference with getent:

getent ahosts example.com

The top address should be IPv4 if the change worked.



-- 
Cheers,
        Carlos E.R.