Pastikan aplikasi squid sudah terinstallasi.
Tentukan ip address pada proxy server yang terkoneksi internet, Misal 192.168.0.223/255.255.255.0
# rpm -qa |grep squid
# rpm -qa |grep squid
squid-2.6.STABLE21-3.el5
Jika squid terinstall maka akan muncul seperti di atas.
Letak file configurasi squid di /etc/squid/squid.conf
# vim /etc/squid/squid.conf
Baris yang perlu di rubah dan ditambahi:
http_port 8080
icp_port 3130
hierarchy_stoplist cgi-bin ? .js .jsp .g .do .php .asp .cgi
acl QUERY urlpath_regex cgi-bin \? .js .jsp .g .do .php .asp .cgi
no_cache deny QUERY
cache_mem 16 MB
maximum_object_size 256 MB
cache_dir ufs /cache 100 16 256
access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
#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 bac src 192.168.0.15-192.168.0.253 #sesuaikan dengan class ip yang di gunakan.
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
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
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow all
http_access allow bac --> untuk memperbolehkan klass "bac" untuk berinternet.
Setelah file squid.conf dikonfigurasi jalankan service squid.
Caranya:
# service squid start
atau
# /etc/init.d/squid start
Jika service tersebut sudah selesai dilanjutkan dengan setting koneksi internet pada client.
Cara setting pada browser client:
1. Mozilla
Tools -> Options -> Advanced -> Network -> Setting -> Manual proxy configuration
2. IE
Tools -> Internet Options -> Connections -> Lan Settings
Atau
Control Panel -> Internet Options -> Connections -> Lan Settings
Sesuikan ip proxy mengarah ke proxy server kita.
End.
No comments:
Post a Comment