Help Setting Up A Secondary DNS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zgirl
    Registered User
    • Mar 2003
    • 24

    #1

    Help Setting Up A Secondary DNS

    hey all,

    how would i make a secondary dns server? I'm running redhat linux and bind 9.2.1

    I got a few ip addresses assigned to me, i think all i have to do is add my ip in /etc/resolv.conf
    this is the contents of this file:
    nameserver 1.1.1.1
    nameserver 2.2.2.2

    1.1.1.1 works prefectly but 2.2.2.2 doesn't,
    i believe i have to add it in /etc/conf as a "listen-to" statement..
    any help would be appreciated

    thanks
  • dirtysouth
    Confirmed User
    • Jul 2003
    • 2613

    #2
    Add this to etc/named.conf

    zone "yourdomain.com" IN {
    type master;
    file "/var/named/yourdomain.com.hosts";
    };

    Navigate to /var/named/

    Create a file called yourdomain.com.hosts

    Add this:

    $ttl 34800
    ;
    ;
    ;yourdomain.com.hosts
    ;

    @ IN SOA yourdomain.com. webmaster.yourdomain.com. (
    2003070801
    1200
    120
    1209600
    1200 )
    ;Define the nameservers
    IN NS your.nameserver.com.


    ;Define the hosts in this zone
    www.yourdomain.com. IN A 12.34.56
    yourdomain.com. IN A 12.34.56


    ;Define the aliases in this zone
    *.yourdomain.com. IN CNAME yourdomain.com.
    yourdomain.com. IN CNAME yourdomain.com.


    Then restart named (BIND).
    no sig

    Comment

    • OFFBEAT
      Confirmed User
      • Jul 2003
      • 398

      #3
      DNS is so complicated.

      Comment

      • Zgirl
        Registered User
        • Mar 2003
        • 24

        #4
        would this work?

        $TTL 86400

        @ IN SOA ns1.mydomain.com. ns2.mydomain.com. ns3.mydomain.com. (
        1059542250 ; Serial
        10800 ; Refresh
        3600 ; Retry
        604800 ; Expire
        86400 ) ; Minimum

        mydomain.com. IN NS ns1.mydomain.com.
        mydomain.com. IN NS ns2.mydomain.com.
        mydomain.com. IN NS ns3.mydomain.com.
        ns1.mydomain.com. IN A 1.1.1.1
        ns2.mydomain.com. IN A 1.1.1.2
        ns3.mydomain.com. IN A 1.1.1.3
        mydomain.com. IN A 1.1.1.1
        www.mydomain.com. IN CNAME mydomain.com.

        would that be all i have to do?
        btw: 1.1.1.1 will be mydomain.com and on that same ip i got my dns server running, which works.

        Comment

        Working...