Code in this video: How to Install and Configure Squid Proxy Server on Ubuntu

Code in this video: How to Install and Configure Squid Proxy Server on Ubuntu

# Website: totatca.com
#
### Configure Hostname
#
visible_hostname server-1
#
### My Local Network
### Create an ACL called mynet
acl mynet src 192.168.1.0/24
#
###
#
acl SSL_ports port 443
acl Safe_ports port 80		# http
acl Safe_ports port 21		# ftp
acl Safe_ports port 443		# https
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 777		# multiling http
#
###
#
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
#
### Allow Local Network
http_access allow mynet
http_access allow localhost manager
http_access deny manager
include /etc/squid/conf.d/*.conf
http_access allow localhost
http_access deny all
#
### Default port 3128, you can change if you want.
http_port 3128
#
### Cache MEM =1/3 Physical RAM
cache_mem 512 MB
#
### Cache DIR
### Syntax : cache_dir ufs PATH L0 L1 L2
### L0 = 'Mbytes' is the amount of disk space (MB) to use under this directory.  
### The default is 100 MB.  Change this to suit your configuration.
### L1 is the number of first-level subdirectories which will be created under the 'Directory'. 
### The default is 16.
### 'L2' is the number of second-level subdirectories which will be created under each first-level directory.
### The default is 256.
cache_dir ufs /var/spool/squid 2048 16 256
#
### coredump_dir
### By default Squid leaves core files in the directory from where it was started. 
### If you set 'coredump_dir' to a directory that exists, Squid will chdir() to that directory at startup and coredump files will be left there.
coredump_dir /var/spool/squid
#
### Default
refresh_pattern ^ftp:		1440	20%	10080
refresh_pattern ^gopher:	1440	0%	1440
refresh_pattern -i (/cgi-bin/|\?) 0	0%	0
refresh_pattern \/(Packages|Sources)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
refresh_pattern \/Release(|\.gpg)$ 0 0% 0 refresh-ims
refresh_pattern \/InRelease$ 0 0% 0 refresh-ims
refresh_pattern \/(Translation-.*)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
refresh_pattern .		0	20%	4320

Leave a Reply

Your email address will not be published. Required fields are marked *