arsel

Cuamporrr...

May 18th, 2012
529
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 51.41 KB | None | 0 0
  1. www.ziddu.com/download/19098635/AdvanceSquidcache_dirCalculator.zip.html
  2.  
  3.  
  4. [SQUID] Performance showcase ( text mode / squidclient)
  5.  
  6. bagi2 info performa squid donk...... sekaligus membagi resep2 nya dengan menyertakan squid.conf
  7.  
  8. saya duluan aja deh....
  9.  
  10. untuk performa squid
  11.  
  12. Connection information for squid:
  13. Number of clients accessing cache: 3
  14. Number of HTTP requests received: 38682
  15. Number of ICP messages received: 0
  16. Number of ICP messages sent: 0
  17. Number of queued ICP replies: 0
  18. Number of HTCP messages received: 0
  19. Number of HTCP messages sent: 0
  20. Request failure ratio: 0.00
  21. Average HTTP requests per minute since start: 119.8
  22. Average ICP messages per minute since start: 0.0
  23. Select loop called: 872460 times, 22.197 ms avg
  24. Cache information for squid:
  25. Request Hit Ratios: 5min: 51.6%, 60min: 46.2%
  26. Byte Hit Ratios: 5min: 23.2%, 60min: 21.2%
  27. Request Memory Hit Ratios: 5min: 3.4%, 60min: 1.6%
  28. Request Disk Hit Ratios: 5min: 25.6%, 60min: 33.1%
  29. Storage Swap size: 1343492 KB
  30. Storage Mem size: 6136 KB
  31. Mean Object Size: 18.58 KB
  32. Requests given to unlinkd: 0
  33. Median Service Times (seconds) 5 min 60 min:
  34. HTTP Requests (All): 0.28853 0.72387
  35. Cache Misses: 1.81376 1.81376
  36. Cache Hits: 0.00091 0.00091
  37. Near Hits: 0.80651 0.94847
  38. Not-Modified Replies: 0.00000 0.00091
  39. DNS Lookups: 0.08717 0.19488
  40. ICP Queries: 0.00000 0.00000
  41. Resource usage for squid:
  42. UP Time: 19366.304 seconds
  43. CPU Time: 72.189 seconds
  44. CPU Usage: 0.37%
  45. CPU Usage, 5 minute avg: 0.41%
  46. CPU Usage, 60 minute avg: 0.39%
  47. Process Data Segment Size via sbrk(): 20024 KB
  48. Maximum Resident Size: 0 KB
  49. Page faults with physical i/o: 0
  50. Memory usage for squid via mallinfo():
  51. Total space in arena: 20024 KB
  52. Ordinary blocks: 17302 KB 1347 blks
  53. Small blocks: 0 KB 0 blks
  54. Holding blocks: 1624 KB 4 blks
  55. Free Small blocks: 0 KB
  56. Free Ordinary blocks: 2721 KB
  57. Total in use: 18926 KB 87%
  58. Total free: 2721 KB 13%
  59. Total size: 21648 KB
  60. Memory accounted for:
  61. Total accounted: 11977 KB
  62. memPoolAlloc calls: 6013005
  63. memPoolFree calls: 5840318
  64. File descriptor usage for squid:
  65. Maximum number of file descriptors: 1024
  66. Largest file desc currently in use: 43
  67. Number of file desc currently in use: 31
  68. Files queued for open: 0
  69. Available number of file descriptors: 993
  70. Reserved number of file descriptors: 100
  71. Store Disk files open: 2
  72. IO loop method: epoll
  73. Internal Data Structures:
  74. 72461 StoreEntries
  75. 1132 StoreEntries with MemObjects
  76. 1124 Hot Object Cache Items
  77. 72322 on-disk objects
  78. rata2 hit nya 30%-70% naek turun.......
  79. itu baru running 2 hari..... mudah2an klo da 1 mingguan lebih stabil reportnya... dan terlihat kemampuan squidnya....
  80.  
  81. ini squid.conf saya
  82. http_port 3128
  83. icp_port 3130
  84. hierarchy_stoplist cgi-bin ?
  85. acl QUERY urlpath_regex cgi-bin \?
  86. no_cache deny QUERY
  87. cache_mem 6 MB
  88. cache_swap_low 98
  89. cache_swap_high 99
  90. maximum_object_size 64 MB
  91. maximum_object_size_in_memory 64 KB
  92. ipcache_size 8192
  93. ipcache_low 98
  94. ipcache_high 99
  95. fqdncache_size 8192
  96. cache_mgr admin@hotlink-id.net
  97. cache_replacement_policy heap LFUDA
  98. memory_replacement_policy heap GDSF
  99. cache_dir aufs /cache 12000 28 256
  100. cache_dir aufs /var/spool/squid 12000 28 256
  101. cache_access_log /var/log/squid/access.log
  102. #cache_access_log none
  103. cache_log /var/log/squid/cache.log
  104. cache_store_log none
  105. emulate_httpd_log off
  106. pid_filename /var/run/squid.pid
  107. mime_table /usr/share/squid/mime.conf
  108. log_fqdn off
  109. memory_pools off
  110. client_netmask 255.255.255.255
  111. ftp_list_width 32
  112. ftp_passive on
  113. ftp_sanitycheck on
  114. refresh_pattern ^ftp: 40320 95% 241920 reload-into-ims
  115. refresh_pattern . 120 80% 14400 reload-into-ims override-lastmod
  116. quick_abort_min 0
  117. quick_abort_max 0
  118. quick_abort_pct 98
  119. negative_ttl 2 minutes
  120. half_closed_clients off
  121. read_timeout 15 minutes
  122. client_lifetime 2 hours
  123. pconn_timeout 60 seconds
  124. request_timeout 1 minutes
  125. shutdown_lifetime 10 seconds
  126. positive_dns_ttl 60 seconds
  127. negative_dns_ttl 30 seconds
  128. acl all src 0.0.0.0/0.0.0.0
  129. acl manager proto cache_object
  130. acl localhost src 127.0.0.1
  131. acl lan src 192.168.5.0/24
  132. acl to_localhost dst 127.0.0.0/8
  133. acl PURGE method PURGE
  134. acl POST method POST
  135. acl IpAddressOnly url_regex ^http://[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/$
  136. acl IpAddressOnly url_regex ^http://[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$
  137. acl GETONLY method GET
  138. acl VIRUS urlpath_regex winnt/system32/cmd.exe?
  139. acl SSL_ports port 443 563
  140. acl Safe_ports port 80 # http
  141. acl Safe_ports port 21 # ftp
  142. acl Safe_ports port 443 563 # https, snews
  143. acl Safe_ports port 70 # gopher
  144. acl Safe_ports port 210 # wais
  145. acl Safe_ports port 1025-65535 # unregistered ports
  146. acl Safe_ports port 280 # http-mgmt
  147. acl Safe_ports port 488 # gss-http
  148. acl Safe_ports port 591 # filemaker
  149. acl Safe_ports port 777 # multiling http
  150. acl CONNECT method CONNECT
  151. acl snmppublic snmp_community public
  152. # Hotmail workaround
  153. header_access Accept-Encoding deny all
  154. http_access allow localhost
  155. http_access allow lan
  156. http_access allow manager lan
  157. http_access allow PURGE localhost
  158. http_access deny manager
  159. http_access deny !Safe_ports
  160. http_access deny CONNECT !SSL_ports
  161. http_access deny PURGE
  162. http_access deny VIRUS
  163. http_access deny all
  164. http_reply_access allow all
  165. icp_access allow lan
  166. icp_access deny all
  167. miss_access allow lan
  168. miss_access deny all
  169. cache_effective_user proxy
  170. cache_effective_group proxy
  171. visible_hostname proxy.hotlink.net
  172. unique_hostname proxy.hotlink.net
  173. logfile_rotate 7
  174. forwarded_for on
  175. icp_hit_stale on
  176. log_icp_queries off
  177. query_icmp on
  178. buffered_logs off
  179. strip_query_terms off
  180. icon_directory /usr/share/squid/icons
  181. error_directory /usr/share/squid/errors/English
  182. store_avg_object_size 13 KB
  183. store_objects_per_bucket 10
  184. client_db on
  185. snmp_port 3401
  186. snmp_access allow snmppublic lan
  187. snmp_access deny all
  188. coredump_dir /cache01
  189. reload_into_ims on
  190. pipeline_prefetch on
  191. ie_refresh on
  192. vary_ignore_expire on
  193.  
  194. ayo yang laen nyusul ya....
  195.  
  196. #################################
  197. default config squid tidak di dedikasikan utk caching dynamic content, terutama utk file2 dynamic (kayak youtube dan google addssense dll) file2 itu biasanya membuat penuh cache tapi karena content dynamic oleh squid pasti akan dianggap miss dan akan mendownload lagi jadi bisa membuat posioning cache
  198.  
  199. untuk update squid ke lusca silahkan ikuti cara2 ini (contoh utk redhat base & freebsd base)
  200.  
  201. cara2nya (pake putty aja enak), apa itu puty silahkan baca disini :
  202.  
  203.  
  204. untuk keluarga redhat-5 (centos-5.x, fedora, clearOS dll)
  205. stop dulu servis squid nya
  206. /etc/init.d/squid stop
  207.  
  208. backup dulu squid.conf nya di /etc/squid/squid.conf
  209. delet squid lama
  210. rpm -e squid-xxx(versi squid)
  211.  
  212. delete file di directory cache_dir
  213. ex:
  214. rm -rf /cache/*
  215.  
  216. download package lusca
  217.  
  218.  
  219. NEW LUSCA UBUNTU-64 BIT (SVN checkout 24 Maret 2010)
  220.  
  221. hxxp://squid-proxy-pkg.googlecode.com/files/deb-lusca-r14499-64.tar.bz2
  222.  
  223.  
  224.  
  225. NEW LUSCA Release 14410 (SVN checkout 16 February 2010)
  226. hxxp://squid-packge.googlecode.com/files/LUSCA_HEAD-r14410-1_el5.i386.rpm
  227. hxxp://squid-packge.googlecode.com/files/LUSCA_HEAD-r14410-1_el5.x86_64.rpm
  228. wget hxxp://squid-packge.googlecode.com/files/LUSCA_HEAD-r14371-1_el5.i386.rpm
  229.  
  230. trus di intstall
  231.  
  232. rpm -Uvh LUSCA_HEAD-r14371-1_el5.i386.rpm
  233. trus download file2 confignya
  234.  
  235. cd /etc/squid/
  236. wget hxxp://squid-proxy-pkg.googlecode.com/files/squid.conf
  237. wget hxxp://squid-proxy-pkg.googlecode.com/files/storeurl-el5.pl
  238. wget hxxp://squid-proxy-pkg.googlecode.com/files/tunning-el5.conf
  239.  
  240. chmod +x storeurl-el5.pl
  241. chown squid:squid tunning-el5.conf
  242. chown squid:squid storeurl-el5.pl
  243. dan silahkan sesuaikan configurasi cache_dir,allow netlocal dll di tempat anda di file squid.conf
  244.  
  245. update tunning sysctl.conf
  246. cd /etc/
  247. wget hxxp://squid-packge.googlecode.com/files/sysctl.conf-el5
  248. mv sysctl.conf-el5 sysctl.conf
  249.  
  250.  
  251. rebuild cache
  252.  
  253. cek configurasi
  254. squid -k parse
  255.  
  256. jika tidak ada error, rebuild cache swap
  257. squid -z
  258.  
  259. start servis squid
  260.  
  261. /etc/init.d/squid start
  262.  
  263. catatan:
  264. dengan 6 client aktif perhari saja, cache swap bisa mencapai 1 Gb perhari, dan lusca hanya support aufs dan coss, tidak support ufs dan diskd (obsolete)
  265.  
  266. sources LUSCA rpm : hxxp://squid-packge.googlecode.com/files/LUSCA_HEAD-r14371-1_el5.src.rpm
  267.  
  268. utk keluarga freebsd (pfsense ):
  269.  
  270. stop dulu servis squidnya (bisa lewat web kalo di pfsense)
  271. delete directory cache_dir (default di /var/squid/cache)
  272. rm -rf /var/squid/cache/*
  273.  
  274. delet dulu squid lama
  275.  
  276. pkg_delete squid\*
  277.  
  278. install lusca
  279. update release from svn lusca-head-r14410
  280. hxxp://squid-packge.googlecode.com/files/lusca-head-r14410_1.tbz
  281. pkg_add -rv hxxp://squid-proxy-pkg.googlecode.com/files/freebsd-lusca-head-r14371_3.tbz
  282. rehash
  283. squid -v
  284.  
  285. kemudian baru di tunning kernel dan squidnya :
  286. masuk ke directory squid
  287. cd /usr/local/etc/squid/
  288. download dulu tunning squidnya
  289. fetch hxxp://freebsd-squid-system.googlecode.com/files/tunning.conf
  290. download program store dynamic cache
  291. fetch hxxp://freebsd-squid-system.googlecode.com/files/storeurl.pl
  292.  
  293. ubah mode filenya :
  294. chmod +x storeurl.pl
  295. chown proxyroxy storeurl.pl
  296. chown proxyroxy tunning.conf
  297.  
  298. download tunning kernel
  299. cd /etc
  300. fetch hxxp://freebsd-squid-system.googlecode.com/files/sysctl.conf
  301. cd /boot
  302. fetch hxxp://freebsd-squid-system.googlecode.com/files/loader.conf
  303.  
  304. trus tambahin option tunning dengan menambah link baris di
  305. /usr/local/pkg/squid.inc
  306. cari kata2 ini pake winscp
  307. acl dynamic urlpath_regex cgi-bin \?
  308. dan tambahkan ini dibawahnya
  309. include /usr/local/etc/squid/tunning.conf
  310.  
  311. trus rebuild cache
  312.  
  313. squid -z
  314.  
  315. sebelum servis dijalankan, cek apakah ada yang salah dengan confignya :
  316.  
  317. squid -k parse
  318. jika tidak ada error, start servis squidnya (bisa lewat web) atau reboot server nya
  319.  
  320. untuk keluarga debian (ubuntu,kubuntu dll) dan slackware filenya masih belum di upload, atau silahkan build sendiri dari sources hehehe
  321.  
  322.  
  323. copy patse dr bawah
  324. just info :
  325.  
  326. configurasi tunning*.conf gak akan jalan kalau menggunakan sources lusca originalnya, package yang di buat (rpm dan bz) sudah di patch untuk optimasi refresh_pattern. beberapa perbedaan yang dibuat .
  327. 1. support for refresh_pattern store-stale (belum ada di squid-2.7 dan lusca original)
  328. 2.tambahan ignore-no-store,ignore-must-revalidate (belum ada di squid-2.7 dan lusca original),
  329. 3. patch loop untuk content video (akan muncul cacheHit dan looping terdetetect maka download ulang content yang sama akan di stop.
  330. 4. patch varry on, jika menggunakan default lusca / squid-2.7.x dengan menggunakan configurasi storeurl_rewrite_program, jangan di reboot servernya, jika reboot, file content dynamic akan menjadi miss
  331.  
  332. untuk test case, silahkan tambahkan option store-stale di setaip refresh_pattern, pastin beda penuhnya cache dengan tanpa store-stale
  333.  
  334. Update Ubuntu/Debian Base i386
  335.  
  336. Ubuntu/Debian base i386
  337. hxxp://squid-proxy-pkg.googlecode.com/files/lusca_r144281-ubuntu-i386.tar.bz2
  338. ######################
  339. [SHARE] Mari Incip2 DNS Unbound High Performance
  340.  
  341. berawal dari infonya azzzf
  342.  
  343. thx bro
  344.  
  345. jadi penasaran dengan perfomancenya
  346. numpang ijin di tampilkan graphnya hehehe ..
  347.  
  348.  
  349. Click here to view the original image of 754x453px.
  350.  
  351.  
  352. tested on OS ubuntu ram 1Gb, (include servis squid, apache2, & mrtg squid)
  353.  
  354. lansung di geber :
  355.  
  356. Code:
  357.  
  358. apt-get install unbound
  359. cd /etc/unbound
  360. wget ftp://FTP.INTERNIC.NET/domain/named.cache
  361. unbound-control-setup
  362. chown unbound:root unbound_*
  363. chmod 440 unbound_*
  364.  
  365.  
  366. dan sesuaikan config /etc/unbound/unbound.conf, dan servis dns lainnya (bind/dnsmasq dll) harus di stop agar tidak bentrok)
  367.  
  368. Code:
  369.  
  370. server:
  371. verbosity: 1
  372. statistics-interval: 120
  373. num-threads: 1
  374. interface: 0.0.0.0
  375.  
  376. outgoing-range: 512
  377. num-queries-per-thread: 1024
  378.  
  379. msg-cache-size: 16m
  380. rrset-cache-size: 32m
  381.  
  382. msg-cache-slabs: 4
  383. rrset-cache-slabs: 4
  384.  
  385. cache-max-ttl: 86400
  386. infra-host-ttl: 60
  387. infra-lame-ttl: 120
  388.  
  389. infra-cache-numhosts: 10000
  390. infra-cache-lame-size: 10k
  391.  
  392. do-ip4: yes
  393. do-ip6: no
  394. do-udp: yes
  395. do-tcp: yes
  396. do-daemonize: yes
  397.  
  398. #access-control: 0.0.0.0/0 allow
  399. access-control: 192.168.0.0/16 allow
  400. access-control: 172.16.0.0/12 allow
  401. access-control: 10.0.0.0/8 allow
  402. access-control: 127.0.0.0/8 allow
  403. access-control: 0.0.0.0/0 refuse
  404.  
  405. chroot: "/etc/unbound"
  406. username: "unbound"
  407. directory: "/etc/unbound"
  408. #logfile: "/etc/unbound/unbound.log"
  409. #use-syslog: yes
  410. logfile: ""
  411. use-syslog: no
  412. pidfile: "/etc/unbound/unbound.pid"
  413. root-hints: "/etc/unbound/named.cache"
  414.  
  415. identity: "DNS"
  416. version: "1.4"
  417. hide-identity: yes
  418. hide-version: yes
  419. harden-glue: yes
  420. do-not-query-address: 127.0.0.1/8
  421. do-not-query-localhost: yes
  422. module-config: "iterator"
  423.  
  424. #zone localhost
  425. local-zone: "localhost." static
  426. local-data: "localhost. 10800 IN NS localhost."
  427. local-data: "localhost. 10800 IN SOA localhost. nobody.invalid. 1 3600 1200 604800 10800"
  428. local-data: "localhost. 10800 IN A 127.0.0.1"
  429.  
  430. local-zone: "127.in-addr.arpa." static
  431. local-data: "127.in-addr.arpa. 10800 IN NS localhost."
  432. local-data: "127.in-addr.arpa. 10800 IN SOA localhost. nobody.invalid. 2 3600 1200 604800 10800"
  433. local-data: "1.0.0.127.in-addr.arpa. 10800 IN PTR localhost."
  434.  
  435. #zone warnet-sudiro.net
  436. local-zone: "warnet-sudiro.net." static
  437. local-data: "warnet-sudiro.net. 86400 IN NS ns1.warnet-sudiro.net."
  438. local-data: "warnet-sudiro.net. 86400 IN SOA warnet-sudiro.net. hostmaster.warnet-sudiro.net. 3 3600 1200 604800 86400"
  439. local-data: "warnet-sudiro.net. 86400 IN A 192.168.100.2"
  440. local-data: "www.warnet-sudiro.net. 86400 IN A 192.168.100.2"
  441. local-data: "ns1.warnet-sudiro.net. 86400 IN A 192.168.100.2"
  442.  
  443. local-data: "mail.warnet-sudiro.net. 86400 IN A 192.168.100.5"
  444. local-data: "warnet-sudiro.net. 86400 IN MX 10 mail.warnet-sudiro.net."
  445. local-data: "warnet-sudiro.net. 86400 IN TXT v=spf1 a mx ~all"
  446.  
  447. local-zone: "100.168.192.in-addr.arpa." static
  448. local-data: "100.168.192.in-addr.arpa. 10800 IN NS warnet-sudiro.net."
  449. local-data: "100.168.192.in-addr.arpa. 10800 IN SOA warnet-sudiro.net. hostmaster.warnet-sudiro.net. 4 3600 1200 604800 864000"
  450. local-data: "2.100.168.192.in-addr.arpa. 10800 IN PTR warnet-sudiro.net."
  451.  
  452. forward-zone:
  453. name: "."
  454. forward-addr: 202.134.1.10
  455. forward-addr: 222.124.204.34
  456. forward-addr: 202.134.0.155
  457.  
  458. remote-control:
  459. control-enable: yes
  460. control-interface: 127.0.0.1
  461. control-port: 953
  462. server-key-file: "/etc/unbound/unbound_server.key"
  463. server-cert-file: "/etc/unbound/unbound_server.pem"
  464. control-key-file: "/etc/unbound/unbound_control.key"
  465. control-cert-file: "/etc/unbound/unbound_control.pem"
  466.  
  467.  
  468. root@ubuntu:~# /etc/init.d/unbound restart
  469. root@ubuntu:~# nslookup 192.168.100.2
  470. Server: 127.0.0.1
  471. Address: 127.0.0.1#53
  472.  
  473. 2.00.168.192.in-addr.arpa name = warnet-sudiro.net.
  474.  
  475. root@ubuntu:~# nslookup warnet-sudiro.net
  476. Server: 127.0.0.1
  477. Address: 127.0.0.1#53
  478.  
  479. Name: warnet-sudiro.net
  480. Address: 192.168.100.2
  481.  
  482. root@ubuntu:~#
  483. root@ubuntu:~#unbound-control stats
  484. thread0.num.queries=38
  485. thread0.num.cachehits=7
  486. thread0.num.cachemiss=31
  487. thread0.num.recursivereplies=31
  488. thread0.requestlist.avg=0.129032
  489. thread0.requestlist.max=1
  490. thread0.requestlist.overwritten=0
  491. thread0.requestlist.exceeded=0
  492. thread0.requestlist.current.all=0
  493. thread0.requestlist.current.user=0
  494. thread0.recursion.time.avg=0.088811
  495. thread0.recursion.time.median=0.0185685
  496. thread1.num.queries=10
  497. thread1.num.cachehits=1
  498. thread1.num.cachemiss=9
  499. thread1.num.recursivereplies=9
  500. thread1.requestlist.avg=0
  501. thread1.requestlist.max=0
  502. thread1.requestlist.overwritten=0
  503. thread1.requestlist.exceeded=0
  504. thread1.requestlist.current.all=0
  505. thread1.requestlist.current.user=0
  506. thread1.recursion.time.avg=0.049576
  507. thread1.recursion.time.median=0.016384
  508. total.num.queries=48
  509. total.num.cachehits=8
  510. total.num.cachemiss=40
  511. total.num.recursivereplies=40
  512. total.requestlist.avg=0.1
  513. total.requestlist.max=1
  514. total.requestlist.overwritten=0
  515. total.requestlist.exceeded=0
  516. total.requestlist.current.all=0
  517. total.requestlist.current.user=0
  518. total.recursion.time.avg=0.079984
  519. total.recursion.time.median=0.0174763
  520. time.now=1281681396.583885
  521. time.up=7299.491047
  522. time.elapsed=4177.655650
  523. simple heheh
  524.  
  525. Package terbaru paket debian/ubuntu dari bro siber
  526.  
  527. Quote Originally Posted by siber View Post
  528. unbound_1.4.6 (build ---with-libevent),
  529. silahkan sedot disini pakagenya :
  530.  
  531. unbound_1.4.6 debian 32 bit
  532. unbound_1.4.6 debian 64 bit
  533.  
  534. http://www.forummikrotik.com/guide/14263-%5Bshare%5D-mari-incip2-dns-unbound-high-performance.html
  535. ############################
  536.  
  537.  
  538.  
  539. Maap jika Tuts ini terlalu panjang.
  540. I. PERSIAPAN DAN DEFINISI DELAY POOLS
  541. Gambaran Umum Delay Pools:
  542. Delay Pools adalah untuk mengkonfigurasikan squid dengan pengaturan bandwidth berdasarkan kriteria tertentu.
  543.  
  544. Siapkan PC dengan kemampuan lebih, seperti :
  545. 1. P4 @ 2 Ghz cukup
  546. 2. harddisk cukup kecil saja sekitar 40 Gb 7200 rpm
  547. 2. Memory 512 (semakin besar semakin bagus, cachenya agar tidak "tumpah" ke harddisk)
  548. 3. Linux Distro (Ubuntu, Fedora Core, Slackware)
  549. 4. Squid-cache bisa download lewat: http://www.squid-cache.org/ downloadlah versi terbaru paling stabil (squid2.6 stable 12,saat diketik tulisan ini)
  550. 5. Konfigurasi network yang akan digunakan adalah:
  551. ....INET------SWITCH----MIKROTIK---CLIENT
  552. .......................|
  553. .......................--------SQUIDBOX
  554.  
  555.  
  556. II. INSTALASI SQUID
  557. A.DOWNLOAD SQUID
  558. Untuk memudahkan instalasi maka, LinuxBox harus sudah bisa terhubung ke internet untuk mendownload langsung sourcenya dengan perintah:
  559.  
  560. PS: Menggunakan distro Ubuntu
  561.  
  562. untuk check directory aktif
  563. Code:
  564.  
  565. admin@squidbox:~$ pwd
  566. /home/admin
  567.  
  568. untuk download langsung dari web squidcache
  569. Code:
  570.  
  571. admin@squidbox:~$ wget http://www.squid-cache.org/Versions/v2/2.6/squid-2.6.STABLE12.tar.gz
  572.  
  573. untuk menginstall package squid
  574. Code:
  575.  
  576. admin@squidbox:~$ tar -zxvf squid-2.6.STABLE12.tar.gz
  577. admin@squidbox:~$ cd squid-2.6.STABLE12/
  578. admin@squidbox:~/squid-2.6.STABLE12$ pwd
  579. /home/admin/squid-2.6.STABLE12
  580.  
  581. B.KONFIGURASI SQUID
  582. sampai sini instalasi squid sudah beres, sekarang memberikan hak akses untuk normal user agar untuk menjalankan squid jika perlu di reboot atau maintenace tidak perlu dari user root.
  583.  
  584. Code:
  585.  
  586. admin@squidbox:~/squid-2.6.STABLE12$ sudo useradd -d /usr/local/squid/ -r -s /dev/null squid > /dev/null 2>&1
  587.  
  588. sekarang kita mengkonfigurasi agar squid kita bisa memanfaatkan delay-pools dan juga mengaktifkan SNMP untuk MRTG dan ICMP
  589. Code:
  590.  
  591. admin@squidbox:~/squid-2.6.STABLE12$ ./configure –prefix=/home/admin/squid-2.6.STABLE12 \
  592. –exec-prefix=/home/admin/squid-2.6.STABLE12 –enable-gnuregex \
  593. –enable-icmp –enable-snmp \
  594. –enable-delay-pools –enable-cache-diggest \
  595. –enable-removal-policies=heap –enable-default-err-languages=English \
  596. –enable-err-languages=English –enable-async-io=24 \
  597. –with-aufs-threads=24 –with-pthreads \
  598. –with-aio –with-dl \
  599. –enable-storeio=aufs,diskd –enable-epoll \
  600. –enable-kill-parent-hack –disable-ident-lookups \
  601. –disable-wccp –disable-wccpv2 \
  602. –enable-htcp
  603.  
  604. untuk informasi lebih jelas konfigurasi dan compile squid bisa lihat kesini:
  605. http://wiki.squid-cache.org/SquidFaq/CompilingSquid
  606. http://wiki.squid-cache.org/SquidFaq/ConfiguringSquid
  607.  
  608. untuk prefix dan exec-prefix disesuaikan dengan directory squidnya.
  609.  
  610. C.MENGKOMPILE DAN INSTALASI SQUID
  611. setelah konfigurasi awal di atas selesai maka kita bisa mengkompile nya dengan perintah:
  612. Code:
  613.  
  614. admin@squidbox:~/squid-2.6.STABLE12$ make
  615. admin@squidbox:~/squid-2.6.STABLE12$ sudo make install
  616.  
  617. III.Konfigurasi squid.conf
  618. A.Penjelasan Delay Pools dan parameternya
  619. Untuk Penjelasan Mengenai Delay Pools bisa ke thread ini, karena kalau terlalu panjang Tutsnya nanti malah jadi Boring dan Pusing. ^^
  620. http://www.forummikrotik.com/showthr...ted=1#post1608
  621.  
  622. B. Mengedit Squid.conf
  623. Untuk mengedit konfigurasi squid.conf dapat memberikan perintah sebagai berikut:
  624. Code:
  625.  
  626. admin@squidbox:~/squid-2.6.STABLE12$ sudo nano /home/admin/squid-2.6.STABLE12/etc/squid.conf
  627.  
  628. Konfigurasi default dan optimalisasi squid.conf:
  629. Code:
  630.  
  631. http_port 3128
  632. hierarchy_stoplist cgi-bin ?
  633. acl QUERY urlpath_regex cgi-bin \?
  634.  
  635. # LOGFILE PATHNAMES AND CACHE DIRECTORIES
  636. # —————————————————————————–
  637. cache_dir diskd /home/admin/squid-2.6.STABLE12/var/cache 1000 8 256 # << Sesuaikan dengan kebutuhan anda
  638. access_log /home/admin/squid-2.6.STABLE12/var/logs/access.log squid
  639. cache_log /home/admin/squid-2.6.STABLE12/var/logs/cache.log
  640. log_fqdn off
  641. buffered_logs off
  642.  
  643. # OPTIONS FOR TUNING THE CACHE
  644. # —————————————————————————–
  645. refresh_pattern /.gif 4320 50% 43200
  646. refresh_pattern /.jpg 4320 50% 43200
  647. refresh_pattern /.jpeg 4320 50% 43200
  648. refresh_pattern /.png 4320 50% 43200
  649. refresh_pattern ^http://www.friendster.com/.* 720 100% 10080
  650. refresh_pattern ^http://mail.yahoo.com/.* 720 100% 10080
  651. refresh_pattern ^http://*.yahoo.*/.* 720 100% 7200
  652. refresh_pattern ^http://*.google.com/.* 720 100% 10080
  653. refresh_pattern ^http://www.telkomspeedy.com/.* 720 100% 28800
  654. refresh_pattern ^http://*.blogsome.com/.* 720 80% 10080
  655. refresh_pattern ^http://*.wordpress.com/.* 720 80% 10080
  656. refresh-pattern ^http://detik.com/.* 720 90% 2880
  657. refresh_pattern ^ftp: 14400 90% 43200 reload-into-ims
  658. refresh_pattern ^gopher: 1440 0% 1440
  659. refresh_pattern . 0 20% 4320 reload-into-ims
  660.  
  661. quick_abort_min 0 KB
  662. quick_abort_max 0 KB
  663. quick_abort_pct 95
  664.  
  665. # ACCESS CONTROLS
  666. # —————————————————————————–
  667. acl my_network src 192.168.1.0/24
  668. acl SSL_ports port 443 563
  669. #acl Safe_ports port 280 # http-mgmt
  670. acl Safe_ports port 443 563 # https
  671. #acl Safe_ports port 488 # gss-http
  672. #acl Safe_ports port 591 # filemaker
  673. #acl Safe_ports port 777 # multiling http
  674. http_access allow manager localhost my_network
  675. http_access allow my_network
  676.  
  677. acl download url_regex -i \.mp3
  678. acl download url_regex -i \.3gp
  679. acl download url_regex -i \.avi
  680. acl download url_regex -i \.mpg
  681. acl download url_regex -i \.mpeg
  682. acl download url_regex -i \.wav
  683. acl download url_regex -i \.flv
  684. acl download url_regex -i \.swf
  685.  
  686. # DELAY POOL PARAMETERS (all require DELAY_POOLS compilation option)
  687. # —————————————————————————–
  688. delay_pools 2
  689. delay_class 1 3
  690. delay_parameters 1 -1/-1 -1/-1 8000/8000
  691. delay_access 1 allow my_network download
  692. delay_access 1 deny all
  693. delay_class 2 2
  694. delay_parameters 2 -1/-1 -1/-1
  695. delay_access 2 allow my_network
  696. delay_access 2 deny all
  697.  
  698. # ADMINISTRATIVE PARAMETERS
  699. # —————————————————————————–
  700. cache_effective_user squid
  701.  
  702. # MISCELLANEOUS
  703. # —————————————————————————–
  704. logfile_rotate 5
  705. reload_into_ims on
  706. store_dir_select_algorithm round-robin
  707.  
  708. # ADMINISTRATIVE PARAMETERS
  709. # —————————————————————————–
  710. cache_mgr youremail@host.com
  711. visible_hostname localhost
  712.  
  713. IV. Menjalankan Squid-cache
  714. A. Membuat swap cache
  715. Code:
  716.  
  717. [root@squidbox]#/usr/local/squid/sbin/squid -z
  718.  
  719. B. Mengaktifkan Squid di Foreground task
  720. Code:
  721.  
  722. ghoz@ghoz-desktop:~/squid-2.6.STABLE12$ home/ghoz/squid-2.6.STABLE12/sbin/squid -SND
  723. ghoz@ghoz-desktop:~/squid-2.6.STABLE12$ home/ghoz/squid-2.6.STABLE12/sbin/squid start
  724.  
  725. C. Monitoring TCP squidBox
  726. Code:
  727.  
  728. admin@squidbox:~/squid-2.6.STABLE12$ sudo netstat -pln | grep squid
  729.  
  730. Bila tampilan ada yang persis seperti dibawah ini, berarti squid telah berjalan.
  731. Code:
  732.  
  733. tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 18047/(squid)
  734. udp 0 0 0.0.0.0:3130 0.0.0.0:* 18047/(squid)
  735. udp 0 0 0.0.0.0:3401 0.0.0.0:* 18047/(squid)
  736. udp 0 0 0.0.0.0:4827 0.0.0.0:* 18047/(squid)
  737. udp 0 0 0.0.0.0:32992 0.0.0.0:* 18047/(squid)
  738.  
  739. Untuk pengecekan, maka client dicoba untuk browsing, jika ada data in/out maka proses pembuatan transparant proxy sudah berhasil.
  740. #######^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^######################################
  741.  
  742.  
  743. berbagi refresh pattern
  744.  
  745. refresh pattern adalah salah satu fitur di squid yang bisa kita gunakan untuk memaksa sebuah content tetap dianggap HIT dalam kurun waktu tertentu, kalo salah mohon diluruskan
  746.  
  747. ane cuman mau berbagi sesama ini juga bukan murni buatan saya tp hasil modif sana-sini dan saya anggap sangat ringan dalam memaksa content tetap dianggap HIT (fresh)
  748.  
  749. Spek mesin ane PIII RAM 512 MB
  750. oh ya menurut saya semakin tinggi dan banyak kriteria refresh pattern ini maka harus setara dengan hardware makanya jangan langsung di copas punya nya om2 disini klo spek pc na jauh berbeda, ntar malah makin lelet....
  751.  
  752. CMIIW
  753.  
  754. Zchellpy
  755.  
  756. Code:
  757.  
  758. # 1 week = 10080 mins, 1 month = 43200 mins, 3 months = 129600 mins
  759.  
  760. # pictures & images
  761. refresh_pattern -i \.(gif|png|jpeg|jpg|bmp|tif|tiff|ico)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth ignore-private
  762. refresh_pattern -i \.(xml|html|htm|js|txt|css|php)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth
  763.  
  764. #sound, video & multimedia
  765. refresh_pattern -i \.(flv|x-flv|mov|avi|qt|mpg|mpeg|swf)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache
  766. refresh_pattern -i \.(wav|mp3|mp4|au|mid)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth ignore-private
  767.  
  768. # files
  769. refresh_pattern -i \.(iso|deb|rpm|zip|tar|tgz|ram|rar|bin|ppt|doc)$ 10080 90% 43200 ignore-no-cache ignore-auth
  770. refresh_pattern -i \.(zip|gz|arj|lha|lzh)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth
  771. refresh_pattern -i \.(rar|tgz|tar|exe|bin)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth
  772. refresh_pattern -i \.(hqx|pdf|rtf|doc|swf)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth
  773. refresh_pattern -i \.(inc|cab|ad|txt|dll)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth
  774.  
  775. # dynamic content
  776. refresh_pattern ^http://(.*?)/get_video\? 10080 90% 999999 override-expire ignore-no-cache ignore-private
  777. refresh_pattern ^http://(.*?)/videoplayback\? 10080 90% 999999 override-expire ignore-no-cache ignore-private
  778. refresh_pattern -i (get_video\?|videoplayback\?id|videoplayback.*id) 161280 50000% 525948 override-expire ignore-reload
  779.  
  780. # -- refresh pattern for specific sites -- #
  781. refresh_pattern ^http://*.jobstreet.com.*/.* 720 100% 10080 override-expire override-lastmod ignore-no-cache
  782. refresh_pattern ^http://*.indowebster.com.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth
  783. refresh_pattern ^http://*.21cineplex.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth
  784. refresh_pattern ^http://*.kompas.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  785. refresh_pattern ^http://*.theinquirer.*/.* 720 100% 10080 override-expire ignore-no-cache ignore-auth
  786. refresh_pattern ^http://*.blogspot.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  787. refresh_pattern ^http://*.wordpress.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache
  788. refresh_pattern ^http://*.photobucket.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  789. refresh_pattern ^http://*.tinypic.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  790. refresh_pattern ^http://*.imageshack.us/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  791. refresh_pattern ^http://*.kaskus.*/.* 720 100% 28800 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  792. refresh_pattern ^http://www.kaskus.com/.* 720 100% 28800 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  793. refresh_pattern ^http://*.detik.*/.* 720 50% 2880 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  794. refresh_pattern ^http://*.detiknews.*/*.* 720 50% 2880 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  795. refresh_pattern ^http://video.liputan6.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  796. refresh_pattern ^http://static.liputan6.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  797. refresh_pattern ^http://*.friendster.com/.* 720 100% 10080 override-expire override-lastmod ignore-no-cache ignore-auth
  798. refresh_pattern ^http://*.facebook.com/.* 720 100% 10080 ignore-reload override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  799. refresh_pattern ^http://*.apps.facebook.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  800. refresh_pattern ^http://*.fbcdn.net/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  801. #refresh_pattern ^http://creative.ak.fbcdn.net/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  802. #refresh_pattern ^http://facebook.poker.zynga.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  803. #refresh_pattern ^http://facebook2.poker.zynga.com/.* 720 100% 10080 override-expire ignore-reload reload-into-ims ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
  804. refresh_pattern ^http://*.texas_holdem.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  805. refresh_pattern ^http://static-facebook.farmville.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  806. refresh_pattern ^http://static.farmville.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  807.  
  808. refresh_pattern ^http:\/\/\videoxl\.l[0-9]\.facebook.com\/.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  809. refresh_pattern ^http:\/\/\*.channel\.facebook\.com\/.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  810. refresh_pattern ^http:\/\/video\.ak\.facebook.com*\/.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  811. refresh_pattern ^http:\/\/photos-[a-z]\.ak\.fbcdn\.net\/.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  812. refresh_pattern ^http:\/\/profile\.ak\.fbcdn.net*\/.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  813. refresh_pattern ^http:\/\/static\.ak\.fbcdn.net*\/.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  814. refresh_pattern ^http:\/\/creative\.ak\.fbcdn.net*\/.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  815. refresh_pattern ^http:\/\/facebook\.poker\.zynga.com\.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  816. refresh_pattern ^http:\/\/\statics\.poker\.static\.zynga\.com\.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  817. refresh_pattern ^http:\/\/\*.crowdstar.com*\.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  818. refresh_pattern ^http://static.playspoon.com/.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  819. refresh_pattern ^http://cooking.game.playspoon.com/.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  820. refresh_pattern -i http://[^a-z\.]*onemanga\.com/? 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  821. refresh_pattern ^http://media?.onemanga.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  822. refresh_pattern ^http://*.yahoo.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  823. refresh_pattern ^http://*.google.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  824. refresh_pattern ^http://*.forummikrotik.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  825. refresh_pattern ^http://*.linux.or.id/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  826. refresh_pattern ^http://*.l.yimg\.com.*\.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  827. refresh_pattern ^http://*.yahoofs.com\.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  828. refresh_pattern ^http://v\.okezone\.com/get_video\/([a-zA-Z0-9]) 129600 100% 129600 ignore-no-cache ignore-no-store reload-into-ims override-expire ignore-must-revalidate store-stale
  829. refresh_pattern \.(ico|video-stats) 129600 100% 129600 override-expire ignore-reload ignore-no-cache ignore-no-store ignore-private ignore-auth override-lastmod ignore-must-revalidate negative-ttl=10080 store-stale
  830. refresh_pattern \.etology\? 129600 100% 129600 override-expire ignore-reload ignore-no-cache store-stale
  831. refresh_pattern galleries\.video(\?|sz) 129600 100% 129600 override-expire ignore-reload ignore-no-cache store-stale
  832. refresh_pattern \.adtology\? 129600 100% 129600 override-expire ignore-reload ignore-no-cache store-stale
  833. refresh_pattern ^.*safebrowsing.*google 43200 50% 129600 override-expire ignore-reload ignore-no-cache ignore-no-store ignore-private ignore-auth ignore-must-revalidate negative-ttl=10080 store-stale
  834. refresh_pattern ^http://((cbk|mt|khm|mlt)[0-9]?)\.google\.co(m|\.id) 43200 50% 129600 override-expire ignore-reload store-stale ignore-private negative-ttl=10080
  835. refresh_pattern ^http://*.ytimg\.com.*\.* 43200 50% 129600 override-expire ignore-reload store-stale
  836. refresh_pattern kaspersky.*\.(avc|xml|dif|klz|kdc)$ 43200 100% 43200 ignore-reload store-stale
  837. refresh_pattern kaspersky 1440 50% 43200 ignore-no-cache store-stale
  838. refresh_pattern vid\.akm\.dailymotion\.com.*\.on2\? 129600 100% 129600 ignore-no-cache override-expire override-lastmod store-stale
  839. refresh_pattern ^http:\/\/images|pics|thumbs[0-9]\. 129600 100% 129600 ignore-no-cache ignore-no-store ignore-reload override-expire store-stale
  840. refresh_pattern -i \*.speedtest.*com\.* 0 50% 180 override-expire store-stale negative-ttl=0
  841.  
  842. #default option
  843. refresh_pattern ^ftp: 1440 20% 10080
  844. refresh_pattern ^gopher: 1440 0% 1440
  845. refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
  846. refresh_pattern . 0 20% 4320
  847.  
  848. berbagi refresh pattern
  849.  
  850. refresh pattern adalah salah satu fitur di squid yang bisa kita gunakan untuk memaksa sebuah content tetap dianggap HIT dalam kurun waktu tertentu, kalo salah mohon diluruskan
  851.  
  852. ane cuman mau berbagi sesama ini juga bukan murni buatan saya tp hasil modif sana-sini dan saya anggap sangat ringan dalam memaksa content tetap dianggap HIT (fresh)
  853.  
  854. Spek mesin ane PIII RAM 512 MB
  855. oh ya menurut saya semakin tinggi dan banyak kriteria refresh pattern ini maka harus setara dengan hardware makanya jangan langsung di copas punya nya om2 disini klo spek pc na jauh berbeda, ntar malah makin lelet....
  856.  
  857. CMIIW
  858.  
  859. Zchellpy
  860.  
  861. Code:
  862.  
  863. # 1 week = 10080 mins, 1 month = 43200 mins, 3 months = 129600 mins
  864.  
  865. # pictures & images
  866. refresh_pattern -i \.(gif|png|jpeg|jpg|bmp|tif|tiff|ico)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth ignore-private
  867. refresh_pattern -i \.(xml|html|htm|js|txt|css|php)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth
  868.  
  869. #sound, video & multimedia
  870. refresh_pattern -i \.(flv|x-flv|mov|avi|qt|mpg|mpeg|swf)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache
  871. refresh_pattern -i \.(wav|mp3|mp4|au|mid)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth ignore-private
  872.  
  873. # files
  874. refresh_pattern -i \.(iso|deb|rpm|zip|tar|tgz|ram|rar|bin|ppt|doc)$ 10080 90% 43200 ignore-no-cache ignore-auth
  875. refresh_pattern -i \.(zip|gz|arj|lha|lzh)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth
  876. refresh_pattern -i \.(rar|tgz|tar|exe|bin)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth
  877. refresh_pattern -i \.(hqx|pdf|rtf|doc|swf)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth
  878. refresh_pattern -i \.(inc|cab|ad|txt|dll)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth
  879.  
  880. # dynamic content
  881. refresh_pattern ^http://(.*?)/get_video\? 10080 90% 999999 override-expire ignore-no-cache ignore-private
  882. refresh_pattern ^http://(.*?)/videoplayback\? 10080 90% 999999 override-expire ignore-no-cache ignore-private
  883. refresh_pattern -i (get_video\?|videoplayback\?id|videoplayback.*id) 161280 50000% 525948 override-expire ignore-reload
  884.  
  885. # -- refresh pattern for specific sites -- #
  886. refresh_pattern ^http://*.jobstreet.com.*/.* 720 100% 10080 override-expire override-lastmod ignore-no-cache
  887. refresh_pattern ^http://*.indowebster.com.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth
  888. refresh_pattern ^http://*.21cineplex.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth
  889. refresh_pattern ^http://*.kompas.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  890. refresh_pattern ^http://*.theinquirer.*/.* 720 100% 10080 override-expire ignore-no-cache ignore-auth
  891. refresh_pattern ^http://*.blogspot.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  892. refresh_pattern ^http://*.wordpress.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache
  893. refresh_pattern ^http://*.photobucket.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  894. refresh_pattern ^http://*.tinypic.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  895. refresh_pattern ^http://*.imageshack.us/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  896. refresh_pattern ^http://*.kaskus.*/.* 720 100% 28800 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  897. refresh_pattern ^http://www.kaskus.com/.* 720 100% 28800 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  898. refresh_pattern ^http://*.detik.*/.* 720 50% 2880 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  899. refresh_pattern ^http://*.detiknews.*/*.* 720 50% 2880 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  900. refresh_pattern ^http://video.liputan6.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  901. refresh_pattern ^http://static.liputan6.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  902. refresh_pattern ^http://*.friendster.com/.* 720 100% 10080 override-expire override-lastmod ignore-no-cache ignore-auth
  903. refresh_pattern ^http://*.facebook.com/.* 720 100% 10080 ignore-reload override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  904. refresh_pattern ^http://*.apps.facebook.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  905. refresh_pattern ^http://*.fbcdn.net/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  906. #refresh_pattern ^http://creative.ak.fbcdn.net/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  907. #refresh_pattern ^http://facebook.poker.zynga.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  908. #refresh_pattern ^http://facebook2.poker.zynga.com/.* 720 100% 10080 override-expire ignore-reload reload-into-ims ignore-no-cache ignore-no-store ignore-must-revalidate store-stale
  909. refresh_pattern ^http://*.texas_holdem.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  910. refresh_pattern ^http://static-facebook.farmville.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  911. refresh_pattern ^http://static.farmville.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  912.  
  913. refresh_pattern ^http:\/\/\videoxl\.l[0-9]\.facebook.com\/.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  914. refresh_pattern ^http:\/\/\*.channel\.facebook\.com\/.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  915. refresh_pattern ^http:\/\/video\.ak\.facebook.com*\/.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  916. refresh_pattern ^http:\/\/photos-[a-z]\.ak\.fbcdn\.net\/.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  917. refresh_pattern ^http:\/\/profile\.ak\.fbcdn.net*\/.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  918. refresh_pattern ^http:\/\/static\.ak\.fbcdn.net*\/.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  919. refresh_pattern ^http:\/\/creative\.ak\.fbcdn.net*\/.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  920. refresh_pattern ^http:\/\/facebook\.poker\.zynga.com\.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  921. refresh_pattern ^http:\/\/\statics\.poker\.static\.zynga\.com\.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  922. refresh_pattern ^http:\/\/\*.crowdstar.com*\.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth ignore-must-revalidate store-stale
  923. refresh_pattern ^http://static.playspoon.com/.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  924. refresh_pattern ^http://cooking.game.playspoon.com/.* 720 90% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  925. refresh_pattern -i http://[^a-z\.]*onemanga\.com/? 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  926. refresh_pattern ^http://media?.onemanga.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  927. refresh_pattern ^http://*.yahoo.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  928. refresh_pattern ^http://*.google.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  929. refresh_pattern ^http://*.forummikrotik.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  930. refresh_pattern ^http://*.linux.or.id/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  931. refresh_pattern ^http://*.l.yimg\.com.*\.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  932. refresh_pattern ^http://*.yahoofs.com\.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
  933. refresh_pattern ^http://v\.okezone\.com/get_video\/([a-zA-Z0-9]) 129600 100% 129600 ignore-no-cache ignore-no-store reload-into-ims override-expire ignore-must-revalidate store-stale
  934. refresh_pattern \.(ico|video-stats) 129600 100% 129600 override-expire ignore-reload ignore-no-cache ignore-no-store ignore-private ignore-auth override-lastmod ignore-must-revalidate negative-ttl=10080 store-stale
  935. refresh_pattern \.etology\? 129600 100% 129600 override-expire ignore-reload ignore-no-cache store-stale
  936. refresh_pattern galleries\.video(\?|sz) 129600 100% 129600 override-expire ignore-reload ignore-no-cache store-stale
  937. refresh_pattern \.adtology\? 129600 100% 129600 override-expire ignore-reload ignore-no-cache store-stale
  938. refresh_pattern ^.*safebrowsing.*google 43200 50% 129600 override-expire ignore-reload ignore-no-cache ignore-no-store ignore-private ignore-auth ignore-must-revalidate negative-ttl=10080 store-stale
  939. refresh_pattern ^http://((cbk|mt|khm|mlt)[0-9]?)\.google\.co(m|\.id) 43200 50% 129600 override-expire ignore-reload store-stale ignore-private negative-ttl=10080
  940. refresh_pattern ^http://*.ytimg\.com.*\.* 43200 50% 129600 override-expire ignore-reload store-stale
  941. refresh_pattern kaspersky.*\.(avc|xml|dif|klz|kdc)$ 43200 100% 43200 ignore-reload store-stale
  942. refresh_pattern kaspersky 1440 50% 43200 ignore-no-cache store-stale
  943. refresh_pattern vid\.akm\.dailymotion\.com.*\.on2\? 129600 100% 129600 ignore-no-cache override-expire override-lastmod store-stale
  944. refresh_pattern ^http:\/\/images|pics|thumbs[0-9]\. 129600 100% 129600 ignore-no-cache ignore-no-store ignore-reload override-expire store-stale
  945. refresh_pattern -i \*.speedtest.*com\.* 0 50% 180 override-expire store-stale negative-ttl=0
  946.  
  947. #default option
  948. refresh_pattern ^ftp: 1440 20% 10080
  949. refresh_pattern ^gopher: 1440 0% 1440
  950. refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
  951. refresh_pattern . 0 20% 4320
Add Comment
Please, Sign In to add comment