make centos do ipv4 lookup only

Issues related to configuring your network
Post Reply
pa2snk
Posts: 2
Joined: 2020/01/26 10:56:18

make centos do ipv4 lookup only

Post by pa2snk » 2020/01/26 11:01:26

Hi,
im trying to update my ssl certificate with certbot but i get an error 101.
centos tries to connect to a ipv6 address what in my situation does not work.
my provider does not support ipv6 (shame on them)

how can i get to make my application to connect to the ipv4 address instead.
i can get centos to ignore ipv6 with ntmui but it still wants to connect to ipv6 adreses..
i'm out of options here tries several thing with friend google but no luck so far.

a curl also does not work curl -4 wil work.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: make centos do ipv4 lookup only

Post by TrevorH » 2020/01/26 17:11:45

I think you have more fundamental problems than the one you think. It should not be a problem to have ipv6 enabled even if you have no ipv6 connectivity. However, you may be able to bodge the immediate problem using /etc/gai.conf - see man gai.conf.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

pa2snk
Posts: 2
Joined: 2020/01/26 10:56:18

Re: make centos do ipv4 lookup only

Post by pa2snk » 2020/01/26 21:13:08

did setup gai.conf over here.
looks like:

# To prefer IPv4 over everything else
precedence ::ffff:0:0/96 100
precedence ::1/128 50
precedence ::/0 40
precedence 2002::/16 30
precedence ::/96 20

This should do the trick according to google

Post Reply