Bind Configuration fuer TLDs

Snyke

Well-known member
ID: 348381
L
27 Mai 2009
400
28
Moinsen, hab' seit einiger Zeit Probleme mit meiner Bind Configuration. Ich moechte meine Domain nicht nur ueber die www-subdomain ansprechen, sondern auch example.com anstatt nur www.example.com nutzbar machen (und diese dann per mod_rewrite umleiten).

Momentan sieht meine Config sehr einfach aus:
Code:
options {                                                      
        directory "/var/bind";

        listen-on {            
                127.0.0.1;     
                192.168.0.1;   
                192.168.2.2;   
        };                     

        // if you have problems and are behind a firewall:
        query-source address * port 53;                   
        pid-file "/var/run/named/named.pid";              
};

zone "z.y.x.in-addr.arpa" IN {
        type master;             
        file "pri/z.y.x";     
        allow-update { none; };  
        notify no;               
};                               

zone "mydomain.net" IN {
        type master;
        file "pri/mydomain.zone";
        allow-update { none; };
        notify no;
};
und die Config fuer die mydomain.zone:
Code:
; Zone File for mydomain.ch
$TTL 3D
@       IN      SOA     dns1.mydomain.ch.  root.mydomain.ch. (
                        2007101801
                        8H
                        2H
                        4W
                        1D )
;
                NS      dns1.mydomain.ch.
                MX      10 mail.mydomain.ch.
;
localhost       A       127.0.0.1
www             A       x.y.z.z
demo            A       x.y.z.z
staging         A       x.y.z.z
mail            MX      10 mail

Das Problem is dass www.mydomain.ch funktioniert (teilweise, da bekomm ich von diversen Usern Meldungen dass es bei ihnen ned funzt) aber mydomain.ch (ohne www.) geht nicht.

Hat da jemand ne Ahnung?
 
Hi Snyke,

das Zone-File sieht bei mir wiefolgt aus:
PHP:
$ORIGIN .
$TTL 86400;
mydomain.de            IN SOA ns1.13web.net. hostmaster.13web.net. (
                        2008021901;  // serial
                        10800;
                        1800;
                        604800;
                        86400;
                        )
                NS     ns1.13web.net.
                NS     ns2.13web.net.
                A      x.x.x.x
                MX     50 mx1.mydomain.de.
                MX     70 mx2.mydomain.de.

$ORIGIN mydomain.de.
mx1             A       x.x.x.x
mx2             A       y.y.y.y

www             CNAME   mydomain.de.
pop3            CNAME   mydomain.de.
smtp            CNAME   mydomain.de.
imap            CNAME   mydomain.de.
mail            CNAME   mydomain.de.

probier es mal so. Aber vergiss nicht, die Serial zu ändern, sonst wird die Zone beim "rndc-reconf && rndc-reload" nicht verteilt.

Gruß
 
Hm, also wie so oft, sobald ich den Post fertig hatte hab' ich die Loesung gefunden: um domains ohne www. zum laufen zu kriegen muss man einfach ein '@' als subdomain angeben.

Code:
www             A       x.y.z.z
@               A       x.y.z.z
@               A       x.y.z.z
*.mydomain.de. A x.y.z.z

Das letzte is uebrigens ein kleiner Bonus: eine wildcard domain, damit werden alle nicht vorher angegebenen subdomains abgedeckt und auf x.y.z.z gemappt, also auch gaga.mydomain.ch.

Hoffe das hilft auch anderen :D