Alfalahganteng’s Weblog

Bukan Sekedar Blog Biasa

Setting Proxy di Slackware 12.1

Ditulis oleh alfalahganteng di/pada Oktober 30, 2009

Untuk setting proxy di Slackware 12.1, saya menggunakan aplikasi Squid. Aplikasi Squid yang saya pakai yaitu squid-2.6.STABLE17.tar.gz. Adapun langkah-langkahnya sebagai berikut:

1)         Buat user dan grup squid untuk menjalankan squid tersebut.

#groupadd squid
#adduser squid

2)         Buat folder terlebih dahulu

#mkdir /usr/share/squid/

#mkdir /usr/local/squid/

3)         Kopikan file squid, squid-2.6.STABLE17.tar.gz di /usr/share/squid dan unpack source code tersebut.

# tar -xvzf squid-2.6.STABLE17.tar.gz

4)         Masuk ke direktory squid (/usr/share/squid/squid-2.6.STABLE17) dan lakukan konfigurasi

# ./configure –prefix /usr/local/squid –enable-delay-pools –enable-cache-digests –enable-poll –disable-ident-lookups –enable-truncate –enable-renoval-policies –enable-async-io=24 –with-aups-threads –with-aio –with-dl –enable-storcio=aufs –enable-underscores –enable-snmp, atau

#./configure prefix=/usr/local/squid/

5)         Lakukan Make

# make all

6)         Install program hasil kompilasi.

# make install

7)         Edit konfig squid di /usr/local/squid/etc/squid.conf

cache_mem 256 MB

cache_dir ufs /usr/local/squid/var/cache 1000 16 256

acl situs dstdomain /usr/local/squid/situs.txt”         #–> tempat file situs.txt

acl kata url_regex -i /usr/local/squid/kata.txt”        #–> tempat file kata.txt

acl ip dst  /usr/local/squid/ip.txt”                            #–> tempat file ip.txt

acl all src 0.0.0.0/0.0.0.0

acl manager proto cache_object

acl localhost src 127.0.0.1/255.255.255.255

acl to_localhost dst 127.0.0.0/8

acl SSL_ports port 443

acl Safe_ports port 80          # http

acl Safe_ports port 21          # ftp

acl Safe_ports port 443         # https

acl Safe_ports port 70          # gopher

acl Safe_ports port 210         # wais

acl Safe_ports port 1025-65535  # unregistered ports

acl Safe_ports port 280         # http-mgmt

acl Safe_ports port 488         # gss-http

acl Safe_ports port 591         # filemaker

acl Safe_ports port 777         # multiling http

acl CONNECT method CONNECT

http_access deny situs

http_access deny kata

http_access deny ip

http_access allow manager localhost

http_access deny manager

http_access deny !Safe_ports

http_access deny CONNECT !SSL_ports

acl our_networks src 192.168.1.0/24 192.168.2.0/24

http_access allow our_networks

http_access deny all

cache_mgr admin@smktelkom-penilaian.sch.id                 #–> nama admin

visible_hostname smktelkom-penilaian.sch.id                    #–> nama hostnamenya

8)         Sebagai root buat hak akses untuk mengakses folder squid

#chmod -R 777 /usr/local/squid/

#chown -hR squid:squid /usr/local/squid

9)         Buatlah file situs.txt, kata.txt, ip.txt di dalam folder /usr/local/squid/. File-file ini berisi situs, kata, dan ip yang akan diblok oleh proxy.

10)     Sebagai root lakukan instruksi untuk membuat swap cache :

#/usr/local/squid/sbin/squid -z

11)     Sekarang Saatnya mencoba:

# /usr/local/squid/sbin/squid –D

12)     Cek dari client untuk membuka situs yang diblok.

2 Tanggapan ke “Setting Proxy di Slackware 12.1”

  1. Agus Suhanto berkata

    senang berjumpa dengan teman blogger di jagat raya blogsphere yang postingnya menarik-menarik kayak ini,
    Saya Agus Suhanto, salam kenal…

Tinggalkan Balasan

XHTML: Anda dapat gunakan tag ini: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>