Tutorial Buat Proxy Server
setting Proxy server + TUNE UP :
Linux yang di gunakan adalah SLACKWARE 9 dapat di download di :
http://mirror.vip.net.id/pub/slackware/
yang di gunakan adalah :
komputer P4
HARD DISK 40 G seagate baracuda 7200 rpm 3 keping dengan RAM 2 G
keping hardisk pertama di mount ke /
keping hardisk ke 2 di mount ke /cache1
keping hard disk ke 3 di mount ke /cache2
setelah di install isikan ip address berikut :
interface eth0
ip address : 202.152.100.2
netmask 255.255.255.240
gateway 202.152.100.1
Interface eth1
ip address : 202.152.100.17
netmask 255.255.255.252
setelah itu …
buka file : type.h
root@proxy:~# vi /usr/include/bits/types.h
edit bagian ini :
#define __FD_SETSIZE 1024
jadi seperti ini
#define __FD_SETSIZE 8192
==> kemudian keluar dari VI EDITOR
kemudian ketik perintah ini :
root@proxy:~# ulimit -HSn 8192
kemudian download squid 2.5.STABLE9 dari sini :
wget http://202.154.183.7/squid-2.5.STABLE9.tar.gz
simpan di direktori /usr/local/src
ekstrak dengan perintah :
tar -zxvf squid-2.5.STABLE9.tar.gz
masuk kedirektori squid
ketik perintah berikut ini :
./configure \
–prefix=/opt/squid \
–exec-prefix=/opt/squid \
–enable-gnuregex \
–enable-async-io=30 \
–with-aufs-threads=30 \
–with-pthreads \
–with-aio \
–with-dl \
–enable-storeio=aufs \
–enable-removal-policies=heap \
–enable-icmp \
–disable-wccp \
–enable-snmp \
–enable-cache-digests \
–enable-default-err-languages=English \
–enable-err-languages=English \
–enable-linux-netfilter \
–disable-ident-lookups \
–disable-hostname-checks \
–enable-underscores
karena udah ada mikrotik untuk bw management tidak di perlukan lagi delay pool. Konfigurasi ini adalah untuk komputer dengan spek seperti berikut :
HARDISK 3 keping 40 G seagate baracuda 7200 rpm, RAM 2 G
2 keping hard disk untuk cache, 1 keping untuk system. apabila menggunakan hard disk scsi –enable-async-io=30 –with-aufs-threads=30 bisa di naekkan jadi 32.
==> selesai install squid. semua file squid akan terletak di direktori /opt/squid
setelah itu gunakan squid.conf di bawah ini :
http_port 8080 acl youtube dstdomain .youtube.com no_cache allow youtube hierarchy_stoplist cgi-bin ? localhost .js .jsp .friendster.com acl QUERY urlpath_regex cgi-bin \? localhost .friendster.com no_cache deny QUERY cache_replacement_policy heap LFUDA memory_replacement_policy heap GDSF cache_mem 6 MB cache_dir aufs /cache1 8000 13 256 cache_dir aufs /cache2 8000 13 256 cache_swap_low 98 cache_swap_high 99 cache_access_log /cache1/access.log cache_log /dev/null cache_store_log none mime_table /opt/squid/etc/mime.conf pid_filename /var/run/squid.pid client_netmask 255.255.255.0 refresh_pattern ^ftp: 10080 95% 241920 reload-into-ims override-lastmod refresh_pattern . 180 95% 120960 reload-into-ims override-lastmod redirect_rewrites_host_header off acl all src 0.0.0.0/0.0.0.0 acl manager proto cache_object acl localnet src 202.152.100.0/255.255.255.0 acl localhost src 127.0.0.1/255.255.255.255 acl SSL_ports port 443 8443 563 777 acl Safe_ports port 25 80 81 110 443 563 6667 7000 777 210 119 70 21 1025-65535 acl Safe_ports port 280 6668 6669 acl Safe_ports port 488 acl Safe_ports port 591 acl Safe_ports port 777 acl lewat dst_as 4622 4761 4787 4795 4796 4855 4800 7587 7597 7713 9326 9340 9448 9657 9791 9794 9875 9905 9228 9251 10114 10137 10208 10217 17440 17450 17451 17538 17658 17671 17670 17725 17727 17769 4832 4833 17817 17884 17907 17910 17922 17800 10220 17974 17826 17885 18052 18056 18059 7632 4821 18103 17996 18004 18153 18156 18189 18237 18251 18347 3583 3382 4382 4434 18364 18365 18379 9341 9785 18393 17995 23651 23666 23671 23679 23691 23756 23945 24052 24057 24194 always_direct allow lewat always_direct deny all #header_access Accept-Encoding deny all acl CONNECT method CONNECT http_access allow manager localhost http_access deny manager http_access allow localnet http_access allow localhost http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access deny CONNECT httpd_accel_host virtual httpd_accel_port 80 httpd_accel_with_proxy on httpd_accel_uses_host_header on http_access deny all maximum_object_size 128 MB maximum_object_size_in_memory 8 KB ipcache_size 4096 ipcache_low 98 ipcache_high 99 quick_abort_min 0 quick_abort_max 0 quick_abort_pct 75 fqdncache_size 4096 shutdown_lifetime 10 seconds cache_mgr hendraarif@yahoo.com cache_effective_user squid cache_effective_group squid memory_pools off buffered_logs off log_icp_queries off logfile_rotate 1 log_fqdn off forwarded_for off icp_hit_stale on query_icmp on reload_into_ims on emulate_httpd_log off negative_ttl 2 minutes pipeline_prefetch on vary_ignore_expire on half_closed_clients off high_page_fault_warning 2 visible_hostname proxy@dodol.org nonhierarchical_direct on prefer_direct off
perhatikan ip address yang di izinkan. sesuaikan dengan ip yang di gunakan.
perhatikan juga penggunaan cache direktori. maksimal untuk 1 keping adalah 18 Giga.
setelah itu tambahkan user squid di linux :
root@proxy:~# useradd squid
tambahkan juga group squid
root@proxy:~# groupadd squid
bentuk direktori cache di squid :
root@proxy:~# /opt/squid/sbin/squid -z
ketik perintah ini sekali lagi :
root@proxy:~# ulimit -HSn 8192
kemudian jalankan squid dengan perintah :
root@proxy:~# /opt/squid/sbin/squid -DY &
================================================== ==============
January 28th, 2008 at 9:22 pm
good..