[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [NETVAERK] Bind og zone fil



Hej,

Jan Trøjgaard <sslug@sslug> writes:
> Jeg kan sagtens slå tuxnet op med nslookup og dig, men ikke de to
> andre. 
>
> Hvad gør jeg for at kunne lave et positivt DNS opslag på troejgaard og
> tester ??

DNS behøver altså ikke være så besværligt...

I det følgende setup benyttes djbdns¹ - ikke BIND!
Det forudsætter at der er oprettet 3 brugere på systemet (dnscache,
tinydns og dnslog), samt at daemontools² er installeret og kørende.

Der installeres 2 services - en dnscache, der lytter på 172.16.3.106
og tinydns, der lytter på 127.0.0.1

### Konfiguration af dnscache:
% sudo mkdir -p /etc/djbdns
% sudo dnscache-conf dnscache dnslog /etc/djbdns/dnscache 172.16.3.106

### Lad supervise fra daemontools starte og overvåge dnscache
% sudo ln -s /etc/djbdns/dnscache /service

### Tillad alle maskiner fra 172.16.3.* at benytte dnscache 
% sudo touch /service/dnscache/root/ip/172.16.3

### Opret en ny resolv.conf (tag etv backup af den gamle...)
% sudo cat << EOF > /tmp/resolv.conf
search tuxnet.intranet
nameserver 172.16.3.106
EOF
% sudo mv /tmp/resolv.conf /etc/resolv.conf

### Test at dnscache virker
% dnsip dr.dk
195.137.194.128

### Konfiguration af tinydns
% sudo tinydns-conf tinydns dnslog /etc/djbdns/tinydns 127.0.0.1

### Lad supervise fra daemontools starte og overvåge tinydns
% sudo ln -s /etc/djbdns/tinydns/ /service

### Opret domænet tuxnet.intranet med tilhørende hosts
% cd /service/tinydns/root
% sudo ./add-ns tuxnet.intranet 127.0.0.1
% sudo ./add-host router.tuxnet.intranet 192.168.2.2
% sudo ./add-host tester.tuxnet.intranet 192.168.2.121
% sudo ./add-host troejgaard.tuxnet.intranet 192.168.2.120
% sudo ./add-mx tuxnet.intranet 192.168.2.5
% sudo make         

### Fortæl dnscache at forespørgsler om tuxnet.intranet skal sendes til
### tinydns (og ikke til root-serverne, der jo intet kender til .intranet)
% sudo cat << EOF > /tmp/tuxnet.intranet
127.0.0.1
EOF
% sudo mv /tmp/tuxnet.intranet /service/dnscache/root/servers/    

### Bed dnscache genlæse sine datafiler
% sudo svc -h /service/dnscache

### Test at det hele virker
% ping -c1 tester
PING tester.tuxnet.intranet (192.168.2.121) 56(84) bytes of data.

--- tester.tuxnet.intranet ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

% dnsmx tuxnet.intranet
0 a.mx.tuxnet.intranet

% dnsip a.mx.tuxnet.intranet
192.168.2.5

% dnsip troejgaard.tuxnet.intranet
192.168.2.120

Selvom ovenstående er lige til at cut'n'paste skader det selvfølgelig
ikke at læse op på DNS, så hvad man ved hvad der foregår. Der er massere
af dokumentation om DNS på djbdns' webside¹.


/Claus A

¹) http://cr.yp.to/djbdns.html
²) http://cr.yp.to/daemontools.html


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2006-04-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *