| Subcribe via RSS

DNS Multiple HOST

December 16th, 2008 | No Comments | Posted in Bebas

Langkah-langkah Membuat DNS Multiple HOST

1. Edit hostname
debianserver:/etc/bind# vim /etc/hostname
debianserver
esc:wq

2. Edit hosts
#vim /etc/hosts

127.0.0.1 localhost.localdomain localhost debianserver ns

#The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

3. Edit named.conf.local
//
// Do any local configuration here
//

zone “imron.com” IN {
type master;
file “/etc/bind/db.imron”;
allow-query {any;};
};

zone “2.168.192.in-addr.arpa” IN {
type master;
file “/etc/bind/rev.imron”;
};

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include “/etc/bind/zones.rfc1918″;

4. Edit db.imron
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA imron.com. root.imron.com. (
336 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
IN NS imron.com.
IN MX 10 imron.com.

dns IN A 192.168.2.15
ftp IN A 192.168.2.16
mail IN A 192.168.2.17

5. Edit rev.imron
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA imron.com. root.imron.com. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
IN NS imron.com.

15 IN PTR imron.com.
15 IN PTR serverdebian.
16 IN PTR ftp.imron.com.
17 IN PTR mail.imron.com.

6. Edit resolv.conf
#/bin/bash: indent: command not found
search .
domain imron.com
nameserver localhost
nameserver 192.168.2.15

7. Restrat DNS
debianserver:/etc/bind# /etc/init.d/bind9 restart
Stopping domain name service…: bind.
Starting domain name service…: bind.
debianserver:/etc/bind#

8. Pengujian

Menggunakan nslookup
debianserver:/etc/bind# nslookup
> localhost
Server: 192.168.2.15
Address: 192.168.2.15#53

Name: localhost
Address: 127.0.0.1
> 127.0.0.1
Server: 192.168.2.15
Address: 192.168.2.15#53

1.0.0.127.in-addr.arpa name = localhost.
> ftp
Server: 192.168.2.15
Address: 192.168.2.15#53

Name: ftp.imron.com
Address: 192.168.2.16
> mail
Server: 192.168.2.15
Address: 192.168.2.15#53

Name: mail.imron.com
Address: 192.168.2.17
> 192.168.2.17
Server: 192.168.2.15
Address: 192.168.2.15#53

17.2.168.192.in-addr.arpa name = mail.imron.com.
>

Menggunakan ping
> debianserver:/etc/bind# ping ftp.imron.com
PING ftp.imron.com (192.168.2.16) 56(84) bytes of data.

— ftp.imron.com ping statistics —
3 packets transmitted, 0 received, 100% packet loss, time 2010ms

debianserver:/etc/bind# ping mail.imron.com
PING mail.imron.com (192.168.2.17) 56(84) bytes of data.

— mail.imron.com ping statistics —
3 packets transmitted, 0 received, 100% packet loss, time 1999ms

debianserver:/etc/bind#

Proxy Dengan Squid Debian

December 11th, 2008 | No Comments | Posted in Bebas


Proxy

Fungsi:

  1. Menyimpan cache tampilan halaman web

  2. Mengatur bandwidth internet ke client

  3. Mengontrol aktivitas client (misalnya hak akses situs tertentu, melihat situs-situs yang dikunjungi client).

Bahan Membuat proxy:

  1. Komputer minimal 2 lan card.

  2. Komputer client

  3. Sambungan internet

     

Langkah-langkah membuat proxy:

  1. Setting ip server
    #vim /etc/network/interfaces
        iface eth0 inet static
    address 192.168.2.35
    netmask 255.255.255.192
    network 192.168.2.0
    broadcast 192.168.2.63
    gateway 192.168.2.1
    # dns-* options are implemented by the resolvconf package, if             installed
    dns-nameservers 202.134.0.155
    dns-search smkn1-tuban.sch.id
    esc:wq
    /etc/init.d/networking restart ->>merestrat lan card

  1. install packet squid3
    #apt-get install squid3

  2. membuat partisi squid
    #squid3 -z

  3. Melakukan konfigurasi squid

Perhatian: untuk keamanan sebelum dilakukan konfigurasi sebaiknya file configurasi asli squid disimpan dulu.
#cp /etc/squid3/squid.conf /etc/squid3/squid.conf_asli
#vim /etc/squid3/squid.conf
acl our_networks src 192.168.1.0/28 192.168.2.0/25 172.16.2.0/24

http_access allow our_networks

http_access allow localhost

untuk melakukan blokir buat sebuah file backlist

#vim /usr/share/backlist

*.*.sex.*.
playboy.com
dewasex.com
:esc wq

#vim /etc/squid3/squid.conf

acl backlist url_regex -i “/usr/share/backlist”
http_access deny backlist
# http_access deny all
esc:wq


5. Merestart squid
#/etc/init.d/squid3 restart


6. Menguji proxy
#tail -f /var/log/squid/access.log
1227631428.251 54487 192.168.2.52 TCP_MISS/301 2670 GET http://www.imsly.com/index.php/1010110A/5314c86178909cb03cf62f3bf5dd73960ed7fcff70e6f625afa4f41b54a210b566d466f5660823604d4f793de361185cca7072d35c9901687c99174cb0a321560 – DIRECT/67.159.47.205 text/html

1227631428.415 49394 192.168.2.52 TCP_MISS/200 4497 GET http://www.imsly.com/index.php/1010110A/5314c861789d98a732fd3938feda699a039de1ee61bbb533b3a0b81450af12a33ab660f66c467d5b5651336fc571537be02d2c8a4acf1117279e4e5d21560 – DIRECT/67.159.47.205 application/x-shockwave-flash

1227631428.487 11472 192.168.2.88 TCP_MISS/200 4029 GET http://tbn2.google.com/images? – DIRECT/64.233.189.99 image/jpeg

1227631428.543 11449 192.168.2.25 TCP_MISS/200 3603 GET http://drycounty.com/downloads/wallpapers/thm_bjw_kimdesmet_bj10.jpg – DIRECT/88.198.34.147 image/jpeg

1227631428.572 47443 192.168.2.81 TCP_MISS/200 1004 GET http://www.brothersoft.com/img/a74.gif – DIRECT/125.160.16.42 image/gif

1227631428.705 284 192.168.2.93 TCP_MISS/200 604 GET http://www.google.co.id/verify/EAAAAKai9XHxkw7aKzNjRDgZjxs.gif – DIRECT/72.14.235.147 image/gif

1227631428.782 362 192.168.2.93 TCP_MISS/200 1938 GET http://tbn3.google.com/images? – DIRECT/64.233.189.99 image/jpeg

Setting client