Jumat, 06 Maret 2009

Konfigurasi Proxy Squid di OpenBSD

Untuk mengkonfigurasi squid edit file squid.conf berikut:

# cd /etc/squid
# nano squid.conf
Delete tanda # pada baris-baris isi file squid.conf sehingga menjadi seperti contoh file konfigurasi berikut:
http_port 8080
icp_port 3130

hierarchy_stoplist cgi-bin
cache_effective_user squid
cache_effective_group squid
cache_mem 8 MB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /cache 1000 16 256
cache_access_log /usr/local/squid/logs/access.log
cache_access /usr/local/squid/logs/cache.log
cache_store_log none
mime_table /usr/local/squid/etc/mime.conf
pid_filename /usr/local/squid/logs/squid.pid
logfile_rotate 10
visible_hostname proxy.doniepus.net.id #isi hostname sesuai dengan pc anda

acl netcomp src 192.168.0.0/24 #sesuaikan dengan network anda
acl all src 0.0.0.0/0.0.0.0
acl alldst ect 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 ssl_port port 443 563
acl safe_port port 80 21 443 563 70 1025-65535
acl CONNECT method CONNECT
acl erase method PURGE

http_access allow netcomp
http_access allow localhost
http_access allow manager localhost
http_access allow deny manager
http_access allow deny !safe_port
http_access allow CONNECT !ssl_port
http_access allow deny all

Kemudian sebelum menjalankan squid pertama kali ketikkan:
# squid -z
Jalankan squid dengan perintah:
# /etc/rc.d/init.d/squid restart

Tidak ada komentar:

Posting Komentar