How to Enable Stub Resolvers
Last modified: March 26, 2024
Overview
This document describes how to enable stub resolvers for your server.
Warning:
- We strongly recommend that you do not enable this method. We do not support this behavior.
- This method can cause problems with your server configuration.
- This procedure will make AutoSSL error messages significantly less useful.
Enable stub resolvers
This feature uses your system’s resolvers instead of relying on external DNS. If you or your system administrator blocks port 53
outside of your network, stub resolvers can perform DNS for your servers.
Warning:
This method only resolves issues related to intentionally blocking port 53
. Do not use this method, for example, as a workaround for issues with your NAT configuration. Instead, properly set up your NAT configuration.
To enable stub resolvers, perform the following steps:
- Run the following to confirm that the
dig
command work:/scripts/cpdig google.com mx
- Run the following to set up a dangling symlink:
ln -s stub /var/cpanel/dns_unbound_resolve_mode
- Run the following to confirm that the
dig
command works with thestrace
option added:strace -o cpdig.strace /scripts/cpdig google.com mx
- Verify that the
strace
option is showing the stub that the resolver is using:Your output should resemble the following:grep -A2 stub cpdig.strace
readlink("/var/cpanel/dns_unbound_resolve_mode", "stub", 4095) = 4 open("/etc/resolv.conf", O_RDONLY) = 8