Home > Linux > Configurasi squid di Fedora Core 4 Seri 1

Configurasi squid di Fedora Core 4 Seri 1

Tutorial ini hanya menjelaskan cara mengconfigurasi squid bukan cara menginstall squid dari .tar.gz karena di squid di fedora core 4 defaultnya sudah terinstall, jadi yang harus kita lakukan hanya mengconfigurasinya. yang perlu disiapin adalah berapa space yang dialokasikan buat squidnya dan bakal di tarok dimana.
misalnya

port : 3128 8080 3127 (tiga port)
space : 3 G (3072M)
alokasi di : /home/cache/squid
network yang diallowed untuk mengakses proxy : 172.17.3.0/24 dan 192.168.0.0/24

configurasi dari root:
1.cd /etc/squid
2.backup configurasi squidnya :

[root@cachak squid]#cp squid.conf squid.conf.org
[root@cachak squid]#cd

3.buat folder /home/cache/squid setelah itu ownernya digantikan ke user squid

[root@cachak ~]#mkdir -p /home/cache/squid
[root@cachak ~]#chown -R squid:squid /home/cache/squid

4.buat folder cache_dir

[root@cachak ~]#mkdir /home/cache/squid/spool
[root@cachak ~]#chown -R squid:squid /home/cache/squid

5.selanjutnya adalah mengconfigurasi squid.conf dan bagian2 yang perlu di edit dari squid.conf adalah
a. edit http_portnya yaitu bagian

# http_port 3128 

menjadi

http_port 3128 8080 3127

b. edit access.lognya

# cache_access_log /var/log/squid/access.log

menjadi

cache_access_log /home/cache/squid/access.log

c. edit cache lognya

# cache_log /var/log/squid/cache.log

menjadi

cache_log /home/cache/squid/cache.log

d. edit cache_store_log

# cache_store_log /var/log/squid/store.log

menjadi

cache_store_log /home/cache/squid/store.log

e. edit memori yang dialokasikan buat menjalankan squidnya, sesuaikan dengan kemampuan squid servernya :)

# cache_mem 8 MB

menjadi

cache_mem 16 MB

f.edit cache dir nya, arahkan sesuai dengan langkah no 5 dan juga space alokasinya yaitu 3072 M

# cache_dir ufs /var/spool/squid 100 16 256

menjadi

cache_dir ufs /home/cache/squid/spool 3072 16 256

g.nah sekarang tinggal nambahin network yang mau di allowed untuk access proxy servernya
cari bagian :

#Recommended minimum configuration:
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 563
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp

acl Safe_ports port 443 563     # https, snews
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

dibawah acl localhost src 127.0.0.1/255.255.255.255, tambahkan network yang akan di allowed

acl net1 src 172.17.3.0/255.255.255.0
acl net2 src 192.168.0.0/255.255.255.0

setelah itu supaya net1 dan net2 td bisa mengakses squid maka tambahkan http_access allow
cari baris :

# And finally deny all other access to this proxy
http_access allow localhost
http_access deny all

diantar http_access allow localhost dan http_access deny all tambahkan :

http_access allow net1
http_access allow net2

baris ini bisa ditarok di atas http_access allow localhost atau dibawah http_access allow localhost yang penting diatas http_access deny all

6.setelah itu simpen. lalu start squid nya

[root@cachak ~]#/etc/init.d/squid start

7.setelah itu gunakan testing squidnya menggunakan browser sambil di lihat acess log nya

[root@cachak ~]#tail -f /home/cache/squid/access.log

8.Sekian dulu ya tutorial nya :) kalau ada yang kurang aku minta maaf atau ada yang salah mohon dikasih tau, nanti yang seri 2 aku coba setting squid dengan squid authentifikasi segingga untuk menggunakan squid harus memasukkan username dan password.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
Categories: Linux Tags: , ,
  1. romeo_musti_die
    January 5th, 2008 at 17:07 | #1

    ujang_proxy Says:
    January 14th, 2007 at 23:47

    utk bang soel: kl mo bagi2 jatah speedy, utk hal quota seperti tsb, gunakan kerio 6 , sangat mantep, ada web based nya lagi.
    udh komplet ama share program, DHCP, monitoring, site blocking, dll.

    mas bisa untuk ubuntu ga ya?
    mas cachak sekalian dong konfigurasi cbq-nya. biar lebih lengkap gitu.
    thx

  2. Rozy
    January 15th, 2008 at 11:59 | #2

    konfigurasi ip dari internet dan buat jaringan lokal ada dimana ya?

  3. ipes
    March 17th, 2008 at 14:52 | #3

    salam knal….. sayapengguna fc 8
    saya dah ikutin perintah buat squid tapi ketika djalanin keluar nya kayak gini :

    /etc/init.d/squid start
    Starting squid: /etc/init.d/squid: line 62: 4133 Aborted $SQUID $SQUID_OPTS >> /var/log/squid/squid.out 2>&1
    [FAILED]

    tolongin ya … apa yg harus dikerjakan maklum baru belajar

  4. ipes
    March 17th, 2008 at 15:29 | #4

    boleh minta ID Yahoo Messanger nya ya

  5. Bayu
    May 14th, 2008 at 15:33 | #5

    Boss nanya.. kok squid tak running pake perintah squid -NCd1 keluar begini ya…

    2008/05/14 23:31:42| Starting Squid Cache version 2.5.STABLE14 for i686-pc-linux-gnu…
    2008/05/14 23:31:42| Process ID 14942
    2008/05/14 23:31:42| With 2048 file descriptors available
    2008/05/14 23:31:42| Performing DNS Tests…
    2008/05/14 23:31:42| Successful DNS name lookup tests…
    2008/05/14 23:31:42| DNS Socket created at 0.0.0.0, port 1118, FD 4
    2008/05/14 23:31:42| User-Agent logging is disabled.
    2008/05/14 23:31:42| Referer logging is disabled.
    2008/05/14 23:31:42| Unlinkd pipe opened on FD 9
    2008/05/14 23:31:42| Swap maxSize 49152000 KB, estimated 3780923 objects
    Floating point exception

  6. August 13th, 2008 at 21:28 | #6

    /etc/init.d/squid strat

    init_cache_dir /home/cache/squid/spool… /etc/init.d/squid: line 54: 6471 Aborted $SQUID -z -F -D >>/var/log/squid/squid.out 2>&1
    Starting squid: /etc/init.d/squid: line 53: 6472 Aborted $SQUID
    $SQUID_OPTS >>/var/log/squid/squid.out 2>&1
    [FAILED]

    >>>>>>>> Tolong pencerahan………… chak

  7. hery
    January 3rd, 2009 at 10:14 | #7

    saya sudah coba menggunakan dan menambahkan baris di squid :
    acl Safe_ports port 5050 # ym
    dibawah
    acl Safe_ports port 777 # multiling http
    untuk mengaktifkan webcam yang saya punya… tapi kok tetep gak mau ya?
    kira2 apa yang bermasalah lagi ya??? mohon pencerahan dan petnjuk bagi yang sudah berhasil

  8. February 19th, 2009 at 06:44 | #8

    cuma mo bagi2 aja…klo mo lia contoh konfigurasi squid yg dipake dikantor gw mampir di http://blog.indowebsiter.com/?p=65 nah buat ngeblok situs2 tertemtu ada saat jam kerja dan membatasi download multimedia 1kB/s pada saat jam kerja hehehe n di iptables kudu ditambahin juga yang dapat di lihat di http://blog.indowebsiter.com/?p=58 …semoga bermanfaat…mohon jika ada yg salah ..peace ah … “GET & GIVE”

Comment pages
1 2 30
  1. No trackbacks yet.