In the PMG Admin Manual the following DNS recommendation is proposed:
DNS recommendations
Many tests to detect SPAM mails use DNS queries, so it is important to have a fast and reliable DNS server. We also query some public available DNS Blacklists. Most of them apply rate limits for clients, so they simply will not work if you use a public DNS server (because they are usually blocked). We recommend to use your own DNS server, which need to be configured in recursive mode.
In this "How To" it is explained how you can setup a IPv4 caching DNS server (resolver) on top on Debian 9 (stretch).
The bind software is available in the local debian repository. So just make sure that your system is up to date and install the bind components.
# apt-get update && apt-get dist-upgrade
# apt-get install bind9 bind9utils bind9-doc
After the bind components are installed you can configure the service.
# cd /etc/bind
# vi named.conf.options
Above the "options" block create a new block called "acl". Call the new group "goodclients".
Within this block list the IP addresses or networks that should be allowed to query the DNS service.
(also 'localhost' and/or 'localnets' can be used)
acl goodclients {
localhost;
localnets;
};
options {
. . .
Now we can configure the "options" block. Explicitly turn recursion on and then configure the allow-query parameter to allow to use our ACL specification.
options {
directory "/var/cache/bind";
recursion yes;
allow-query { goodclients; };
. . .
As we use only IPv4, comment the listen-on-v6 parameter or set it to
listen-on-v6 { none; };
Edit the bind startup options to enforce IPv4.
# vi /etc/default/bind9
Inside, modify the "OPTIONS" parameter to include the '-4' flag
OPTIONS="-u bind -4"
Finally check your named configuration. If you have syntax errors correct them.
# named-checkconf
Edit resolv.conf to use your local resolver
# vi /etc/resolv.conf
search . . .
nameserver 127.0.0.1
When you have verified that your configuration is without syntax errors restart the DNS service and keep an eye on the logfiles (daemon.log, mail.log, ...).
# systemctl restart bind9.service
*** Now all DNS Tests done by PMG should work without being blocked due to rate limits ***
DNS recommendations
Many tests to detect SPAM mails use DNS queries, so it is important to have a fast and reliable DNS server. We also query some public available DNS Blacklists. Most of them apply rate limits for clients, so they simply will not work if you use a public DNS server (because they are usually blocked). We recommend to use your own DNS server, which need to be configured in recursive mode.
In this "How To" it is explained how you can setup a IPv4 caching DNS server (resolver) on top on Debian 9 (stretch).
The bind software is available in the local debian repository. So just make sure that your system is up to date and install the bind components.
# apt-get update && apt-get dist-upgrade
# apt-get install bind9 bind9utils bind9-doc
After the bind components are installed you can configure the service.
# cd /etc/bind
# vi named.conf.options
Above the "options" block create a new block called "acl". Call the new group "goodclients".
Within this block list the IP addresses or networks that should be allowed to query the DNS service.
(also 'localhost' and/or 'localnets' can be used)
acl goodclients {
localhost;
localnets;
};
options {
. . .
Now we can configure the "options" block. Explicitly turn recursion on and then configure the allow-query parameter to allow to use our ACL specification.
options {
directory "/var/cache/bind";
recursion yes;
allow-query { goodclients; };
. . .
As we use only IPv4, comment the listen-on-v6 parameter or set it to
listen-on-v6 { none; };
Edit the bind startup options to enforce IPv4.
# vi /etc/default/bind9
Inside, modify the "OPTIONS" parameter to include the '-4' flag
OPTIONS="-u bind -4"
Finally check your named configuration. If you have syntax errors correct them.
# named-checkconf
Edit resolv.conf to use your local resolver
# vi /etc/resolv.conf
search . . .
nameserver 127.0.0.1
When you have verified that your configuration is without syntax errors restart the DNS service and keep an eye on the logfiles (daemon.log, mail.log, ...).
# systemctl restart bind9.service
*** Now all DNS Tests done by PMG should work without being blocked due to rate limits ***
Last edited: