• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

DNS extended allow-recursion with wrapper?

ThomasR

Basic Pleskian
Hi,

Plesk allows only 3 DNS recursion modes:
  • Allow for all requests
  • Allow for local requests only
  • Deny
Behind the scene setting this option will result in a configuration made in the C:\Program Files (x86)\Parallels\Plesk\dns\etc\named.user.conf (or /var/named/chroot/etc/named.conf in Plesk for Linux), i.e.:

Code:
options{
allow-recursion    {localnets; };
listen-on-v6    {any; };
version none;
};

Since we need more flexibility (allowing DNS recursion from both localhost/localnets AND some specific external IP addresses), we are using a custom wrapper for the dnsmng tool in Plesk for Linux (/usr/local/psa/admin/sbin/dnsmng) which uses sed to insert some additional lines:

Code:
#!/bin/bash

/usr/local/psa/admin/sbin/dnsmng.orig "$@"
EXITSTATUS=$?

allow=`sed ':a;N;$!ba;s/\n/; \\\\\n\t\t/g' /etc/named.conf.allow.recursion 2>/dev/null`

sed -i '/\/\/ Start custom lines added by the wrapper/,/\/\/ End custom lines added by the wrapper/ d' /var/named/chroot/etc/named.conf

sed -i~ "/^[[:space:]]*allow-recursion {/{a \
\\\t\t// Start custom lines added by the wrapper: \
\n\t\t${allow}; \
\n\t\t// End custom lines added by the wrapper
}" /var/named/chroot/etc/named.conf >/dev/null 2>&1

/etc/init.d/named reload >/dev/null 2>&1

exit $EXITSTATUS

This works fine on Plesk for Linux. We now are looking for a similar solution on Plesk 12 for Windows. What is the best way to achieve this?
 
Back
Top