Instalacion y configuracion de Squid proxy en UBUNTU
INSTALACIÓN:
Antes de nada en el terminal pondremos "sudo apt update" y "sudo apt upgrade" para actualizar el sistema.
después ponemos "sudo apt install squid3 -y", ahora ponemos los siguiente comandos "sudo cp /etc/squid/squid.conf /etc/squid/squid.conf.original" y tambien "sudo chmod a-w /etc/squid/squid.conf.original".
CONFIGURACIÓN:
tendremos que editar un archivo, poniendo el comando "sudo gedit /etc/squid/squid.conf" en ese archivo pondremos lo siguiente:
# WELCOME TO SQUID 3.5.27
# ----------------------------
#
# This is the documentation for the Squid configuration file.
# This documentation can also be found online at:
# http://www.squid-cache.org/ Doc/config/
#
# You may wish to look at the Squid home page and wiki for the
# FAQ and other documentation:
# http://www.squid-cache.org/
# http://wiki.squid-cache.org/ SquidFaq
# http://wiki.squid-cache.org/ ConfigExamples
#
#Default:
# ACLs all, manager, localhost, and to_localhost are predefined.
#
#
# Recommended minimum configuration:
#
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
#acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
#acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
#acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
#acl localnet src fc00::/7 # RFC 4193 local private network range
#acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
acl ai1 src 192.168.32.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
acl CONNECT method CONNECT
#Default:
# Deny, unless rules exist in squid.conf.
#
#
# Recommended minimum Access Permission configuration:
#
# Deny requests to certain unsafe ports
http_access deny !Safe_ports
# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports
# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager
# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
#http_access allow localnet
http_access allow localhost
http_access allow ai1
# And finally deny all other access to this proxy
http_access deny all
# Squid normally listens to port 3128
http_port 3128
Una vez configurado el archivo pondremos el siguiente comando "sudo service squid start"
y con el comando "sudo service squid status" vemos el estado del servicio
COMPROBACION:
para comprobarlo desde otro equipo deberemos ir al windows en otro ordenador y en configuracion del proxy del navegador pondremos nuestra ip
CONFIGURACION SQUID PROXY MODO TRANSPARENTE:
para empezar pondremos los siguiente comandos
sudo cat /proc/sys/net/ipv4/ip_forward
sudo echo 1 > /proc/sys/net/ipv4/ip_forward
sudo cat /etc/sysctl.conf
sudo sysctl -w net.ipv4.ip_forward=1
sudo sysctl -a
ahora ponemos
sudo gedit /etc/squid/squid.conf
dentro del archivo donde pone http_port 3128 le añadimos al final transparent
wlp2s0
Comentarios
Publicar un comentario