How to add custom directive to named.conf and avoid overwriting by Plesk?

Follow

Comments

4 comments

  • Avatar
    Tim Hosking

    Hos can I add the following option to named.conf?

     

    options {

            hostname none;

    };

     

    There is no apparent place provided to modify options. Settting hostname to none is useful as the DNS will then pass checks if both NS records for a domain point to separate IPs on the same Plesk. Many DNS check tools will query the DNS hostname and discover the dual identity.

  • Avatar
    Ivan Postnikov

    @Tim, on a test server the following configuration worked (added "hostname none;" to default configuration):

    // $Id: named.conf,v 1.1.1.1 2001/10/15 07:44:36 kap Exp $

    // -- THE FOLLOWING LINES WERE GENERATED BY PLESK. IF YOU MODIFY THEM, THEY WILL BE OVERWRITTEN WHEN THESE SETTINGS ARE MANAGED IN PLESK UI. --
    options {
    hostname none;
    allow-recursion {
    localnets;
    };
    listen-on-v6 { any; };
    version "none";
    directory "/var";
    auth-nxdomain no;
    pid-file "/var/run/named/named.pid";
    };

    ...

     

  • Avatar
    Marco Marsala (Edited )

    Plesk generates the directive listen-on { 127.0.0.1; }; inside Custom Directives section, and I cannot find any information on how to change this in Plesk UI.

    I cannot edit the listen-on directive in named.conf because it maybe overwritten by Plesk.

    I cannot add a new listen-on directive (that must stay in an "options" block) outside the Custom Directives sections because bind9 won't start with error: /etc/named.conf:42: 'options' redefined near 'options'

    In my case I need the DNS server to listen on my public IP address. I cannot understand if Plesk provides a way to do so, or the supposed way is to edit the listen-on directive inside the Custom Directives section. I tried to do that, and it seems Plesk won't overwrite them, even changing DNS config from UI (for example Recursion) or issuing a "plesk repair dns".

  • Avatar
    Ivan Postnikov

    Hello @Marco,

    Currently, this setting cannot be changed in Plesk UI.

    There is a feature suggestion regarding configuring DNS server in Plesk UI, which is currently under consideration.

    Feel free to vote for it and leave a comment with required options there.

Please sign in to leave a comment.

Have more questions? Submit a request