Minggu, 01 Agustus 2010

Blok Situs Dengan Cara GW...he he he

halooooo penongton......ane lagi semangat neh berbagi cerita .... mau bulan puasa yak....kali ini panganan yang bakal dibagi bagi tentang blok situs.......

sekalian membantu perogram pemerintah untuk " INTERNET SEHAT " baik lah kita mulai aja....asumsinya squid udah di install karena situs yang mau kita blok berdasarkan kata...misal nya " porn " lalu
1. buat file di /etc/squid/ dengan perintah touch /etc/squid/porn.blok.txt terus edit isinya # vi /etc/squid/porn.block.txt

porn
porno
adult
redtube
...
...
...
etc

2.Edit file “/etc/squid/squid.conf” dan tambahkan konfigurasi ACL url_regex berikut :

acl porn url_regex “/etc/squid/porn.block.txt”

konfigurasi ini ditambahkan pada bagian acl dari file “squid.conf” nya, contohnya spt dibawah ini :

—–potongan file squid.conf ——

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 Lan src 192.168.10.0/24
acl porn url_regex “/etc/squid/porn.block.txt” <— ACL ditambahkan pada baris ini

—–potongan file squid.conf ——

Penjelasan terhadap acl ini adalah, kita mendefinisikan “porn” sebagai nama access list dengan tipe “url_regex“, dimana list dari url tersebut disimpan pada file dengan nama “/etc/squid/porn.block.txt”
Contoh file squid.conf setelah dikonfigurasi akan seperti ini :

—–potongan file squid.conf ——

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 Lan src 192.168.10.0/24
acl porn url_regex -i “/etc/squid/porn.block.txt” ---------- ni juga ---

---------------------

# If none of the "access" lines cause a match, the default is the
# opposite of the last line in the list. If the last line was
# deny, the default is allow. Conversely, if the last line
# is allow, the default will be deny. For these reasons, it is a
# good idea to have an "deny all" or "allow all" entry at the end
# of your access lists to avoid potential confusion.
#
#Default:
# http_access deny all
http_access deny porn -------------- ni salh satunya...yang di tambahin
#
#Recommended minimum configuration:
#
# Only allow cachemgr access from localhost


—–potongan file squid.conf -----

5. Selanjutnya kita instruksikan supaya squid untuk membaca ulang file konfigurasi “squid.conf” nya, kita lakukan dengan perintah berikut ini :

# squid -k reconfigure

6. Sekarang kita ujicoba blok akses ke situs pornonya, buka browser favorit kamu misalnya Firefox, kemudian ketikkan salah satu alamat situs yang ada pada file acl porn, misalnya “www.playboy.com“. Jika muncul halaman error “acess denied” maka blokir situs dengan squid nya sukses..klo blm coba cek kembali...

7. wadoooooohhh jelek kali tampilan akses nya....gimana ya kalo di rubah...waktu ada yang akses pornografi kita balikin aja ke search enggine mbah google...
file nya ada di

/usr/share/squid/errors/english/ERR_ACCESS_DENIED

edit deh sesuka nya...........




1 komentar:

GistingShare mengatakan...

Mantep......
tp aku ora mudeng.......

Posting Komentar