Dns & Http Failover

Discussion in 'Server Operation' started by kyriakos, Aug 20, 2007.

  1. kyriakos

    kyriakos New Member

    I am trying to configure two servers, each one to work as a back up in case the other goes down.
    As far I have only modify bind configuration. The next step is to setup data synchronization.

    It looks like its working but i will ask you to take a look at my files and correct me if I did something wrong or not necessary.

    Fail Over works only for www.oratv.gr. Round Robin is also used for this site

    SERVER 1 (MASTER DNS)
    named.conf
    Code:
    acl recurseallow { 88.218.110.178;  88.218.110.179;  88.218.110.180; 88.218.110.181; 88.218.110.182;  localhost;};
    
    options {
            pid-file "/var/named/chroot/var/run/named/named.pid";
            directory "/var/named/chroot/var/named";
            auth-nxdomain no;
            allow-recursion { recurseallow; };
            // query-source address * port 53;
            allow-transfer {
            88.218.110.182;
            };
    };
    
    //
    // a caching only nameserver config
    //
    zone "." {
            type hint;
            file "named.ca";
    };
    
    zone "0.0.127.in-addr.arpa" {
            type master;
            file "named.local";
    };
    
    zone "110.218.88.in-addr.arpa" {
            type master;
            file "pri.110.218.88.in-addr.arpa";
    };
    
    
    zone "***host.gr" {
            type master;
            file "pri.***host.gr";
    };
    
    zone "oratv.gr" {
            type master;
            file "pri.oratv.gr";
            allow-transfer {  /// I dont know if this is necessary 
            88.218.110.178;
            88.218.110.182;
            common-allow-transfer;
            };
    };
    //// MAKE MANUAL ENTRIES BELOW THIS LINE! ////
    key rndc-key {
    	algorithm hmac-md5;
    	secret "mfkqvLYgvUapMFyNMw==";
    	};
    acl common-allow-transfer {
            88.218.110.182;
            88.218.110.178;
            };
    
    pri.oratv.gr
    Code:
    $TTL        60
    @       IN      SOA     ns1.oratv.gr. admin.oratv.gr. (
                            2007082107       ; serial, todays date + todays serial #
                            60              ; refresh, seconds
                            60              ; retry, seconds
                            60              ; expire, seconds
                            60 )            ; minimum, seconds
    ;
                    NS      ns1.oratv.gr.              ; Inet Address of name server 1
                    NS      ns2.oratv.gr.              ; Inet Address of name server 2
    ;
    
    host1  MX      10 ***host.gr.
    host3  MX      20 ***host.gr.
    
    oratv.gr.      A        88.218.110.182
    www       A       88.218.110.182
    www       A       88.218.110.181
    
    ns1       CNAME  www.oratv.gr.
    ns2       CNAME  www.oratv.gr.
    
    oratv.gr.       TXT  "v=spf1 a mx ptr ~all"
    
    ;;;; MAKE MANUAL ENTRIES BELOW THIS LINE! ;;;;
    
    
    
    SERVER 2 (SLAVE DNS)
    named.conf
    Code:
    options {
            pid-file "/var/named/chroot/var/run/named/named.pid";
            directory "/var/named/chroot/var/named";
            auth-nxdomain no;
            // query-source address * port 53;
            forwarders {88.218.110.178;};
    };
    
    //
    // a caching only nameserver config
    //
    zone "." {
            type hint;
            file "named.ca";
    };
    
    zone "0.0.127.in-addr.arpa" {
            type master;
            file "named.local";
    };
    
    zone "***host.gr" {
            type slave;
            file "sec.***host.gr";
            masters { 88.218.110.178; };
    };
    
    zone "oratv.gr" {
            type slave;
            file "sec.oratv.gr";
            masters { 88.218.110.178; };
    };
    
    //// MAKE MANUAL ENTRIES BELOW THIS LINE! ////
    key rndc-key {
    	algorithm hmac-md5;
    	secret "mfkqvLYgvUapMFyNMw==";
    	};
    controls {
    	inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { rndc-key; };
    	};
    
    *** edit change NS www.oratv.gr. NS to ns1-ns2.oratv.gr. in pri.oratv.gr & add CNAMES***
     
    Last edited: Aug 13, 2008
  2. falko

    falko Super Moderator ISPConfig Developer

    So the zone transfer isn't working from ns1 to ns2?
    Any errors in your logs?
     

Share This Page