Follow us on...
Follow us on G+ Follow us on Twitter Follow us on Facebook Watch us on YouTube
Register
Page 1 of 3 123 LastLast
Results 1 to 15 of 41
  1. #1
    Status
    Offline
    okto_2005's Avatar
    Member Super Senior
    Join Date
    Jul 2007
    Posts
    655
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0

    Mikrotik dengan Squid Proxy - Lebih Jauh dengan Squid Box dengan Delay Pools

    Maap jika Tuts ini terlalu panjang. Click here to enlarge
    I. PERSIAPAN DAN DEFINISI DELAY POOLS
    Gambaran Umum Delay Pools:
    Delay Pools adalah untuk mengkonfigurasikan squid dengan pengaturan bandwidth berdasarkan kriteria tertentu.

    Siapkan PC dengan kemampuan lebih, seperti :
    1. P4 @ 2 Ghz cukup
    2. harddisk cukup kecil saja sekitar 40 Gb 7200 rpm
    2. Memory 512 (semakin besar semakin bagus, cachenya agar tidak "tumpah" ke harddisk)
    3. Linux Distro (Ubuntu, Fedora Core, Slackware)
    4. Squid-cache bisa download lewat: downloadlah versi terbaru paling stabil (squid2.6 stable 12,saat diketik tulisan ini)
    5. Konfigurasi network yang akan digunakan adalah:
    ....INET------SWITCH----MIKROTIK---CLIENT
    .......................|
    .......................--------SQUIDBOX


    II. INSTALASI SQUID
    A.DOWNLOAD SQUID
    Untuk memudahkan instalasi maka, LinuxBox harus sudah bisa terhubung ke internet untuk mendownload langsung sourcenya dengan perintah:

    PS: Menggunakan distro Ubuntu

    untuk check directory aktif
    Code:
    admin@squidbox:~$ pwd
    /home/admin
    untuk download langsung dari web squidcache
    Code:
    admin@squidbox:~$ wget http://www.squid-cache.org/Versions/v2/2.6/squid-2.6.STABLE12.tar.gz
    untuk menginstall package squid
    Code:
    admin@squidbox:~$ tar -zxvf squid-2.6.STABLE12.tar.gz
    admin@squidbox:~$ cd squid-2.6.STABLE12/
    admin@squidbox:~/squid-2.6.STABLE12$ pwd
    /home/admin/squid-2.6.STABLE12
    B.KONFIGURASI SQUID
    sampai sini instalasi squid sudah beres, sekarang memberikan hak akses untuk normal user agar untuk menjalankan squid jika perlu di reboot atau maintenace tidak perlu dari user root.

    Code:
    admin@squidbox:~/squid-2.6.STABLE12$ sudo useradd -d /usr/local/squid/ -r -s /dev/null squid > /dev/null 2>&1
    sekarang kita mengkonfigurasi agar squid kita bisa memanfaatkan delay-pools dan juga mengaktifkan SNMP untuk MRTG dan ICMP
    Code:
    admin@squidbox:~/squid-2.6.STABLE12$ ./configure –prefix=/home/admin/squid-2.6.STABLE12 \
        –exec-prefix=/home/admin/squid-2.6.STABLE12 –enable-gnuregex \
        –enable-icmp –enable-snmp \
        –enable-delay-pools –enable-cache-diggest \
        –enable-removal-policies=heap –enable-default-err-languages=English \
        –enable-err-languages=English –enable-async-io=24 \
        –with-aufs-threads=24 –with-pthreads \
        –with-aio –with-dl \
        –enable-storeio=aufs,diskd –enable-epoll \
        –enable-kill-parent-hack –disable-ident-lookups \
        –disable-wccp –disable-wccpv2 \
        –enable-htcp
    untuk informasi lebih jelas konfigurasi dan compile squid bisa lihat kesini:



    untuk prefix dan exec-prefix disesuaikan dengan directory squidnya.

    C.MENGKOMPILE DAN INSTALASI SQUID
    setelah konfigurasi awal di atas selesai maka kita bisa mengkompile nya dengan perintah:
    Code:
    admin@squidbox:~/squid-2.6.STABLE12$ make
    admin@squidbox:~/squid-2.6.STABLE12$ sudo make install
    III.Konfigurasi squid.conf
    A.Penjelasan Delay Pools dan parameternya
    Untuk Penjelasan Mengenai Delay Pools bisa ke thread ini, karena kalau terlalu panjang Tutsnya nanti malah jadi Boring dan Pusing. ^^


    B. Mengedit Squid.conf
    Untuk mengedit konfigurasi squid.conf dapat memberikan perintah sebagai berikut:
    Code:
    admin@squidbox:~/squid-2.6.STABLE12$ sudo nano /home/admin/squid-2.6.STABLE12/etc/squid.conf
    Konfigurasi default dan optimalisasi squid.conf:
    Code:
    http_port 3128
    hierarchy_stoplist cgi-bin ?
    acl QUERY urlpath_regex cgi-bin \?
    
    # LOGFILE PATHNAMES AND CACHE DIRECTORIES
    # —————————————————————————–
    cache_dir diskd /home/admin/squid-2.6.STABLE12/var/cache 1000 8 256 # << Sesuaikan dengan kebutuhan anda
    access_log /home/admin/squid-2.6.STABLE12/var/logs/access.log squid
    cache_log /home/admin/squid-2.6.STABLE12/var/logs/cache.log
    log_fqdn off
    buffered_logs off
    
    # OPTIONS FOR TUNING THE CACHE
    # —————————————————————————–
    refresh_pattern /.gif        4320    50%    43200
    refresh_pattern /.jpg        4320    50%    43200
    refresh_pattern /.jpeg          4320    50%     43200
    refresh_pattern /.png           4320    50%     43200
    refresh_pattern ^http://www.friendster.com/.*   720     100%    10080
    refresh_pattern ^http://mail.yahoo.com/.*       720     100%    10080
    refresh_pattern ^http://*.yahoo.*/.*            720     100%    7200
    refresh_pattern ^http://*.google.com/.*         720     100%    10080
    refresh_pattern ^http://www.telkomspeedy.com/.* 720     100%    28800
    refresh_pattern ^http://*.blogsome.com/.*       720     80%     10080
    refresh_pattern ^http://*.wordpress.com/.*      720     80%     10080
    refresh-pattern ^http://detik.com/.*            720     90%     2880
    refresh_pattern ^ftp:           14400   90%     43200   reload-into-ims
    refresh_pattern ^gopher:        1440    0%      1440
    refresh_pattern .               0       20%     4320    reload-into-ims
    
    quick_abort_min 0 KB
    quick_abort_max 0 KB
    quick_abort_pct 95
    
    # ACCESS CONTROLS
    # —————————————————————————–
    acl my_network src 192.168.1.0/24
    acl SSL_ports port 443 563
    #acl Safe_ports port 280                # http-mgmt
    acl Safe_ports port 443 563             # https
    #acl Safe_ports port 488                # gss-http
    #acl Safe_ports port 591                # filemaker
    #acl Safe_ports port 777                # multiling http
    http_access allow manager localhost my_network
    http_access allow my_network
    
    acl download url_regex -i \.mp3
    acl download url_regex -i \.3gp
    acl download url_regex -i \.avi
    acl download url_regex -i \.mpg
    acl download url_regex -i \.mpeg
    acl download url_regex -i \.wav
    acl download url_regex -i \.flv
    acl download url_regex -i \.swf
    
    # DELAY POOL PARAMETERS (all require DELAY_POOLS compilation option)
    # —————————————————————————–
    delay_pools 2
    delay_class 1 3
    delay_parameters 1 -1/-1 -1/-1 8000/8000
    delay_access 1 allow my_network download
    delay_access 1 deny all
    delay_class 2 2
    delay_parameters 2 -1/-1 -1/-1
    delay_access 2 allow my_network
    delay_access 2 deny all
    
    # ADMINISTRATIVE PARAMETERS
    # —————————————————————————–
    cache_effective_user squid
    
    # MISCELLANEOUS
    # —————————————————————————–
    logfile_rotate 5
    reload_into_ims on
    store_dir_select_algorithm round-robin
    
    # ADMINISTRATIVE PARAMETERS
    # —————————————————————————–
    cache_mgr youremail@host.com
    visible_hostname localhost
    IV. Menjalankan Squid-cache
    A. Membuat swap cache
    Code:
    [root@squidbox]#/usr/local/squid/sbin/squid -z
    B. Mengaktifkan Squid di Foreground task
    Code:
    ghoz@ghoz-desktop:~/squid-2.6.STABLE12$ home/ghoz/squid-2.6.STABLE12/sbin/squid -SND
    ghoz@ghoz-desktop:~/squid-2.6.STABLE12$ home/ghoz/squid-2.6.STABLE12/sbin/squid start
    C. Monitoring TCP squidBox
    Code:
    admin@squidbox:~/squid-2.6.STABLE12$ sudo netstat -pln | grep squid
    Bila tampilan ada yang persis seperti dibawah ini, berarti squid telah berjalan.
    Code:
    tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN     18047/(squid)      
    udp        0      0 0.0.0.0:3130            0.0.0.0:*                          18047/(squid)      
    udp        0      0 0.0.0.0:3401            0.0.0.0:*                          18047/(squid)      
    udp        0      0 0.0.0.0:4827            0.0.0.0:*                          18047/(squid)      
    udp        0      0 0.0.0.0:32992           0.0.0.0:*                          18047/(squid)
    Untuk pengecekan, maka client dicoba untuk browsing, jika ada data in/out maka proses pembuatan transparant proxy sudah berhasil.
    Last edited by okto_2005; 08-08-2007 at 21:36.

  2. The Following 17 Users Say Thank You to okto_2005 For This Useful Post:

    + Show/Hide list of the thanked


  3. #2
    Status
    Offline
    [a]
    [a]'s Avatar
    Administrator
    Join Date
    Jun 2007
    Location
    Jakarta, Indonesia, Indonesia
    Posts
    1,729
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    1 (100%)
    another top tutorial from our brother okto_2005...Click here to enlargeClick here to enlargeClick here to enlarge

    top markotop bro tutorialnya....thanks berat...

    Click here to enlargeClick here to enlargeClick here to enlargeClick here to enlargeClick here to enlarge


  4. #3
    Status
    Offline
    lonthong2002's Avatar
    Member Senior
    Join Date
    Jul 2007
    Location
    Malang
    Posts
    405
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    1 (100%)
    Gileee bener ... bung okto emang TOP BGT....tutorialnya bikin newbie belejar banyakkClick here to enlargeClick here to enlargeClick here to enlarge

  5. #4
    Status
    Offline
    unique_leader's Avatar
    Member Super Senior
    Join Date
    Jul 2007
    Posts
    637
    Reviews
    Read 0 Reviews
    Downloads
    5
    Uploads
    0
    Feedback Score
    1 (100%)
    Jadi sistam limit yang digunakan cuman pake delay pool di squid aja ya. dan mikrotik ga perlu ngelimit lagi??. trus rule2 dimikrotik masih sama seperti tutorial yg sebelumnya apa beda

  6. #5
    Status
    Offline
    c0nf's Avatar
    Contributor
    Join Date
    Jul 2007
    Location
    Bandung, Indonesia
    Posts
    1,816
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    Click here to enlarge Originally Posted by unique_leader Click here to enlarge
    Jadi sistam limit yang digunakan cuman pake delay pool di squid aja ya. dan mikrotik ga perlu ngelimit lagi??. trus rule2 dimikrotik masih sama seperti tutorial yg sebelumnya apa beda
    kalo di saya dipake dua2nya
    di squid saya pake untuk block situs2 "porno" dan limit bandwidth untuk file2 download. sementara di mikrotik saya pake untuk limit bandwidth keseluruhan yang akan disedot oleh konsumen.

    biasanya squid + delay mengatasi masalah limit http (termasuk doownload) sementara mikrotik digunakan untuk mengatasi masalah bandwidth keseluruhan.

  7. #6
    Status
    Offline
    unique_leader's Avatar
    Member Super Senior
    Join Date
    Jul 2007
    Posts
    637
    Reviews
    Read 0 Reviews
    Downloads
    5
    Uploads
    0
    Feedback Score
    1 (100%)
    kalo mikrotik,squid, dan client pake satu switch hub bisa ga. ga harus beda switch spt di topologi nya yg client di belakang mikrotik

  8. #7
    Status
    Offline
    okto_2005's Avatar
    Member Super Senior
    Join Date
    Jul 2007
    Posts
    655
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    bisa aja sih kl squidnya di belakang mikrotik, cuman nanti di NAT nya ip nya dibuat kaya gini: src-address=!ip_mikrotik,
    biar nanti ip squidbox-nya engga kena redirect ke port 3128 lagi, malah dobel dobel jadinya ^^.

    ini gue udah eksperimen kalo squid bisa dikonfigurasi dibelakang mikrotik, tapi tidak memakai linux, pakai squidNT (Squid under Windows), tapi prinsipnya sama aja kok. konfigurasi squid.conf sama persis dengan di linux.

    Last edited by okto_2005; 02-08-2007 at 21:14.

  9. The Following User Says Thank You to okto_2005 For This Useful Post:


  10. #8
    Status
    Offline
    unique_leader's Avatar
    Member Super Senior
    Join Date
    Jul 2007
    Posts
    637
    Reviews
    Read 0 Reviews
    Downloads
    5
    Uploads
    0
    Feedback Score
    1 (100%)
    .......................---CLIENT
    .......................|
    MODEM------SWITCH----MIKROTIK
    .......................|
    .......................--------SQUIDBOX


    gini lo bro maksud aku. untuk menghemat switch gitu lo. gmn bisa ga kalo gitu??
    Last edited by unique_leader; 03-08-2007 at 11:53.

  11. #9
    Status
    Offline
    okto_2005's Avatar
    Member Super Senior
    Join Date
    Jul 2007
    Posts
    655
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    wah takutnya nanti trafficnya kacau, malah jadi lambat koneksinya, di switch collision molo ^^.

  12. #10
    Status
    Offline
    unique_leader's Avatar
    Member Super Senior
    Join Date
    Jul 2007
    Posts
    637
    Reviews
    Read 0 Reviews
    Downloads
    5
    Uploads
    0
    Feedback Score
    1 (100%)
    oo gitu ya. kalo di bikin 3 ether kayak di tutor sebelumnya gimana. takutnya bos ga mau kasih switch satu lagi nih Click here to enlarge

  13. #11
    Status
    Offline
    unique_leader's Avatar
    Member Super Senior
    Join Date
    Jul 2007
    Posts
    637
    Reviews
    Read 0 Reviews
    Downloads
    5
    Uploads
    0
    Feedback Score
    1 (100%)
    nah kalo yg gini gimana broo

    inet--mikrotik--- switch---> client
    ..........................|
    ..........................-------> Squidbox

  14. #12
    Status
    Offline
    okto_2005's Avatar
    Member Super Senior
    Join Date
    Jul 2007
    Posts
    655
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    yg itu sudah aku buat ^^. coba cari di tutsnya.....

    buat gini juga bisa:
    inet----mikrotik---switch-- client
    ..............|
    ..............--------squid

  15. #13
    Status
    Offline
    unique_leader's Avatar
    Member Super Senior
    Join Date
    Jul 2007
    Posts
    637
    Reviews
    Read 0 Reviews
    Downloads
    5
    Uploads
    0
    Feedback Score
    1 (100%)
    broo aku coba donlot squidnya pake ubuntu juga sprt tutor yg kamu kasih. tapi kok malah di bilang link nya ga valid ya. aku donlot pake windows kok mau.. jadi bingung nih. kenapa tuh ya

  16. #14
    Status
    Offline
    okto_2005's Avatar
    Member Super Senior
    Join Date
    Jul 2007
    Posts
    655
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    paket wgetnya udah di install???

  17. #15
    Status
    Offline
    unique_leader's Avatar
    Member Super Senior
    Join Date
    Jul 2007
    Posts
    637
    Reviews
    Read 0 Reviews
    Downloads
    5
    Uploads
    0
    Feedback Score
    1 (100%)
    nyimpan squid.confnya di nano editor apa perintahnya
    Last edited by unique_leader; 08-08-2007 at 18:33.

 

 
Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •