Problem:
Resolver settings on cPanel servers running AlmaLinux 8 reset after system reboots, causing network connectivity and DNS resolution issues.
Solution:
To maintain resolver settings across reboots:
-
Edit /etc/resolv.conf: Open the file:
sudo nano /etc/resolv.conf -
Add Hetzner's IPv4 resolvers:
nameserver 185.12.64.1
nameserver 185.12.64.2 -
Prevent Changes: Protect the file from modifications:
sudo chattr +i /etc/resolv.conf
This ensures Hetzner's IPv4 resolvers persistently remain configured on cPanel AlmaLinux 8 servers, preventing resolver resetting issues post-reboot.