Riprendo questo topic perchè proprio stamattina ho installato e configurato
pdnsd, l' ho fatto su una debian etch ma su ubuntu è la stessa cosa.
Ovviamente dopo aver dato il classico
sudo apt-get install pdnsd dovrete solamente modificare un paio di files e poi il tutto funzionerà.
ALT+F2 e digitate
gksu gedit /etc/pdnsd.confModificate il file in questo modo:
// $Id: pdnsd.conf.in,v 1.4 2000/11/11 20:32:58 thomas Exp $
global {
perm_cache=512;
cache_dir="/var/cache/pdnsd";
max_ttl=604800;
run_as="pdnsd";
paranoid=on;
# next setting allows ppp/ip-up update the name servers -- ABa / 20040213
status_ctl=on;
# server_port=53;
# server_ip="127.0.0.1";
}
server {
label="open-dns";
ip="208.67.220.222","208.67.220.220";
timeout=30;
interval=30;
uptest=ping;
ping_timeout=50;
purge_cache=off;
}
# if you installed resolvconf, and status_ctl=on
server {
label="resolvconf";
}
source {
ttl=86400;
owner="localhost.";
# serve_aliases=on;
file="/etc/hosts";
}
/*
neg {
ttl=86400;
name="foo.bar.";
types=domain;
}
neg {
ttl=86400;
name="foo.baz.";
types=A,AAAA, MX;
}
rr {
ttl=86400;
owner="localhost.";
name="localhost.";
a="127.0.0.1";
soa="localhost.","root.localhost.",42,86400,900,86400,86400;
}
rr {
ttl=86400;
owner="localhost.";
name="1.0.0.127.in-addr.arpa.";
ptr="localhost.";
soa="localhost.","root.localhost.",42,86400,900,86400,86400;
}
*/
Controllate le parti modificate (attenti perchè esiste una guida su un forum di debian dove ci sono un paio di errori, ma è quella dove ho letto la procedura !).
In pratica dovete togliere questi caratteri
/* e
*/ dove è necessario e modificare la sezione
server aggiungendo i due servers open.
Poi modificate il file
resolv.conf cancellando tutto e lasciando solo:
nameserver 127.0.0.1Cambiate i permessi del file (sudo chmod 444 resolv.conf) e se usate kppp o similia togliete la risoluzione automatica dei dns e mettete i due open 208.67.220.222, 208.67.220.220 altrimenti resolv. conf verrà irrimediabilmente riscritto.
Io non ho bisogno urgente o particolare di questi dns open perchè quelli wind funzionano ottimamente, ma uso il tutto solo per velocizzare la ricerca dei siti tramite il server dns locale (pdnsd appunto).
Finito il tutto diamo un bel:
/etc/init.d/pdnsd restartE il server locale sarà attivo e configurato. Per verificare il suo funzionamento date due volte il seguente comando:
dig forum.ubuntu-it.org; <<>> DiG 9.3.4 <<>> forum.ubuntu-it.org
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23830
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;forum.ubuntu-it.org. IN A
;; ANSWER SECTION:
forum.ubuntu-it.org. 82500 IN A 91.189.94.208
;; Query time: 101 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Jan 20 11:45:34 2008
;; MSG SIZE rcvd: 53
dig forum.ubuntu-it.org; <<>> DiG 9.3.4 <<>> forum.ubuntu-it.org
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7991
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;forum.ubuntu-it.org. IN A
;; ANSWER SECTION:
forum.ubuntu-it.org. 82492 IN A 91.189.94.208
;; Query time: 2 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Jan 20 11:45:42 2008
;; MSG SIZE rcvd: 53
La query time passa da 101 msec a 2 msec. Fatemi sapere se effettivamente velocizzano le nuove connessioni.