DNS Forward

  • Hi all,


    My i-mscp (ubuntu 12.04 and latest beta1) is configured to resolve DNS query using localhost. As expected when Bind does not host one particular domain it ask to the root hints to get an answer.


    I need to configure Bind with some kind of conditional forwarding for my internal domains (hosted by Exchange and Zimbra), so I can get the lan MX records and not the public ones.


    My network/interfaces file is

    Code
    1. dns-nameservers 127.0.0.1 192.168.100.101 192.168.100.202


    But when ubuntu sees the loopback address it excludes the other DNS from the auto generated /etc/resolve.conf


    Code
    1. # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTENnameserver 127.0.0.1


    So, Can I change somehow che Bind configuration to forward the queries for specific domains to my internal DNS?


    I'm pretty sure I can, but I don't how what kind of automatic conf rebuild you implemented :)
    [hr]
    I think I could use something like that in named.conf


    Code
    1. zone "newdomain.com" { type forward; forward only; forwarders { 22.22.22.22; };};


    or


    Code
    1. zone "newdomain.com" {
    2. type stub;
    3. masters { 22.22.22.22 };
    4. };


    But named.conf is managed by i-mscp, so I fear I will lose any change pretty soon.
    I could use a new named.conf (maybe a named.conf.lan) and include it in the named.conf, but again I don't know how you managed the original named.conf. If you overwrite it I will loose my configuration again.
    [hr]
    I tried to use /etc/bind/named.conf.local
    It works and it doesn't seems to be overwritten by i-mscp


    I don't like this solution very much, so if you have suggestions..

    Edited once, last by Botolo ().