PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : hosts2dns



Pleitegeier
17.03.04, 10:48
ich hab hier einen (debian) lamp server mit diversen vhosts. an meinem windows client habe ich die hosts datei so angepasst, dass jeder (vhost) name auf die ip des lamp servers verweist.

so kann ich zwar von meinem windows client aus mit allen vhosts arbeiten, aber das ist ne blöde lösung, falls ich mal von einem anderem client aus connecten will.

ich denke mal, dass sich das mit hilfe eines dns servers ändern lässt. ich habs noch nie gemacht und es scheint doch komplexer zu sein, als ich gedacht habe...

ich hab mal bind9 installiert und mir die configs angesehen, ich weiss nicht, wie und wo ich nen simplen verweis eintragen muss vor allem in welche 'kategorie'

ich möchte einfach nur, dass der dns server weiss, welche namen zu welcher ip gehören

also diesen hosteintrag auf dns'isch :)


192.168.5.231 www.rzx.de lnxdeb test.lnxdeb board.lnxdeb admin.lnxdeb

wie stell ich das an?

bevor wieder nen suchhinweis kommt, gesucht habe ich, aber bestimmt mit den falschen suchbegriffen :)...sry, is für mich halt völliges neuland

thx 4 help

Svenny
17.03.04, 11:24
so hier mal meine lokale dns zone
tubby.land:


@ IN SOA dipsy.tubby.land. root.tubby.land. (
2004031100 ; serial
86400 ; refresh
3600 ; retry
3600000 ; expire
86400 ; default_ttl
)
@ IN NS dipsy.tubby.land.
@ IN MX 5 dipsy.tubby.land.

dipsy IN A 192.168.0.1
lala IN A 192.168.0.2

tinkywinky IN A 192.168.0.3
po IN A 192.168.0.100
nono IN A 192.168.0.101

0.168.192.in-addr.arpa:


@ 1D IN SOA dipsy.tubby.land. root.tubby.land. (
2004031500 ; Serial#
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

@ 1D IN NS dipsy.tubby.land.
1 1D IN PTR dipsy.tubby.land.
2 1D IN PTR lala.tubby.land.


die files haust du ins /var/cache/bind und stellst deine bind config so ein:

named.conf:


include "/etc/bind/named.conf.options";

// prime the server with knowledge of the root servers
zone "." {
type hint;
file "/etc/bind/db.root";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
type master;
file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};

zone "com" { type delegation-only; };
zone "net" { type delegation-only; };


/* ################################### */

zone "tubby.land"{
type master;
file "tubby.land";
};
zone "0.168.192.in-addr.arpa" IN {
type master;
file "0.168.192.in-addr.arpa";
};


named.conf.options:


options {
directory "/var/cache/bind";
listen-on {
127.0.0.1;
192.168.0.1;
};
pid-file "/var/run/bind/run/named.pid";

forwarders { ns1.deinprovider.tld; ns2.deinprovider.tld; };
};

Pleitegeier
17.03.04, 11:36
besten dank, werds direkt mal testen :)

Jens P.
17.03.04, 12:02
Hallo Pleitegeier,

falls du mit den Einträgen von Svenny nicht zurecht kommst, empfehle ich Dir das Howto von www.linuxbu.ch!

Ich finde die Doku prima - nach dieser Lektüre ist das Thema bei weitem nicht mehr so komplex... ;)

Gruß
Jens