Setting pdnsd di Ubuntu Server

Written by Bima Firewall 0 comments Posted in:
Share

Pdnsd adalah DNS cache proxy...Proses meminta terjemahan nama domain ke IP address ini dari komputer kita ke DNS server ISP tidak lama, rata-rata memakan waktu 500 milidetik, alias setengah detik. namun bayangkan jika DNS server ISP itu bisa kita pindahkan ke dalam jaringan lokal di rumah, maka proses penerjemahan nama domain tadi bisa disingkat sampai cuma tinggal 1 milidetik. jika seharian kita melakukan ratusan permintaan penerjemahan nama domain, banyak waktu yang bisa dihemat jika DNS server-nya ada di jaringan lokal.

untuk mengetahui berapa lama proses yang dibutuhkan untuk melakukan penerjemahan nama domain ini, di linux maupun mac bisa digunakan perintah dig. 
langkah - langkah :

# sudo apt-get update
# sudo apt-get install pdnsd

edit usr/share/pdnsd/pdnsd-resolvconf.conf

/* Debian specific configuration to work with resolvconf */

global {
    perm_cache = 1024;
    cache_dir = "/var/cache/pdnsd";
    run_as = "pdnsd";
    server_ip = any;  // Use eth0 here if you want to allow other
                            // machines on your network to query pdnsd.
    status_ctl = on;
    paranoid = on;
    min_ttl = 15m;          // Retain cached entries at least 15 minutes.
    max_ttl = 1w;           // One week.
    timeout = 10;           // Global timeout option (10 seconds).
}

/* server {
    label = "resolvconf";
    proxy_only = on;
} */
server {
    label=DNSpeedy;
    ip=202.134.0.155;
    ip=203.130.193.74;
        timeout=30;
        interval=30;
        uptest=ping;
        ping_timeout=50;
        purge_cache=off;
}

server {
    label=DNS;
    ip=180.211.88.5;
    ip=180.211.88.50;
    timeout=30;
    interval=30;
    uptest=ping;
    ping_timeout=50;
    purge_cache=off;
}
source {
    owner = localhost;
    file = "/etc/hosts";
}

rr {
    name = localhost;
    reverse = on;
    a = 127.0.0.1;
    owner = localhost;
    soa = localhost,root.localhost,42,86400,900,86400,86400;
}

 rr {
    name = dns.brother.info;
    reverse = on;
    a = 192.168.2.2;
    owner = localhost;
    soa = localhost,root.localhost,42,86400,900,86400,86400;
}

/* vim:set ft=c: */

edit lagi di /etc/default/pdnsd :

# do we start pdnsd ?
START_DAEMON=yes
# auto-mode, overrides /etc/pdsnd.conf if set [see /usr/share/pdnsd/]
AUTO_MODE=
# optional CLI options to pass to pdnsd(8)
START_OPTIONS=

edit lagi di /etc/pdnsd.conf :

/* Debian specific configuration to work with resolvconf */

global {

    perm_cache = 1024;
    cache_dir = "/var/cache/pdnsd";
    run_as = "pdnsd";
    server_ip = any;  // Use eth0 here if you want to allow other
                            // machines on your network to query pdnsd.
    status_ctl = on;
    paranoid = on;
    min_ttl = 15m;          // Retain cached entries at least 15 minutes.
    max_ttl = 1w;           // One week.
    timeout = 10;           // Global timeout option (10 seconds).
}

/* server {

    label = "resolvconf";
    proxy_only = on;
} */
server {
    label=DNSpeedy;
    ip=202.134.0.155;
    ip=203.130.193.74;
        timeout=30;
        interval=30;
        uptest=ping;
        ping_timeout=50;
        purge_cache=off;
}

server {

    label=DNS;
    ip=180.211.88.5;
    ip=180.211.88.50;
    timeout=30;
    interval=30;
    uptest=ping;
    ping_timeout=50;
    purge_cache=off;
}
source {
    owner = localhost;
    file = "/etc/hosts";
}

rr {

    name = localhost;
    reverse = on;
    a = 127.0.0.1;
    owner = localhost;
    soa = localhost,root.localhost,42,86400,900,86400,86400;
}
 rr {
    name = dns.brother.info;
    reverse = on;
    a = 192.168.2.2;
    owner = localhost;
    soa = localhost,root.localhost,42,86400,900,86400,86400;
}

/* vim:set ft=c: */

edit /etc/resolv.conf

name-server nameserver 127.0.0.1

edit /etc/dhcp/dhclient.conf :

#prepend domain-name-servers 127.0.0.1; hilangkan tanda # 

tambahkan pada rc.local :

/etc/init.d/pdnsd restart

langsung di test : 

sudo /etc/init.d/pdnsd restart


semua langkah pengeditan harus di simpan setelah di edit/ditambahkan...

192.168.2.2 IP server... di sesuaikan IP server anda...

Selamat Mencoba ^_^



0 comments:



:)) :)] ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} ~x( :-t b-( :-L x( =))

Post a Comment

Powered by Blogger.

Komentar