Let's Encrypt - "acme-v02" connection with IPv4 only

This shell script forces acme-v02.api.letsencrypt.org to resolve via IPv4 on servers with IPv6 interfaces that are enabled but dysfunctional in any number of ways.

It works by updating an entry in the server’s /etc/hosts file on a schedule, to the latest IPv4 address found for that domain. This is necessary because the IP address rotates regularly.

Download the shell script

wget -O /usr/local/sbin/forceleipv4.sh "https://pastebin.com/raw/ETsD9D9W"
chmod 700 /usr/local/sbin/forceleipv4.sh

Installing a cron task

echo '0 * * * * root /usr/local/sbin/forceleipv4.sh' > /etc/cron.d/forceleipv4

Forcefully update LE IPv4

/usr/local/sbin/forceleipv4.sh

The output of the hosts file

cat /etc/hosts

That's it.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Domain names are not showing in WHM

We were unable to see any domains listed under WHM -> List Accounts. However, we can see the...

How to Start/Stop or Restart Apache server

Apache is the HTTP server that is freely available over the internet. It is a kind of software or...

How to install Attracta SEO Tools plugin

RequirementscPanel/WHM needs to be installed on your server. Step 1: SSH into your server and go...

How to Install CpCleaner in cPanel through SSH?

Installation Run the following shell commands as root via SSH: wget -O cpc-1.0.3.tar...

How to Secure a cPanel/WHM Web Server

Here are a few basic steps that you should keep in mind for keeping a server secure. 1) Strong...