Saturday 1 December 2012

0 manual proxy squid dengan DNS


Pertama install bind9
Ketik perintah #apt-get install bin9

Setelah selesai copy db.127 (copy dengan nama db.192 ) dan  ( db.local copy dengan nama db.andri )
Ketik perintah
# cd /etc/bind
# cp db.127 db.192
# cp db.local db.andri

Sekarang kita edit db.andri
Ketik perintah # nano db.andri (enter)

Maka akan muncul seperti ini dan setting seperti ini :
;
; BIND data file for local loopback interface
;
$TTL    604800
@       IN      SOA     andri.com. root.andri.com. (
                             1        ; Serial
                        604800        ; Refresh
                         86400        ; Retry
                       2419200        ; Expire
                        604800 )      ; Negative Cache TTL
;
@       IN      NS      andri.com.
@       IN      A       192.168.21.1
 
 
Kalau sudah selesai kita simpan tekan ctrl+x, tekan y, (enter)
 
Sekarang kita edit yg db.192
Ketik perintah # nano db.192
 
;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@       IN      SOA     andri.com. root.andri.com. (
                             1        ; Serial
                        604800        ; Refresh
                         86400        ; Retry
                       2419200        ; Expire
                        604800 )      ; Negative Cache TTL
;
@       IN      NS      andri.com.
1.21.168       IN      PTR     andri.com.
 
Kita simpan dengan perintah yang tadi,, kalau lupa di tanggng sendiri J
 
Edit named.conf nya..
Ketik perintah # nano named.conf
 
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the 
// structure of BIND configuration files in Debian, *BEFORE* you customize 
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
 
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 "andri.com" {
        type master;
        file "/etc/bind/db.andri";
};
 
zone "192.in-addr.arpa" {
        type master;
        file "/etc/bind/db.192";
};
 
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; };
 
// From the release notes:
//  Because many of our users are uncomfortable receiving undelegated answers
//  from root or top level domains, other than a few for whom that behaviour
//  has been trusted and expected for quite some length of time, we have now
//  introduced the "root-delegations-only" feature which applies delegation-only
//  logic to all top level domains, and to the root domain.  An exception list
//  should be specified, including "MUSEUM" and "DE", and any other top level
//  domains from whom undelegated responses are expected and trusted.
// root-delegation-only exclude { "DE"; "MUSEUM"; };
 
include "/etc/bind/named.conf.local";
 
 
kita simpan dengan perintah tadi,,
 
 
sekarang restart bind9
ketik perintah # /etc/init.d/bind restart
 
sekarang kita cek dengan perintah # nslookup andri.com kalau da muncul berarti da berhasil..
 
kemudian seting di squid.conf
 
ketik #nano /etc/squid/squid.conf
 
tekan ctrl+w buat mencari,,  cari kata http_port 3128
kalu ada kata transparent,, maka hilangkan kata itu,,  
 
kita simpan kalau da selesai,, 
restart squid..  # /etc/ini.d/squid restart 
 
sekarng kita tinggal cek di browser,, sengan proxy,, andri.com port 3128,,  kalau bisa, setingan kita berhasil,,  
 
 
 
 

0 komentar:

Post a Comment