Installazione e configurazione djbdns (alternativo a BIND)

Installazione e configurazione djbdns.
Istruzioni essenziali.

Parametri impostati:
Rete: 192.168.20.
IP DNS server: 192.168.65.111
Dominio: texilee.it

- Installazione daemon tools
mkdir -p /var/package
chmod 1755 /var/package
cd /var/package
gunzip daemontools-0.76.tar
tar -xpf daemontools-0.76.tar
rm daemontools-0.76.tar

cd admin
package/install


- Installazione ucspi-tcp
cd /tmp
gunzip ucspi-tcp-0.88.tar
tar -xf ucspi-tcp-0.88.tar
make
make setup check


- Modifica daemontools
cd /command
vi svscanboot

  
-- Aggiungere /var prima di service
      
/command/svc -dx /var/service/* /var/service/*/log
env - PATH=$PATH svscan /var/service 2>&1 | \

    
vi /etc/inittab

In fondo commentare la parte SV
init q
    
ps -aux
Verificare che SVSCAN sia su /var/service
Modificare /etc/resolv.conf:
domain tuodominio
nameserver ip_server_dns


- Preparazione alla configurazione dns
mkdir /var/dns
groupadd dns
useradd dnscache -g dns -d /var/dns -s /bin/false
useradd dnslog -g dns -d /var/dns -s /bin/false
useradd dns -g dns -d /var/dns -s /bin/false


-  Installazione djbdns
cd /tmp
tar -xvzf djbdns-1.05.tar.gz
cd djbdns-1.05
make
make setup check


- Configurazione delle zone
tinydns-conf dns dnslog /var/dns/nome_zona ip_server-dns
ln -s /var/dns/nome_zona /var/service
cd /var/dns/nome_zona/root
./add-ns tuodominio ip_server-dns
./add-ns xxx.xxx.xxx.in-addr.arpa ip_server-dns

xxx.xxx.xxx.in-addr.arpa da modificare secondo la rete, ad esempio 192.168.65.x diventa 65.168.192.in-addr.arpa

- Modifica file "data"
vi data

tuodominio:ip_server-dns:ns1:numero


"Es.  .texilee.it:192.168.65.111:a:259200
      .texilee.it:192.168.65.111:ns1:259200

- Popolamento zona
./add-host pc1.texilee.it       192.168.65.25
./add-host www.texilee.it       192.168.65.54
./add-host pippo.texilee.it     192.168.65.222
./add-host fax.texilee.it       192.168.65.77
./add-host dns.texilee.it     192.168.65.111
./add-alias master.texilee.it   192.168.65.25
make


- dns cache server (locale)
dnscache-conf dnscache dnslog /var/dns/dnscache ip_server-dns
ln -s /var/dns/dnscache /var/service
touch /var/dns/dnscache/root/ip/192.168.65
echo 127.0.0.1 > /var/dns/dnscache/root/servers/texilee.it
echo 127.0.0.1 > /var/dns/dnscache/root/servers/1.0.0.127.in-addr.arpa
echo 127.0.0.1 > /var/dns/dnscache/root/servers/0.0.10.in-addr.arpa


- Per testare il funzionamento
dnsqr a www.texilee.it
1 www.texilee.it:
85 bytes, 1+1+0+0 records, response, noerror
query: 1 www.texilee.it
answer: www.texilee.it 86400 A 192.168.65.54

Privacy Policy