TUTORIAL RESMI UKK PAKET 1 2011


1. SET DULU IP DI NETWORK

# The loopback network interface

auto lo

iface lo inet loopback

# The primary network interface

auto eth0

iface eth0 inet static

address xxx.xxx.xxx.xxx

netmask 255.255.255.0

network xx.xx.xx.xx

broadcast xx.xx.xx.xx

gateway xx.xx.xx.xx

dns-nameservers xx.xx.xx.xx

auto eth1

iface eth1 inet static

address xx.xx.xx.xx.xx

netmask 255.255.255.0

network xx.xx.xx.xx

broadcast xx.xx.xx.xx

2. EDIT resolv.conf

nameserver xx.xx.xx.xx

3. EDIT sysctl.conf

net.ipv4.ip_forward=1

4. EDIT rc.local

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

iptables -A PREROUTING -t nat -i eth1 -s xx.xx.xx.xx/24 -p tcp –dport 80 -j REDIRECT –to-port 3128

5. INSTALL DHCP

Edit di /etc/default/dhcp3-server

INTERFACES=”eth1″

Edit di /etc/dhcp3/dhcpd.conf

subnet xx.xx.xx.xx netmask 255.255.255.0 {

range xx.xx.xx.xx xx.xx.xx.xx;

option domain-name-servers xx.xx.xx.xx;

option domain-name “internal.example.org”;

option routers xx.xx.xx.xx;

option broadcast-address xx.xx.xx.xx;

default-lease-time 600;

max-lease-time 7200;

}

6. INSTALL SQUID

Untuk proses blok

cari atau tambahkan berikut

http_port 3128 transparent

cache_mgr root@lks10.sch.id

Cari kata INSERT YOUR kemudian dibawahnya kita tambahkan

acl jaringan src xx.xx.xx.xx/24

http_access allow jaringan

Cari kata acl CONNECT kemudian dibawahnya kita tambahkan

acl url dstdomain “/etc/squid/blok.txt”

no_cache deny url

http_access deny url

#nano /etc/squid/blok.txt

isi dengan situs yang akan di blok

http://www.facebook.com

www.youtube.com

lalu blok.txt : chown –R proxy.proxy blok.txt

untuk menjalankan atau memberhentikan squid :

#/etc/init.d/squid restart

#/etc/init.d/squid stop

bila didalam squid.conf setelah di edit harus beri perintah

#squid -k reconfigure

perintah lain untuk membuat swap squid

#squid -z

Leave a comment