Configurs DNS.

Discussion in 'Installation/Configuration' started by jernis, Sep 22, 2005.

  1. jernis

    jernis New Member

    I now have 2 installations of IspConfig on 2 different machines on the same subnet.

    now i would like to set up them as dns1 and dns1.

    how do i do that?

    i dont understand the relations beteen master and slave dns inside ipsconfig
    do i :

    server1 = s1, server2 = s2

    What do i enter inside Management>Default DNS NS1, NS2 ?
    (is if for server1 : ns1 = s1 ip, ns2 = s2 ip. Making server1 my main dns)
    (and for server2 : ns1 = s1 ip, ns2 = s2 ip. using s2 as secondary dns)

    and what do i do inside the DNS management?
    New master ? (is this my s1?) (if yes is the IP my s1 ip ?)
    New slave ? (is this my s2?) (whats the DNS-Master IP: ?)

    Im slightly comfused. =)

    looking forward to an answer.

    / Daniel.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    DNS Master / Slave replication is handled by the bind zone-transfer feature.

    1) Add a master record in the dns-manager of your primary dns server. The IP you enter here is the ip where your domain shall point to.
    2) Add a slave record to your secondary dns-server, enter as ip the ip of your primary dns server.

    You see, its really simple :)
     
    Last edited: Sep 22, 2005
  3. jernis

    jernis New Member

    What do i enter inside Management>Default DNS NS1, NS2 ?

    >Add a master record in the dns-manager of your primary dns server.

    So on Server 1 (the master) I klick the
    "New Master" then adds SOA "mydomain.com" and
    adds the IP (my ispconfig 1 server external ip)

    and on Server 2 (the Slave) i klick the "New Slave"
    adds the Domain "mydomain.com" and the Server 1 Ip?

    Is this correct ?

    regards / Daniel.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, thats correct.
     
  5. jernis

    jernis New Member

    The server 1 (master) is answering nicely on mynewdomain.com but the server 2 (slave) cant find the mynewdomain.com if i ask it ?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    1) How long have you waited until you queried the second server? It may take some time until bind synchronizes the settings.

    2) Maybe zone transfers are disabled on your primary server. Check the logfiles for errors or failed zone transfers.
     
  7. falko

    falko Super Moderator Howtoforge Staff

    Even if you run
    Code:
    dig @localhost mybewdomain.com
    on your second server?
     
  8. jernis

    jernis New Member

    On server 1: (Is master)

    # dig @localhost mydomain.com

    ; <<>> DiG 9.3.1 <<>> @localhost mydomain.com
    ; (1 server found)
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47190
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;mydomain.com. IN A

    ;; ANSWER SECTION:
    mydomain.com. 86400 IN A 83.xxx.xxx.50

    ;; AUTHORITY SECTION:
    mydomain.com. 86400 IN NS slave.dns.server.name.
    mydomain.com. 86400 IN NS master.dns.server.name.

    ;; Query time: 0 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Thu Sep 22 20:53:35 2005
    ;; MSG SIZE rcvd: 93


    on server 2: (Is slave)

    # dig @localhost mydomain.com

    ; <<>> DiG 9.3.1 <<>> @localhost mydomain.com
    ; (1 server found)
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 62342
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;mydomain.com. IN A

    ;; Query time: 0 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Thu Sep 22 20:54:49 2005
    ;; MSG SIZE rcvd: 27


    The master knows about the domain but the slave has no idea what im talking about.
     
  9. jernis

    jernis New Member

    Found this insde the slave server :

    Sep 22 19:34:16 slaveserver1 named[13220]: zone mydomain.com/IN: Transfer started.
    Sep 22 19:34:16 slaveserver1 named[13220]: transfer of 'mydomain.com/IN' from 83.xxx.xxx.52#53: connected using 10.xxx.xxx.53#32793
    Sep 22 19:34:16 slaveserver1 named[13220]: dumping master file: tmp-BSgUR0NWsi: open: permission denied
    Sep 22 19:34:16 slaveserver1 named[13220]: transfer of 'mydomain.com/IN' from 83.xxx.xxx.52#53: failed while receiving responses: permission denied
    Sep 22 19:34:16 slaveserver1 named[13220]: transfer of 'mydomain.com/IN' from 83.xxx.xxx.52#53: end of transfer

    where is it permission denied?
     
  10. falko

    falko Super Moderator Howtoforge Staff

    Is named allowed to write to the directory where the zone files should be stored? It must be somewhere like /var/named, /var/lib/named, etc.
     
  11. jernis

    jernis New Member

    i got it running.

    In the prefect set up there is a entry :

    i did a chmod 777 on /var/named/chroot/var/named and then the domain worked on the slave.

    however. everytime i restart named on my Master this record can bee seen on the slave :

    Sep 22 21:21:24 slaveserver named[20231]: client 10.40.0.1#8511: received notify for zone 'mydomain.com'
    Sep 22 21:21:24 slaveserver named[20231]: zone mydomain.com/IN: refused notify from non-master: 10.40.0.1#8511

    the ip 10.xx.x.1 is not inside my ip range ?i have a subnet 255.255.255.248 with net : 10.40.0.48 and broadcast 10.40.0.55 so why is the master server with internal ip 10.40.0.52 talking from ip 10.40.0.1 ?? thats weird.
     

Share This Page