Results 1 to 3 of 3

Thread: Bind9 DNS with multidomain issues

  1. #1
    Join Date
    Oct 2007
    Beans
    34
    Distro
    Ubuntu 10.04 Lucid Lynx

    Question [SOLVED]Bind9 DNS with multidomain issues

    Dear All,



    I have an issues with my DNS Server (Bind9)

    I have 03 domain, I want to host on one DNS server



    1. A.COM

    2. B.COM

    3. C.COM



    Hostname of DNS Server: ns.example.com

    IP: 192.168.0.1



    This is my config file

    I add 3 zone on named.conf.local





    Code:
    ......
    
    zone "a.com" {
    
       type master;
    
       file "/etc/bind/db.a.com";
    
    };
    
    
    
    zone "b.com" {
    
       type master;
    
       file "/etc/bind/db.b.com";
    
    };
    
    
    
    zone "c.com" {
    
       type master;
    
       file "/etc/bind/db.c.com";
    
    };
    
    .....


    db.a.com

    Code:
    $TTL 604800
    
    @       IN      SOA     ns.example.com.        admin.example.com. (
    
                            070725  ;
    
                            604800  ;
    
                            86400   ;
    
                            2419200 ;
    
                            604800 )
    
    ;
    
    @           IN      NS      ns.example.com.
    
                IN      MX      10      mail.a.com.
    
    ns          IN      A       192.168.0.1
    
    
    
    mail.a.com  IN      A       192.168.0.1






    db.b.com

    Code:
    $TTL 604800
    
    @       IN      SOA     ns.example.com.        admin.example.com. (
    
                            070725  ;
    
                            604800  ;
    
                            86400   ;
    
                            2419200 ;
    
                            604800 )
    
    ;
    
    @           IN      NS      ns.example.com.
    
                IN      MX      10      mail.b.com.
    
    ns          IN      A       192.168.0.1
    
    
    
    mail.b.com  IN      A       192.168.0.1




    db.c.com

    Code:
    $TTL 604800
    
    @       IN      SOA     ns.example.com.        admin.example.com. (
    
                            070725  ;
    
                            604800  ;
    
                            86400   ;
    
                            2419200 ;
    
                            604800 )
    
    ;
    
    @           IN      NS      ns.example.com.
    
                IN      MX      10      mail.c.com.
    
    ns          IN      A       192.168.0.1
    
    
    
    mail.c.com  IN      A       192.168.0.1


    Edit resolv.conf

    nameserver 192.168.0.1

    Now I can dig mx to 3 domain

    Code:
    ; <<>> DiG 9.4.2-P2.1 <<>> mx a.com
    
    ;; global options:  printcmd
    
    ;; Got answer:
    
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27687
    
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
    
    
    
    ;; QUESTION SECTION:
    
    ;a.com.		IN	MX
    
    
    
    ;; ANSWER SECTION:
    
    a.com.	604800	IN	MX	10 mail.a.com.
    
    
    
    ;; AUTHORITY SECTION:
    
    a.com.	604800	IN	NS	ns.example.com.
    
    
    
    ;; Query time: 1 msec
    
    ;; SERVER: 192.168.0.1#53(192.168.0.1)
    
    ;; WHEN: Wed Apr  7 12:46:15 2010
    
    ;; MSG SIZE  rcvd: 82




    Code:
    ; <<>> DiG 9.4.2-P2.1 <<>> mx b.com
    
    ;; global options:  printcmd
    
    ;; Got answer:
    
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27687
    
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
    
    
    
    ;; QUESTION SECTION:
    
    ;b.com.		IN	MX
    
    
    
    ;; ANSWER SECTION:
    
    b.com.	604800	IN	MX	10 mail.b.com.
    
    
    
    ;; AUTHORITY SECTION:
    
    b.com.	604800	IN	NS	ns.example.com.
    
    
    
    ;; Query time: 1 msec
    
    ;; SERVER: 192.168.0.1#53(192.168.0.1)
    
    ;; WHEN: Wed Apr  7 12:46:15 2010
    
    ;; MSG SIZE  rcvd: 82






    Code:
    ; <<>> DiG 9.4.2-P2.1 <<>> mx c.com
    
    ;; global options:  printcmd
    
    ;; Got answer:
    
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27687
    
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
    
    
    
    ;; QUESTION SECTION:
    
    ;c.com.		IN	MX
    
    
    
    ;; ANSWER SECTION:
    
    c.com.	604800	IN	MX	10 mail.c.com.
    
    
    
    ;; AUTHORITY SECTION:
    
    c.com.	604800	IN	NS	ns.example.com.
    
    
    
    ;; Query time: 1 msec
    
    ;; SERVER: 192.168.0.1#53(192.168.0.1)
    
    ;; WHEN: Wed Apr  7 12:46:15 2010
    
    ;; MSG SIZE  rcvd: 82




    BUT I can ping to any alias of 3 domain mail

    mail.a.com

    mail.b.com

    mail.c.com



    Help me!!!!



    Regards,

    NyU
    Last edited by nyu2007; April 9th, 2010 at 05:55 PM.

  2. #2
    Join Date
    Nov 2005
    Location
    Bordeaux, France
    Beans
    11,292
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Bind9 DNS with multidomain issues

    It's better to explicitly define the $ORIGIN of your zones, for example:

    Code:
    $ORIGIN .
    $TTL 604800
    
    a.com.       IN      SOA     ns.example.com.        admin.example.com. (
                            070725  ;
                            604800  ;
                            86400   ;
                            2419200 ;
                            604800 )
    ;
    
                IN      NS      ns.example.com.
    
                IN      MX      10      mail.a.com.
    
    $ORIGIN a.com.
    ns          IN      A       192.168.0.1
    mail        IN      A       192.168.0.1
    With this zone file, it should work. The problem you have with your current one is that mail.a.com is not dot-terminated, and is therefore interpreted relative to the ORIGIN. Since you didn't specify an ORIGIN, it defaults to the zone name (i.e. a.com), and mail.a.com is interpreted as mail.a.com.a.com..
    「明後日の夕方には帰ってるからね。」


  3. #3
    Join Date
    Oct 2007
    Beans
    34
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Bind9 DNS with multidomain issues

    Many many thanks Bachstelze
    Now my issues was SOLVED

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
  •