본문 바로가기
Linux

How to Install Squid 3 on Ubuntu

by 올엠 2020. 12. 29.
반응형

Today, I publish to how to install proxy server. Proxy server help to us for make fast network.

It’s use to Ubuntu Server and Squid version 3. You just follow below step.

1. Ubutu Server Install

http://www.ubuntu.com/download/server
-When installing server include SSH.

2. Proxy Install

$sudo apt-get install squid3
$Backup to Configration
$sudo cp /etc/squid3/squid.conf /etc/squid3/squid.conf.back
$sudo chmod a-w /etc/squid3/squid.conf.back

 

Default Configuration

acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
# Define use infra network
acl intra src 10.0.0.0/8
 
# Define deny network
acl blackdomain dtsdomain "etc/squid3/blackdomain.txt"
 
# Add used port(Webmin)
acl SSL_ports port 443
acl SSL_ports port 10000 # Webmin
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
acl Safe_ports port 10000 # Webmin
acl CONNECT method CONNECT
# Add allow port (cachemanager local access)
http_access allow manager localhost
 
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
# Deny policy
http_access deny blackdomain
 
# Allow policy
http_access allow intra
blackdomain.txt context

# Deny naver
.naver.com

ACL example site http://workaround.org/squid-acls

3. Web Content Filtering (using Dansguardian)

$sudo apt-get install dansguardian

Dansguardian configuration

$sudo vi /etc/dansguardian/dansguardian.conf
NCONFIGURED – Delete this line, then service restart

Service restart

$sudo /etc/init.d/dansguardian restart

4. Install Vaccine for virus detect in proxy

sudo apt-get install clamav-deamon clamavfreshclam

5. Install Webmin for management

add to update path

sudo vi /etc/apt/source.list
deb http://download.webmin.com/download/repository sarge contrib deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

Download Key file

$sudo wget http://www.webmin.com/jcameron-key.asc

Apply Key file

$sudo apt-key add jcameron-key.asc

Installer update

$sudo apt-get update

Install

$sudo apt-get insall webmin

6. Open Webmin

https://ip-address:10000

반응형