Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: bind multiple servers

  1. #1
    Join Date
    Oct 2013
    Beans
    13

    bind multiple servers

    Hi all,
    I have a problem with the configuration of two dns servers with bind and I hope that someone could help me.

    I have two different machines A and B, both with bind installed.
    The first one "A" (with address 192.168.10.111) has one zone "dnsA.com" with the reverse zone "10.168.192.in-addr.arpa".
    The second one "B" (192.168.10.222) has "dnsB.org" and "10.168.192.in-addr.arpa".

    What I would to create is that in the machine A there are some address and in B there are other sub-addess.
    e.g the information of test.dnsA.com are in A but if I want example.test.dns.com are in B.

    I would something like this:
    In A - "dig example.test.dnsA.com"
    A ask to B and B that has this info answer to A "192.168.10.333"

    My configurations of db.dnsA.com now are:

    Code:
    $TTL    604800
    $ORIGIN dnsA.com.
    @    IN    SOA    ns.dnsA.com. root.dnsA.com. ( 
                2013101700       ; Serial 
                 604800        ; Refresh 
                  86400        ; Retry 
                2419200        ; Expire 
                 604800 )    ; Negative Cache TTL 
    ; 
    @    IN    NS    ns.dnsA.com. 
    ns    IN    A    192.168.10.111 
     
    test    IN    NS    dnsB.org. 
    test    IN    A    192.168.10.222

    Thanks!!!!

  2. #2
    Join Date
    Oct 2013
    Beans
    15

    Re: bind multiple servers

    You should just look at master slave dns setup.

  3. #3
    Join Date
    Oct 2013
    Beans
    13

    Re: bind multiple servers

    Quote Originally Posted by L486XGW View Post
    You should just look at master slave dns setup.

    My setup are, for A:

    Code:
    zone "dnsA.com" {  
            type master; 
            file "/etc/bind/db.dnsA.com"; 
    }; 
     
    zone "56.168.192.in-addr.arpa" {  
            type master; 
            file "/etc/bind/db.192"; 
    };
    For B:

    Code:
    zone "dnsB.org" {  
            type master; 
            file "/etc/bind/db.dnsB.org"; 
    }; 
     
    zone "56.168.192.in-addr.arpa" {  
            type master; 
            file "/etc/bind/db.192"; 
    };
    I didn't put the slave server because I read its goal is to maintain an identical copy of the master records.

  4. #4
    Join Date
    Oct 2013
    Beans
    13

    Re: bind multiple servers

    could you explain better what you mean?
    thanks

  5. #5
    Join Date
    Dec 2010
    Beans
    573
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: bind multiple servers

    What are you trying to do? The partial config you have shown look like you are trying to host a DNS domain on dnsA and a sub-doamin on dnsB but not correctly.

    With the config on dnsA using the zone "dnsA.com" and on dnsB using the zone "dnsB.com" you are basically defining two different DNS Domains "dnsA.com" and "dnsB.com".

    In the db.dnsA.com you are defining its authoritative name server as ns.dnsA.com and ns.dnsA.com has an IP address of 192.168.10.111. You them define that dnsB.com is a name server for test.dnsA.com and that test.dnsA.com has an address of 192.168.10.222.

    In the zone deffinitions on dnsB I do not see a zone for test.dnsA.com that you defined in the dnsA.com zone on dnsA.

  6. #6
    Join Date
    Oct 2013
    Beans
    13

    Re: bind multiple servers

    Quote Originally Posted by hawkmage View Post
    What are you trying to do? The partial config you have shown look like you are trying to host a DNS domain on dnsA and a sub-doamin on dnsB but not correctly.

    With the config on dnsA using the zone "dnsA.com" and on dnsB using the zone "dnsB.com" you are basically defining two different DNS Domains "dnsA.com" and "dnsB.com".

    In the db.dnsA.com you are defining its authoritative name server as ns.dnsA.com and ns.dnsA.com has an IP address of 192.168.10.111. You them define that dnsB.com is a name server for test.dnsA.com and that test.dnsA.com has an address of 192.168.10.222.

    In the zone deffinitions on dnsB I do not see a zone for test.dnsA.com that you defined in the dnsA.com zone on dnsA.
    If I understood well, I need to put another zone in B but with which type? and in another config file?

    Code:
    zone "dnsB.org" {  
            type master; 
            file "/etc/bind/db.dnsB.org"; 
    }; 
    
    zone "test.dnsA.com" {  
            type ?; 
            file "/etc/bind/db.??"; 
    }; 
     
    zone "56.168.192.in-addr.arpa" {  
            type master; 
            file "/etc/bind/db.192"; 
    };
    thanks!

  7. #7
    Join Date
    Dec 2010
    Beans
    573
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: bind multiple servers

    Before I can help you further I need to know what you are trying to do. Are you trying to create a sub-domain of dnsA on dnsB or do you want to host the same DNS domain on both.

  8. #8
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: bind multiple servers

    I'm also a bit unclear on what you're trying to accomplish, but I think the solution you're looking for is to use a forwarder. Suppose the primary nameserver for dnsA is on 10.10.10.10, while the primary for dnsB is on 10.10.10.11. In named.conf on 10.10.10.10 create an entry like this:

    Code:
    zone "dnsB.com" {
         type forward;
         forward only;
         forwarders { 10.10.10.11; };
    };
    Now any requests for machines in dnsB.com will be forwarded to 10.10.10.11 where the zone file for that domain is stored.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  9. #9
    Join Date
    Oct 2013
    Beans
    13

    Re: bind multiple servers

    Sorry if I was confused, I will try to explain better and I changed the name to be more clear.
    In this scenario that I need to create I have a machine that implement a part of dns that contain the address of other dns of other company. Each company has associated an id number (e.g. company1 --> 123)
    So, I would that this machine has a configuration like this:

    123 --> company1.com. --> 10.10.10.11
    456 --> company2.com. --> 10.10.10.12
    ...

    After I would configure also the dns of the company1.com that inside contains the address of a specific product. Also here each product have an ID.
    For example, in company1.com:

    789 --> product1 --> 10.10.10.13
    ...

    At the end, I would send at "dns.com" the query "dig 789.123.ons.com" and I would obtain the address of the product 789.

    Thanks.

  10. #10
    Join Date
    Dec 2010
    Beans
    573
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: bind multiple servers

    A DNS zone file contains info on the domain in its name. So if you have the domains "ons.com", "123.ons.com" and "456.ons.com" you will need a zone file for each. In the "ons.com" zone you will need to have DNS glue records for the "123.ons.com" and "456.ons.com" domains.

    If you want all 3 domains to be on both servers and both be masters you would do something lie this:
    Code:
    zone "ons.com" {
        type master;
        file "/etc/bind/db.ons.com";
    };
    
    
    zone "123.ons.com" {
        type master;
        file "/etc/bind/db.123.ons.com";
    };
    
    
    zone "456.ons.com" {
        type master;
        file "/etc/bind/db.456.ons.com";
    };
    db.ons.com:
    Code:
    $ORIGIN .
    $TTL 86400      ; 1 day
    ons.com        IN SOA  ons.com. ons.com. (
                    131008000  ; serial
                    28800      ; refresh (8 hours)
                    7200       ; retry (2 hours)
                    2419200    ; expire (4 weeks)
                    86400      ; minimum (1 day)
                    )
    $TTL 259200 ;3 days
    $ORIGIN ons.com.
                IN    NS    ns1
                IN    NS    ns2
    ns1            IN    A    10.10.10.11
    ns2            IN    A    10.10.10.12
    #DNS Domain Glue entries for 123.ons.com
    $ORIGIN 123.ons.com.
                IN    NS    ns1
                IN    NS    ns2
    ns1            IN    A    10.10.10.11
    ns2            IN    A    10.10.10.12
    #DNS Domain Glue entries for 456.ons.com
    $ORIGIN 456.ons.com.
                IN    NS    ns1
                IN    NS    ns2
    ns1            IN    A    10.10.10.11
    ns2            IN    A    10.10.10.12
    db.123.ons.com:
    Code:
    $ORIGIN .
    $TTL 86400      ; 1 day
    123.ons.com        IN SOA  123.ons.com. 123.ons.com. (
                    131008000  ; serial
                    28800      ; refresh (8 hours)
                    7200       ; retry (2 hours)
                    2419200    ; expire (4 weeks)
                    86400      ; minimum (1 day)
                    )
    $TTL 259200 ;3 days
    $ORIGIN 123.ons.com.
                IN    NS    ns1
                IN    NS    ns2
    ns1            IN    A    10.10.10.11
    ns2            IN    A    10.10.10.12
    db.456.ons.com:
    Code:
    $ORIGIN .
    $TTL 86400      ; 1 day
    456.ons.com        IN SOA  456.ons.com. 456.ons.com. (
                    131008000  ; serial
                    28800      ; refresh (8 hours)
                    7200       ; retry (2 hours)
                    2419200    ; expire (4 weeks)
                    86400      ; minimum (1 day)
                    )
    $TTL 259200 ;3 days
    $ORIGIN 456.ons.com.
                IN    NS    ns1
                IN    NS    ns2
    ns1            IN    A    10.10.10.11
    ns2            IN    A    10.10.10.12
    Or if you want server2.com to be a slave to server1.com your zone definition would be like this:
    Code:
    zone "ons.com" {
        type slave;
        file "/etc/bind/db.ons.com";
        masters { 10.10.10.11 ; };
    };
    
    
    zone "123.ons.com" {
        type slave;
        file "/etc/bind/db.123.ons.com";
        masters { 10.10.10.11 ; };
    };
    
    
    zone "456.ons.com" {
        type slave;
        file "/etc/bind/db.456.ons.com";
        masters { 10.10.10.11 ; };
    };

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •