Plasa Hosting Murah Web Hosting Indonesia , Hosting paling murah Domain Paling murah dari Hosting murah dan domain murah  cerita lucu Submit a sites Free Hosting Free Mail Domain murah Hosting murah Plasahosting

Web Hosting murah instant dan Nama Domain Murah, 60 Detik dijamin sudah aktif
Hosting Lokasi Server Indonesia (iix) dan USA
Selamat Hari Raya Galungan & Kuningan
Tgl 1-2 pebruari layanan YM offline, transaksi tetap jalan

Domain murah
    
www.

Main Menu
  Daftar Harga
  Cara Transaksi
  Beli Domain Hosting
  Fasilitas Hosting
  Cara Pindah
  Bayar dgn Paypal
  Paket Promosi
  Demo Hosting
  Blogs
  Keunggulan Kami
  Artikel Penting
  Download
  Premium Service
  


Konfirmasi Transfer
+62.8123650001

Phone Support 24jam:
+62.361.7455551
+62.361.728472

Alternatip:
+62.361.2766000

Fax:
+62.361.723035

Testimonial
Saya sudah menggunakan jasa plasa hosting selama 4 tahun lebih. Selama ini saya sangat cukup puas dengan pelayanan dari plasa hosting. Tidak ada keluhan apapun juga, Domain juga sangat cepat aktif. Ga lebih dari 1 menit. Saya cukup terbantu dengan plasa hosting Dan kalaupun ada apa2 tinggal chat atau telp dengan operatornya. Dan yang menakjubkan , kami akhirnya jadi berkawan baik. Terima kasih plasa hosting, Saya akan refrensikan ke kenalan2 saya untuk mengunakan jasa Plasa Hosting

Salam dari saya
KL.Net Tangerang
selengkapnya...


Menu Login
  Username :
  Password :
  

Advertising
  Bulletin Veteriner
  Indoreservation
  Indonesia cigarettes
  Bali Explorer
  Bali Driver
  PutraPapua Tours
  Pulsa Murah
  


BCA
Acc : 768.025.6122

Mandiri
Acc : 145.000.484.6529



Get Firefox!
Get Thunderbird!


           

  Daftar Harga Hosting dan Domain paling diminati

 ¤ Hosting 25MB
 ¤ Rp. 40.000/year
 ¤ Unlimited Email
 ¤ Unlimited Dbase

 
   ¤ Hosting 50MB
 ¤ Rp. 60.000/year
 ¤ Unlimited Email
 ¤ Unlimited Dbase

   ¤ Hosting 100MB
 ¤ Rp. 100.000/year
 ¤ Unlimited Email
 ¤ Unlimited Dbase
  Domain com/net/org
 ¤ Rp. 89rb/year
Domain web.id
 ¤ Rp. 35.000/year
   Hosting Services
 ¤ Buy Domain & Host
 ¤ Package Price
 ¤ Compare Price
 ¤ Demo Hosting
 ¤ Testimonial
 
  ¤ Free Hosting
¤ Free Mail
¤ Iklan Baris
¤ Free Jokes
¤ Cool Article
 
   Domain & Hosting Utility
 ¤ Domain Manager
 ¤ Hosting Manager
 ¤ Transfer Domain
 ¤ Domain Whois
  ¤ Member Login
¤ Forget Password
¤ Signup
¤ Contact us


Artikel
 artikel BaruTambah artikel artikelku

Cari artikel :


Instalasi Squid, Banner Filter, Porn Filter, Limit Bandwith, Transparan Proxy
Friday,1-October-2004 03:42 - dibaca : 3317 kali

Pastikan login pada server anda adalah sebagai root


1. Instalasi Banner Filter
Penempatan direktori Banner Filter harus didalam direktori www kita. misal saya di /usr/local/apache/htdocs .download souce Banner Filter di http://phroggy.com/files/unix/bannerfilter-1.21.tar.gz

[root@PROXY hanny]# wget http://phroggy.com/files/unix/bannerfilter-1.21.tar.gz

Ekstrak source bannerfilter-1.21.tar.gz :
[root@PROXY hanny]# tar -xzvf bannerfilter-1.21.tar.gz

Kemudian pindahkan hasil exstrak bannerfilter-1.21.tar.gz ke dalam /usr/local/apache/htdocs
[root@PROXY hanny]# mv bannerfilter-1.21 /usr/local/apache/htdocs/bannerfilter
[root@PROXY hanny]# cd /usr/local/apache/htdocs/bannerfilter

Edit file bannerfilter.conf
[root@PROXY bannerfilter]# mv bannerfilter.conf /etc
[root@PROXY bannerfilter]# vi /etc/bannerfilter.conf

Contoh isi bannerfilter.conf saya :
# Path to the directory containing the data files:
$DATA='/usr/local/apache/htdocs/bannerfilter';

# URL of the directory containing the HTML and graphics files
# (this must be accessible by the machine running Squid; it does
# not need to be accessible to the client machines):
$WWW='http://www.rsds.or.id/bannerfilter/www';

# Path to the banner log file if you want one, or leave empty (if
# specified, Squid must have write access to this file):
$LOG='';

# $LOG='/tmp/bannerlog.txt';
# If you prefer not to see "Blocked", use null.gif instead of
# banner.gif:
$BANNERGIF='banner.gif';

Penambahan script bannerfilter nantinya akan diletakan didalam squid.conf
redirect_program /usr/local/apache/htdocs/bannerfilter/redirector.pl


2. Instalasi Squid
Sebelum installasi squid, pastikan daemon squid yang asli dari redhat harus anda stop atau musnahkan !!
caranya :
[root@PROXY hanny]# /etc/rc.d/init.d/squid stop
[root@PROXY hanny]# for a in `rpm -qa | grep squid`; do rpm -e --nodeps $a; done

Sekarang kita mendownload source squid. Saya menggunakan squid-2.5.STABLE2
Download source squid di http://www.squid-cache.org/Versions/v2/2.5/squid-2.5.STABLE2.tar.gz

[root@PROXY hanny]# wget http://www.squid-cache.org/Versions/v2/2.5/squid-2.5.STABLE2.tar.gz

Ekstrak source squid-2.5.STABLE2.tar.gz :
[root@PROXY hanny]# tar -xzvf squid-2.5.STABLE2.tar.gz
[root@PROXY hanny]# cd squid-2.5.STABLE2

Buat user untuk menjalankan squid, nama usernya adalah squid
Guna meningkatkan keamanan server kita, maka user squid tidak bisa digunakan untuk login
[root@PROXY squid-2.5.STABLE2]# useradd -d /usr/local/squid/ -r -s /dev/null squid > /dev/null 2>&1

Kompilasi dan install Squid :
[root@PROXY squid-2.5.STABLE2]# ./configure --prefix=/usr/local/squid --exec-prefix=/usr/local/squid
> --enable-delay-pools --enable-cache-diggests --enable-poll
> --disable-ident-lookups --enable-async-io=16
> --enable-auth-modules --enable-removal-policies --enable-snmp

[root@PROXY squid-2.5.STABLE2]# make all
Biasanya proses make all ini berlangsung lama, alangkah baiknya kita ambil sebatang rokok lalu di bakar :) betapa indahnya dunia ini !!

[root@PROXY squid-2.5.STABLE2]# make install

Sekarang kita masuk dalam tahap meng-edit konfigurasi ke dalam file squid.conf
[root@PROXY squid-2.5.STABLE2]# cd /usr/local/squid/etc

Anda bisa membaca terlebih dahulu http://www.squid-cache.org/Doc/FAQ/FAQ.html (Ambil sebatang rokok lagi agar ketegangan anda mereda !!)
Dalam meng-edit konfigurasi squid, anda bisa membaca readme yang sudah ada di dalam file squid.conf atau anda juga bisa melihat atau mengambil, file yang sudah saya edit http://www.rsds.or.id/linux/squid.conf.hanny

[root@PROXY etc]# wget http://www.rsds.or.id/linux/squid.conf.hanny
[root@PROXY etc]# vi squid.conf.hanny

kemudian carilah kata-kata dalam file squid.conf.hanny seperti keterangan dibawah ini yang berhurup bold italic :
ftp_user name@domain-anda.com
dns_nameservers IP-Address-DNS-ISP-Anda
acl user src 192.168.0.0/255.255.255.0
(ip192.168.0.0 adalah ranges ip address client kita mulai 192.168.0.0 sampai 192.168.0.255)

Didalam file squid.conf.hanny, sudah saya tambahkan script untuk menjalankan Banner Filter dan Porn Filter :
redirect_program /usr/local/apache/htdocs/bannerfilter/redirector.pl
acl porn url_regex "/usr/local/squid/etc/porn.txt"
http_access deny porn

"Jika anda tidak menginginkan Banner Filter atau Porn Filter berjalan, maka pada awal script Banner Filter atau Porn Filter dalam file squid.conf.hanny harus di beri tanda " # " :
#redirect_program /usr/local/apache/htdocs/bannerfilter/redirector.pl
#acl porn url_regex "/usr/local/squid/etc/porn.txt"
#http_access deny porn


3. Limit Bandwith
Dalam file squid.conf.hanny, juga sudah saya tambahkan script untuk menggunakan delay pool :

#------------------------ DELAY POLL KONFIGURASI HANNY ---------------------------
#This is the most important part for shaping incoming traffic with Squid
#For detailed description see squid.conf file or docs at http://www.squid-cache.org
#We don't want to limit downloads on our local network
acl magic_words1 url_regex -i 192.168.
#We want to limit downloads of these type of files
#Put this all in one line
acl magic_words2 url_regex -i ftp .exe .mp3 .vqf .tar.gz .gz .rpm .zip .rar .avi .mpeg .mpe .mpg .qt .ram .rm .iso .raw .wav
#We don't block .html, .gif, .jpg and similar files, because they
#generally don't consume much bandwith
#We have two different delay_pools
delay_pools 2
#First delay pool
#W don't want to delay our local traffic
#There are three pool classes; here we will deal only with the second
delay_class 1 2
#-1/-1 mean that there are no limits
delay_parameters 1 -1/-1 -1/-1
#magic_words1: 192.168
delay_access 1 allow magic_words1
#Second delay pool
#we want to delay downloading files mentioned in magic_words2
delay_class 2 2
#The numbers here are values in bytes;
#we must remember that Squid doesn't consider start/stop bits
#5000/150000 are values for the whole network
#5000/120000 are values for the single IP
#after downloaded files exceed about 150000 bytes,
#(or even twice or three times as much)
#they will continue to download at about 5000 bytes/s
delay_parameters 2 5000/150000 5000/120000
delay_access 2 allow magic_words2
#--------------------------------------------------------------------------------

"Jika anda tidak menginginkan Limit Bandwith berjalan, maka pada awal script delay poll dalam file squid.conf.hanny harus diberi tanda " # "
#------------------------ DELAY POLL KONFIGURASI HANNY ---------------------------
#This is the most important part for shaping incoming traffic with Squid
#For detailed description see squid.conf file or docs at http://www.squid-cache.org
#We don't want to limit downloads on our local network
#acl magic_words1 url_regex -i 192.168.
#We want to limit downloads of these type of files
#Put this all in one line
acl magic_words2 url_regex -i ftp .exe .mp3 .vqf .tar.gz .gz .rpm .zip .rar .avi .mpeg .mpe .mpg .qt .ram .rm .iso .raw .wav
#We don't block .html, .gif, .jpg and similar files, because they
#generally don't consume much bandwith
#We have two different delay_pools
#delay_pools 2
#First delay pool
#W don't want to delay our local traffic
#There are three pool classes; here we will deal only with the second
#delay_class 1 2
#-1/-1 mean that there are no limits
#delay_parameters 1 -1/-1 -1/-1
#magic_words1: 192.168
#delay_access 1 allow magic_words1
#Second delay pool
#we want to delay downloading files mentioned in magic_words2
#delay_class 2 2
#The numbers here are values in bytes;
#we must remember that Squid doesn't consider start/stop bits
#5000/150000 are values for the whole network
#5000/120000 are values for the single IP
#after downloaded files exceed about 150000 bytes,
#(or even twice or three times as much)
#they will continue to download at about 5000 bytes/s
#delay_parameters 2 5000/150000 5000/120000
#delay_access 2 allow magic_words2
#--------------------------------------------------------------------------------

Merubah nama file squid..conf yang asli dari komputer anda ke nama file lain. (sebagai back-up)
Dan merubah squid.conf.hanny menjadi squid.conf
[root@PROXY etc]# mv squid.conf squid.conf.punyaku
[root@PROXY etc]# mv squid.conf.hanny squid.conf


4. Instalasi Porn Filter
Buatlah terlebih dahulu file dengan nama porn.txt
[root@PROXY etc]# touch porn.txt

Isikan file porn.txt dengan site-site yang hendak anda tutup, misal www.17tahun.com
[root@PROXY etc]# vi porn.txt
isikan dengan kata 17tahun


Menjalankan squid
Memberi hak direktori squid dan bannerfilter agar proses berjalan lancar :
[root@PROXY etc]# chown -R squid.squid /usr/local/squid
[root@PROXY etc]# chown -R squid.squid /usr/local/apache/htdocs/bannerfilter

Aktifkan cache squid anda terlebih dahulu:
[root@PROXY etc]# /usr/local/squid/sbin/squid -z

Jika muncul permission denied pada saat pembuatan cache, cek dulu owner dan permission untuk directory cache :
[root@PROXY etc]# chmod 777 /usr/local/squid/var/logs/

Sampai tahap ini jika ada pesan error mohon email ke hanny@rsds.or.id

Jalankan daemon squid anda :
[root@PROXY etc]# /usr/local/squid/sbin/squid

Cek squid anda apakah jalan atau tidak :
[root@PROXY etc]# netstat -pln | grep squid
tcp 0 0 0.0.0.0 :8080 0.0.0.0:* LISTEN 777/(squid)
udp 0 0 0.0.0.0 :32771 0.0.0.0:* 777/(squid)
udp 0 0 0.0.0.0 :3130 0.0.0.0:* 777/(squid)

Jika keluar seperti hal diatas, maka squid anda telah berjalan !! rokokan dulu ah...: )


Test Squid Dari Komputer Client
Lakukan penge-test ping antar network anda, misal server anda mempunyai ip 192.168.0.1 dan ip windows client anda 192.168.1.2 :
[root@PROXY etc]# ping 192.168.0.2
PING 192.168.0.2 (192.168.0.2) from 192.168.0.1 : 56(84) bytes of data.
Warning: time of day goes back, taking countermeasures.
64 bytes from 192.168.0.2: icmp_seq=0 ttl=255 time=233 usec
64 bytes from 192.168.0.2: icmp_seq=1 ttl=255 time=161 usec

Jika anda mempunyai client dengan operating system windows 98 atau windows me atau windows XP, pada software internet explorer coba isikan proxy dengan ip server anda dan port 8080 (misal ip server saya 192.168.0.1 maka pengisian proxy adalah 192.168.0.1 : 8080)

Coba anda buka situs-situs berikut ini dalam masing-masing new windows internet explorer :
http://www.yahoo.com , http://www.17tahun.com , http://zdads.e-media.com

1. Bila situs http://www.yahoo.com terbuka maka artinya pengerjaan squid anda sampai tahap ini berjalan lancar.

2. Bila situs http://www.17tahun.com tidak terbuka dan hanya bertulisakan ACCESS DENIED maka Porn Firter anda berjalan lancar. Anda bisa menambahkan situs-situs yang ingin anda tutup, dengan meng-edit kembali file porn.txt
[root@PROXY hanny]# vi /usr/local/squid/etc/porn.txt

3. Bila situs http://zdads.e-media.com tidak berbuka dan hanya bergambar BLOCKED AREA maka Banner Filter anda berjalan lancar.


5. Transparan Proxy
Agar lebih mudah kita akan menggunakan iptables
[root@PROXY hanny]# /sbin/iptables -F -t nat
[root@PROXY hanny]# /sbin/iptables -t nat -A PREROUTING -i eth1 -p tcp -s 192.168.0.0/255.255.255.0
> --dport 80 -j DNAT --to 192.168.0.1:8080

keterangan iptables diatas :
1. eth1 adalah interface lancard untuk ip gateway client.
2. 192.168.0.0/255.255.255.0 adalah ip client kita mulai dari 192.168.0.0 sampai 192.168.0.255.
3. --dport 80 -j DNAT --to 192.168.0.1:8080 adalah bila ada request port 80 (biasanya browsing), akan di paksa masuk ke squid dengan ip 192.168.0.1 port 8080.

Jika anda mempunyai client dengan operating system windows 98 atau windows me atau windows XP, pada software internet explorer, pastikan tidak terisi proxy. Dan pastikan pengisian ip client dan ip gateway client anda adalah benar adanya !!!
(Misal ip client saya mempunyai ip 192.168.0.2 dan ip gateway 192.168.0.1)

Coba anda buka situs-situs berikut ini dalam masing-masing new windows internet explorer :
http://www.yahoo.com , http://www.17tahun.com , http://zdads.e-media.com

1. Bila situs http://www.yahoo.com terbuka maka artinya pengerjaan squid anda sampai tahap ini berjalan lancar.

2. Bila situs http://www.17tahun.com tidak terbuka dan hanya bertulisakan ACCESS DENIED maka Porn Firter anda berjalan lancar. Anda bisa menambahkan situs-situs yang ingin anda tutup, dengan meng-edit kembali file porn.txt
[root@PROXY hanny]# vi /usr/local/squid/etc/porn.txt

3. Bila situs http://zdads.e-media.com tidak berbuka dan hanya bergambar BLOCKED AREA maka Banner Filter anda berjalan lancar.


Autorun Squid dan Transparan Proxy
Bila server squid kita restart dan kita tidak ingin mengulangi command2x seperti hal-hal pada artikel di atas, maka masukan script pada /etc/rc.local :
[root@PROXY hanny]# vi /etc/rc.local

isikan dengan :
#Menjalankan Transparan Proxy
/sbin/iptables -F -t nat
/sbin/iptables -t nat -A PREROUTING -i eth1 -p tcp -s 192.168.0.0/255.255.255.0 --dport 80 -j DNAT --to 192.168.0.1:8080

#Menghidupkan Squid
/bin/rm /usr/local/squid/var/logs/squid.pid
/usr/local/squid/sbin/squid


6. Lain-Lain
Bila kita inggin melihat siapa saja yang sedang mengunakan squid kita dan situs-situs apa saja yang mereka buka, anda bisa menggunakan:
[root@PROXY hanny]# tail -f /usr/local/squid/var/logs/access.log

Bila anda merubah isi file squid.conf dan ingin mencoba apakah squid.conf yang kita rubah bisa sesuai yang kita inginkan :
[root@PROXY hanny]# /usr/local/squid/sbin/squid -k reconfigure


7. ChangeLog
24 Maret 2003
Penambahan permission pada direktory cache (dani@bisnisweb.com)

24 Maret 2003
Penulisan tutorial ini dimulai (hanny@rsds.or.id)


8. Referensi
1. http://www.squid-cache.org/
2. http://www.tldp.org/HOWTO/mini/TransparentProxy.html
3. http://jateng.linux.or.id/index.html
4. http://netfilter.samba.org/
5. http://phroggy.com/bannerfilter/


9. Ucapan Terima Kasih
1. Kepada asfik , sunar , dani sebagai awal dari penginstallan squid saya.
2. Kepada channel #indolinux server dal.net dan efnet.net sebagai komunitas linux.


Instalasi Squid, Banner Filter, Porn Filter, Limit Bandwith, Transparan Proxy
Hanny Wijaya (hanny@rsds.or.id)

24 Maret 2003


Post by admin -> Contact - artikel Lainnya

Kembali






Yahoo Messenger support 08:00 - 24:00. Layanan support gunakan contact us dibawah
CS Plasahosting  CS Plasahosting  CS Plasahosting  CS Plasahosting  Billing Plasahosting 

Sign up for PayPal and start accepting credit card payments instantly.
Home - Company Info - FAQ - Help - Terms of Service - Data Center - Submit a Site - Contact Us . . News

Copyright © 2004-2012 Internix web hosting Indonesia. All rights reserved.
Web Hosting Murah Indonesia, Nama Domain, Bali Web Design murah, Linux Training & Installation, Software Development, IT Consultant


Redhat Centos php Hosting   Cpanel Hosting   mysql database   Fantastico Hosting joomla mambo wordpress blogs   hosting 30 hari uang kembali