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
Forum Moderator
Posts: 28095
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.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. 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

Return to “CentOS 7 - Networking Support”