Apr 21 2015

Install Proxy Di Freebsd 9.0

Published by under FreeBsd

Langkah Lagkahnya…install Freebsd 9.0 dulu…tutorialnya bisa lihat di youtube buanyak ya…langsung aja proses install proxynya

root@proxy:/var/log # history
1  17:24   ee /etc/ssh/sshd_config
2  17:25   /etc/rc.d/sshd restart
3  17:27   cd /usr/ports/ftp/wget
4  17:28   make install clean
5  17:31   make install clean
6  17:31   make install clean
7  8:26    cd /home/
8  8:26    tar -xzvf squid-2.7.STABLE9.tar.gz
9  8:26    cd squid-2.7.STABLE9
10  8:27    ./configure –prefix=/usr/local/squid –enable-kqueue –enable-dlmalloc –enable-removal-policies=”lru heap” –enable-auth=”basic ntlm digest” –enable-digest-auth-helpers=”password” –enable-async-io –with-pthreads –with-aio –enable-storeio=”ufs diskd null aufs coss” –enable-delay-pools –enable-snmp –disable-icmp –enable-htcp –enable-cache-digests –disable-wccp –enable-useragent-log –enable arp-acl –enable-pf-transparent –enable-ipf-transparent –enable-follow-x-forwarded-for –with-large-files –enable-large-cache-files –enable-default-err-language=English –disable-ident-lookups
22  9:07    make
23  9:14    make install
24  9:14    touch /usr/local/squid/var/logs/cache.log
25  9:15    touch /usr/local/squid/var/logs/access.log
26  9:15    pw group add angga1
27  9:15    chown angga:angga1 /usr/local/squid/var/logs/access.log
28  9:15    chown angga:angga1 /usr/local/squid/var/logs/cache.log
29  9:16    mkdir /usr/coss
30  9:16    touch /usr/coss/coss
31  9:16    chown angga:angga1 /usr/coss/
32  9:19    chown angga:angga1 /usr/coss/coss
33  9:28    /usr/local/squid/sbin/squid -k parse
34  9:28    /usr/local/squid/sbin/squid -z
35  9:28    /usr/local/squid/sbin/squid -sYDF
36  9:29    ps ax
37  9:29    killall sendmail
38  9:30    ps ax
39  9:32    ee /etc/ttys
40  9:32    /usr/local/squid/sbin/squid -sYDF
41  9:32    ps ax
52  9:33    ee /usr/local/squid/etc/squid.conf
53  9:39    /usr/local/squid/sbin/squid -k parse
54  9:41    /usr/local/squid/sbin/squid -sYDF
55  9:41    ps ax
72  9:44    reboot
73  9:46    ps ax
74  9:46    killall sendmail
75  9:46    ps ax
76  9:46    /usr/local/squid/sbin/squid -sYDF
77  9:46    ps ax
88  9:47    tail -f /usr/local/squid/var/logs/access.log
89  9:48    tail -f /usr/local/squid/var/logs/cache.log
90  9:48    ee /usr/local/squid/etc/squid.conf
91  9:52    mkdir /var/log/squid
92  9:52    cd /var/log/
93  9:52    chmod angga:angga1 /var/log/squid/
94  9:55    chown angga:angga1 /var/log/squid/
95  9:55    /usr/local/squid/sbin/squid -sYDF
96  9:55    ps ax
97  9:55    ps ax
115  9:57    tail -f /usr/local/squid/var/logs/access.log
116  8:55    history
root@proxy:/var/log #

Config Proxynya bisa Pake ini…

http_port       3030 transparent
icp_port        3130
forwarded_for off

dns_nameservers 192.168.10.2 203.6.148.2

acl QUERY urlpath_regex cgi-bin \? \.php$ \.asp$ \.shtml$ \.cfm$ \.cfml$ \.phtml$ \.php3$
acl nocache-domain dstdomain .mail.yahoo.com .login.yahoo.com
acl multimedia url_regex -i \.exe$ \.zip$ \.rar$ \.gz$ \.rpm$ \.vqf$ \.dat$ \.ram$  \.raw$ \.bz$ \.DivX$ \.XviD$ \.avi$ \.wmv$ \.mpg$ \.mpeg$ \.mp4$ \.m4v$ \.3gp$ \.asf$ \.rm$ \.rmvb$ \.mov$ \.asx$ \.mkv$ \.
no_cache deny QUERY
no_cache deny nocache-domain
always_direct allow QUERY
always_direct allow nocache-domain

cache_mem       64 MB

cache_swap_low  75
cache_swap_high 90

cache_dir coss /usr/coss/coss 8000 block-size=512 max-size=131072 membufs=72

memory_pools off
half_closed_clients off
debug_options ALL,1

#request_header_max_size        10      KB
request_body_max_size           0       KB
refresh_pattern ^ftp:           1440 20% 10080
refresh_pattern ^gopher:        1440 0% 1440
refresh_pattern -i \.gif$       10080 100% 43200 reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.jpg$       10080 100% 43200 reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.js$        10080 100% 43200 reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.css$       10080 100% 43200 reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.jpeg$      10080 100% 43200 reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.bmp$       10080 100% 43200 reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.txt$       10080 100% 43200 reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.mid$       10080 100% 43200 reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.wav$       10080 100% 43200 reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.ico$       10080 100% 43200 reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.yim$       10080 100% 43200 reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.jar$       10080 100% 43200 reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.ldict$     10080 100% 43200 reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.swf$       10080 100% 43200 reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.class$     10080 100% 43200 reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.cab$       10080 100% 43200 reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.bom\.gov\.au 30    20% 120
refresh_pattern -i \.class$     10080   90% 43200
refresh_pattern -i \.zip$       10080   90% 43200
refresh_pattern -i \.exe$       10080   90% 43200
refresh_pattern -i \.thm$       10080   90% 43200
refresh_pattern -i \.wav$       10080   90% 43200
refresh_pattern -i \.txt$       10080   90% 43200
refresh_pattern -i \.cab$       10080   90% 43200
refresh_pattern -i \.au$        10080   90% 43200
refresh_pattern -i \.mov$       10080   90% 43200
refresh_pattern -i \.xbm$       10080   90% 43200
refresh_pattern -i \.ram$       10080   90% 43200
refresh_pattern -i \.avi$       10080   90% 43200
refresh_pattern -i \.chtml$     480     50% 22160
refresh_pattern -i \.thb$       10080   90% 43200
refresh_pattern -i \.dcr$       10080   90% 43200
refresh_pattern -i \.mpg$       10080   90% 43200
refresh_pattern -i \.pdf$       10080   90% 43200
refresh_pattern -i \.art$       10080   90% 43200
refresh_pattern -i \.swf$       10080   90% 43200
refresh_pattern -i \.mp3$       10080   90% 43200
refresh_pattern -i \.ra$        10080   90% 43200
refresh_pattern -i \.spl$       10080   90% 43200
refresh_pattern -i \.viv$       10080   90% 43200
refresh_pattern -i \.doc$       10080   90% 43200
refresh_pattern -i \.gz$        10080   90% 43200
refresh_pattern -i \.Z$         10080   90% 43200
refresh_pattern -i \.tgz$       10080   90% 43200
refresh_pattern -i \.tar$       10080   90% 43200
refresh_pattern -i \.vrm$       10080   90% 43200
refresh_pattern -i \.vrml$      10080   90% 43200
refresh_pattern -i \.aif$       10080   90% 43200
refresh_pattern -i \.aifc$      10080   90% 43200
refresh_pattern -i \.aiff$      10080   90% 43200
refresh_pattern -i \.arj$       10080   90% 43200
refresh_pattern -i \.c$         10080   90% 43200
refresh_pattern -i \.cpt$       10080   90% 43200
refresh_pattern -i \.dir$       10080   90% 43200
refresh_pattern -i \.dxr$       10080   90% 43200
refresh_pattern -i \.hqx$       10080   90% 43200
refresh_pattern -i \.lha$       10080   90% 43200
refresh_pattern -i \.lzh$       10080   90% 43200
refresh_pattern -i \.midi$      10080   90% 43200
refresh_pattern -i \.movie$     10080   90% 43200
refresh_pattern -i \.mp2$       10080   90% 43200
refresh_pattern -i \.mpe$       10080   90% 43200
refresh_pattern -i \.mpeg$      10080   90% 43200
refresh_pattern -i \.mpga$      10080   90% 43200
refresh_pattern -i \.pl$        10080   90% 43200
refresh_pattern -i \.ppt$       10080   90% 43200
refresh_pattern -i \.ps$        10080   90% 43200
refresh_pattern -i \.qt$        10080   90% 43200
refresh_pattern -i \.qtm$       10080   90% 43200
refresh_pattern -i \.ras$       10080   90% 43200
refresh_pattern -i \.sea$       10080   90% 43200
refresh_pattern -i \.sit$       10080   90% 43200
refresh_pattern -i \.tif$       10080   90% 43200
refresh_pattern -i \.tiff$      10080   90% 43200
refresh_pattern -i \.snd$       10080   90% 43200
refresh_pattern -i \.wrl$       10080   90% 43200
refresh_pattern .       10 100% 10080
quick_abort_min                 16      KB
quick_abort_max                 32      KB
quick_abort_pct                 95
negative_ttl 1 minutes
positive_dns_ttl 6 hours
negative_dns_ttl 1 minute
connect_timeout 60 seconds
request_timeout 1 minutes
persistent_request_timeout 1 minute
read_timeout 15 minutes
client_lifetime 1 day
half_closed_clients off
pconn_timeout 5 minutes
shutdown_lifetime 1 seconds
announce_period                 7       day

memory_pools on
memory_pools_limit 300 MB
maximum_object_size 40 MB
maximum_object_size_in_memory 8 MB
#cache_replacement_policy heap LFUDA
#reply_body_max_size 10000 allow

#reference_age 1 month

acl networkq src 192.168.10.0/255.255.255.192
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 to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl SSL_ports port 2083 2096
acl Safe_ports port 80                # http
acl Safe_ports port 21                # ftp
acl Safe_ports port 443 563           # https, snews
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 631               # cups
acl Safe_ports port 777               # multiling http
acl Safe_ports port 901               # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
acl FTP proto FTP

http_access deny manager
http_access deny !Safe_ports
#http_access deny CONNECT !SSL_ports

# networkq src 202.51.238.160/255.255.255.224

acl dalam dstdom_regex uns.ac.id
acl mikocok dstdom_regex au.download.windowsupdate.com
#acl freshmeat dstdom_regex freshmeat.net
#acl friendster dstdom_regex friendster.com
acl mp3 urlpath_regex \.mp3$
acl exe urlpath_regex \.exe$
acl zip urlpath_regex \.zip$
acl dat urlpath_regex \.dat$
acl avi urlpath_regex \.avi$

#acl snmppublic snmp_community public

#snmp_access allow snmppublic networkq
#snmp_access deny all

#http_access deny mp3
#http_access deny dat
#http_access deny http
#http_access deny avi
#http_access deny exe
#http_access deny zip
http_access deny mikocok

http_access allow manager localhost
http_access allow manager networkq
http_access allow networkq
#http_access allow nss
#http_access allow im2
#http_access allow dvb
#http_access allow dvb2

http_access deny all

icp_access allow all
#icp_access allow networkq im2
icp_access allow networkq

miss_access allow all
miss_access allow networkq

#never_direct allow friendster
#never_direct allow freshmeat
always_direct allow networkq
always_direct allow FTP
#always_direct allow dalam
#never_direct allow noc1
#never_direct allow all
cache_mgr noc

cache_effective_user angga
cache_effective_group angga1

visible_hostname cache-id.portalfe.com

logfile_rotate 1

#cache_access_log /dev/null
cache_access_log /usr/local/squid/var/logs/access.log
#cache_log /dev/null
cache_log /usr/local/squid/var/logs/cache.log
cache_store_log none
cache_swap_log /var/log/squid/%s

#redirect_program /usr/local/squid/bin/jesred
#url_rewrite_program /usr/local/squirm/bin/squirm
#url_rewrite_children 10
#url_rewrite_host_header off

#ident_lookup_access deny all
#client_persistent_connections   on
#server_persistent_connections   on
pipeline_prefetch               on
store_dir_select_algorithm      round-robin

#delay_pools 2
#delay_class 1 2
#delay_parameters 1 48000/48000 16000/16000 4000/4000
#delay_access 1 allow networkq multimedia
#delay_access 1 deny all
#delay_class 2 2
#delay_parameters 2 48000/48000 16000/16000
#delay_access 2 allow networkq
#delay_access 2 deny all

No responses yet