Langsung aja deh gua enggak bisa kata-kata pembuka
Kalau menurut aku sih ada beberapa cara untuk ngeblock situs-situs tertentu :
1.Memasang filter di komputer itu sendiri.
2.Memasang filter di komputer server yang terhubung dengan internet.
Kalau untuk yang pertama sih biasanya dilakukan oleh orang tua dirumah biar anak-anak nya tidak main internet secara sembarangan dengan kata lain biar tidak terpengaruh oleh situs-situs yang tidak semestinya.
Sedangkhan untuk kantoran ataupun warnet biasanya memakai cara yang kedua yaitu diblock dengan menggunakan sebuah server yang berkewajiban mengatur lalu lintas jalur internet.
dibawah ini adalah scrip yang bisa diambil atau digunakan untuk ngeblock situs-situs tertentu atau block situs dengan keyword atau kata kunci .
Persiapan pertama :
- Bikin file dengan nama sex di /etc/squid/sex
- Isikan dengan link-link dari situs-situs tertentu contoh :
www.17tahun.com
www.ceritaseu.org
www.dewasa.tk dan lain-lain
3.Bikin file dengan nama notsex di /etc/squid/notsex
4.Isikan dengan kata-kata kunci misalnya :
sex
viagra
dan lain-lain
Setelah bikin file tersebut yang kita masukan scrif ini didalam squid kita
acl sex url_regex -i "/etc/squid/sex"Tapi Kalu untuk lebih Llengkapnya copy aja deh listing dibawah ini biar kerjanya cepat :-p
acl notsex url_regex -i "/etc/squid/notsex"
http_access deny sex !notsex
# Squid configuration for non transparent proxy
# by Rully Perdhana
# http://rullyuu11.multiply.com
# rullyuu11@yahoo.com
#
# ^__^
#
#
#http_port 3128
#icp_port 0
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
#=======================================================$
#CACHE MEM
#=======================================================$
cache_mem 6 MB
cache_swap_low 98
cache_swap_high 99
maximum_object_size 32 MB
minimum_object_size 0 KB
maximum_object_size_in_memory 128 KB
ipcache_size 2048
ipcache_low 98
ipcache_high 99
#=======================================================$
#CACHE OPTION
#=======================================================$
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
cache_dir aufs /cache 1200 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/log.log
cache_store_log /var/log/squid/store.log
log_fqdn off
log_icp_queries off
#=======================================================$
#AUTH
#=======================================================$
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
#=======================================================$
#UPLOAD LIMIT
#=======================================================$
request_body_max_size 1000 KB
#=======================================================$
#REFRESH PATERN
#=======================================================$
refresh_pattern \.gif 4320 50% 43200
refresh_pattern \.jpg 4320 50% 43200
refresh_pattern \.tif 4320 50% 43200
refresh_pattern \.png 4320 50% 43200
refresh_pattern \.jpeg 4320 50% 43200
refresh_pattern ^http://www.friendster.com/.* 720 100% 4320
refresh_pattern ^http://mail.yahoo.com/.* 720 100% 4320
refresh_pattern ^http://*.yahoo.*/.* 720 100% 4320
refresh_pattern ^http://*.yimg.*/.* 720 100% 4320
refresh_pattern ^http://*.gmail.*/.* 720 100% 4320
refresh_pattern ^http://*.google.*/.* 720 100% 4320
refresh_pattern ^http://*korea.*/.* 720 100% 4320
refresh_pattern ^http://*.akamai.*/.* 720 100% 4320
refresh_pattern ^http://*.windowsmedia.*/.* 720 100% 4320
refresh_pattern ^http://*.googlesyndication.*/.* 720 100% 4320
refresh_pattern ^http://*.plasa.*/.* 720 100% 4320
refresh_pattern ^http://*.telkom.*/.* 720 100% 4320
#refresh_pattern ^ftp: 10080 95% 40320 reload-into-ims override-lastmod
#refresh_pattern . 0 20% 4320 reload-into-ims override-lastmod
refresh_pattern ^ftp: 10080 95% 241920 reload-into-ims override-lastmod
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 180 95% 120960 reload-into-ims override-lastmod
#============================================================$
#Quick Abort
#============================================================$
quick_abort_min 0 KB
quick_abort_max 0 KB
quick_abort_pct 98
#============================================================$
#Access Control List
#============================================================$
acl sex url_regex -i "/etc/squid/sex"
acl notsex url_regex -i "/etc/squid/notsex"
http_access deny sex !notsex
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.5.0/24
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
http_access allow manager localhost
http_access allow lan
#http_access allow notsex
#http_access deny sex
http_access deny manager
#======================================================$
# Deny requests to unknown ports
#======================================================$
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all
http_reply_access allow all
icp_access allow all
icp_access allow lan
#======================================================$
#DELAY POOLS
#======================================================$
acl nolimit url_regex -i 192.168.5.0/24
acl limit url_regex -i ftp .exe .mpeg .mp3 .zip .rar .avi .mpg .wav .dat .mid .midi .iso .3gp .wmv .mp4 .rv .tgz .tar .tar.gz .rpm .iso
delay_pools 2
delay_class 1 2
delay_parameters 1 -1/-1 -1/-1
delay_access 1 allow nolimit
delay_class 2 2
delay_parameters 2 5000/256000 5000/256000
delay_access 2 allow limit
#======================================================$
#OTHER
#======================================================$
coredump_dir /var/lib/squid/cache
query_icmp off
shutdown_lifetime 10 seconds
reload_into_ims on
pipeline_prefetch on
ie_refresh off
vary_ignore_expire on
cache_mgr rullyuu11@yahoo.com
logfile_rotate 10
memory_pools off