· 7 years ago · Jul 05, 2018, 10:10 AM
1#==================================$
2# Proxy Server Versi 2.7.Stable3
3# Conf by logic
4#==================================$
5# Port
6http_port 3128 transparent
7icp_port 3130
8prefer_direct off
9# Cache & Object
10cache_mem 12 MB
11cache_swap_low 98
12cache_swap_high 99
13max_filedesc 8192
14maximum_object_size 1048576 KB
15minimum_object_size 0 KB
16maximum_object_size_in_memory 1024 KB
17ipcache_size 6096
18ipcache_low 98
19ipcache_high 99
20fqdncache_size 4096
21cache_replacement_policy heap LFUDA
22memory_replacement_policy heap GDSF
23
24# cache_dir <type> <Directory-Name> <Space in Mbytes> <Level1> <Level2> <options>
25cache_dir aufs /home/cache1 40000 96 256
26
27cache_access_log /var/log/squid/access.log
28cache_log /var/log/squid/cache.log
29cache_store_log none
30pid_filename /var/run/squid.pid
31cache_swap_log /var/log/squid/swap.state
32dns_nameservers /etc/resolv.conf
33
34######situs porno blacklist###########
35emulate_httpd_log off
36hosts_file /etc/hosts
37half_closed_clients off
38negative_ttl 1 minutes
39
40# Rules: Safe Port
41acl all src 0.0.0.0/0.0.0.0
42acl manager proto cache_object
43acl localhost src 127.0.0.1/255.255.255.255
44acl to_localhost dst 127.0.0.0/8
45acl webserver src 192.168.10.253/255.255.255.255
46http_access allow manager webserver
47
48acl SSL_ports port 443 563 873 # https snews rsync
49acl Safe_ports port 80 # http
50acl Safe_ports port 20 21 # ftp
51acl Safe_ports port 70 # gopher
52acl Safe_ports port 210 # wais
53acl Safe_ports port 1025-65535 # unregistered ports
54acl Safe_ports port 631 # cups
55acl Safe_ports port 10000 # webmin
56acl Safe_ports port 901 # SWAT
57acl Safe_ports port 280 # http-mgmt
58acl Safe_ports port 488 # gss-http
59acl Safe_ports port 591 # filemaker
60acl Safe_ports port 777 # multiling http
61acl Safe_ports port 873 # rsync
62acl Safe_ports port 110 # POP3
63acl Safe_ports port 25 # SMTP
64acl Safe_ports port 2095 2096 # webmail from cpanel
65acl Safe_ports port 2082 2083 # cpanel
66acl Safe_ports port 9300-9400 #untuk poker
67acl Safe_ports port 5050 #YM
68
69acl purge method PURGE
70acl CONNECT method CONNECT
71http_access allow manager webserver localhost
72#http_access deny manager
73http_access allow purge localhost
74http_access deny purge
75http_access deny !Safe_ports !SSL_ports
76http_access deny CONNECT !SSL_ports !Safe_ports
77#################################################
78# bw limited access by logic
79#################################################
80
81#################################-----file----#############################
82#acl download url_regex -i ftp .exe .mp3 .vqf .tar.gz .gz .tar .rpm .zip .rar .avi .mpeg .mpe .mpg .qt .ram .rm .iso .raw .wav .mov .msi .mp4 .wmv .flv .3gp .jar .mp4 $
83#acl browsing src 192.168.1.10
84#acl browsing src 192.168.1.11
85#acl browsing src 192.168.1.12
86#acl client-limit src 192.168.1.0/28
87#delay_pools 2
88
89#delay_class 1 1
90#delay_parameters 1 -1/-1
91#delay_access 1 allow browsing
92#delay_access 1 deny all
93
94#delay_class 2 2
95#delay_parameters 2 375000/375000 20576/150000
96#delay_access 2 allow download
97#delay_access 2 allow client-limit
98#delay_access 2 deny all
99
100
101#acl ayodance dst 122.102.49.132/32
102#acl domain_dance dstdomain ayodance.com
103#cache deny ayodance
104#cache deny domain_dance
105#always_direct allow ayodance
106
107#HIERARCHY (BYPASS CGI)
108hierarchy_stoplist cgi-bin ?
109query_icmp on
110acl QUERY urlpath_regex cgi-bin \?
111no_cache deny QUERY
112
113# Refresh Pattern
114refresh_pattern ^ftp: 10080 95% 241920 reload-into-ims override-lastmod
115refresh_pattern . 180 95% 120960 reload-into-ims override-lastmod
116
117#cache_peer 127.0.0.1 parent 8080 0 no-query no-digest no-netdb-exchange default
118server_http11 on
119snmp_port 3401
120acl snmpsquid snmp_community public
121snmp_access allow snmpsquid localhost
122snmp_access deny all
123
124# ALLOWED ACCESS
125acl logic src 192.168.0.0/24 ##
126acl logic src 192.168.1.0/24 ##
127acl logic src 192.168.2.0/24 ##
128acl logic src 192.168.4.0/24 ##
129acl logic src 192.168.5.0/24 ##
130acl logic src 172.16.1.0/24 ##
131acl logic src 172.16.10.0/24 ##
132acl logic src 172.16.20.0/24 ##
133acl logic src 192.168.100.0/24
134
135http_access allow logic
136http_access allow localhost
137http_access deny all
138http_reply_access allow all
139icp_access allow logic
140icp_access allow localhost
141icp_access deny all
142always_direct deny all
143
144# Cache CGI & Administrative
145cache_mgr jardiknas@jardiknas.net
146cachemgr_passwd 12123 all
147visible_hostname jardiknas.net
148cache_effective_user proxy
149cache_effective_group proxy
150coredump_dir /var/spool/squid
151shutdown_lifetime 10 seconds
152logfile_rotate 14
153update_headers on
154request_body_max_size 4096 KB
155
156#mime file
157mime_table /usr/share/squid/mime.conf
158ftp_passive on
159ftp_sanitycheck on
160reload_into_ims on
161vary_ignore_expire on
162icp_hit_stale on
163allow_underscore on
164memory_pools off
165pipeline_prefetch on
166ie_refresh on
167
168quick_abort_min 0
169quick_abort_max 0
170quick_abort_pct 98
171
172zph_mode tos
173zph_local 0x30
174zph_parent 0
175zph_option 136