Squid Cache - Maravento 1 de 24 https://www.maravento.com/2013/07/proxy-cache.html ⚲ ★ ★ ★ Follow Conexión segura f
Views 113 Downloads 0 File size 6MB
Squid Cache - Maravento
1 de 24
https://www.maravento.com/2013/07/proxy-cache.html
⚲
★ ★ ★ Follow
Conexión segura fallida Ha ocurrido un error al conectar con googleads.g.doubleclick.net. SSL ha recibido un registro que excedía la longitud máxima permitida. Código de error: SSL_ERROR_RX_RECORD_TOO_LONG La página que está intentando ver no se puede mostrar porque la autenticidad de los datos recibidos no ha podido ser verificada. nano /etc/squid3/squid.conf
cache_dir ufs /var/spool/squid3 100 16 256
cache_dir aufs /var/spool/squid 100000 16 256
25/01/21 04:46p. m.
Squid Cache - Maravento
2 de 24
https://www.maravento.com/2013/07/proxy-cache.html
service squid stop
service squid status
rm -rf cache/
mkdir cache
chown proxy:proxy
cache/
squid -zX
service squid start
service squid3 stop
rm -Rf /var/spool/squid3/*
squid3 -z
service squid3 start
25/01/21 04:46p. m.
Squid Cache - Maravento
3 de 24
https://www.maravento.com/2013/07/proxy-cache.html
cache_mem 512 MB
free -m
/etc/squid3/squid.conf
# maximum_object_size 4096 KB # cache_replacement_policy lru refresh_pattern ^ftp:
1440
20%
10080
refresh_pattern ^gopher: refresh_pattern .
1440 0
0% 20%
1440 4320
# tamaño mínimo y máximo de los objetos que se guardarán en memoria # Ej: 200 Mb (maximum_object_size 20480 KB) minimum_object_size 0 KB maximum_object_size 4 MB # objects are evicted (replaced) when disk space is needed cache_replacement_policy heap LFUDA # refresh_pattern (frecuencia de actualizacion de archivos) ref: maximum_object_size # http://www.alterserv.com/foros/index.php?topic=363.msg2695#msg2695 # Calcule Minutos http://www.convertworld.com/es/tiempo/Minutos.html # Agregue mas Extensiones http://filext.com/ # Nota: override-expire override-lastmod refresh-ims reload-into-ims ignorereload ignore-no-store ignore-private ignore-auth ignore-must-revalidate pueden generar advertencia 'violates HTTP' # Standard de actualización de objetos: Mayor a 43200 min (30d) download. Menor a 14400 min (10d) keep. Fecha de modificacion mayor a 80%, download refresh_pattern -i .(gif|png|jp?g|ico|bmp|pict|tiff?)$ 14400 80% 43200 reload-into-ims ignore-no-store ignore-private ignore-auth refresh-ims refresh_pattern -i .(swf|htm|html|shtm|shtml|nub)$ 14400 80% 43200 reloadinto-ims ignore-no-store ignore-private ignore-auth refresh-ims refresh-ims refresh_pattern -i .(rpm|cab|deb|exe|msi|msu|zip|tar|xz|bz|bz2|lzma|gz|tgz|rar|bin|7z|doc?|xls? |ppt?|pdf|nth|psd|sis)$ 14400 80% 43200 reload-into-ims ignore-no-store ignore-private ignore-auth refresh-ims refresh_pattern -i .(avi|iso|wav|mid|ogg|mp?|mpe?g?|mpeg|aiff?|mov|3gp|wm?|flv|x-flv|axd)$ 14400 80% 43200 reload-into-ims ignore-no-store ignore-private ignore-auth refresh-ims refresh_pattern -i .(qtm?|viv|au|ram?|snd|sit|hqx|arj|lzh|lha|txt|rtf|tex|latex|class|js|ico|do |dll|asf|dat|psf)$ 14400 80% 43200
25/01/21 04:46p. m.
Squid Cache - Maravento
4 de 24
https://www.maravento.com/2013/07/proxy-cache.html
refresh_pattern -i \.a[0-9][0-9]$ 14400 80% 43200 refresh_pattern -i \.r[0-9][0-9]$ 14400 80% 43200 refresh_pattern -i \.css$ 10 20% 4320 # Default refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 refresh_pattern . 0 20% 4320 # Opcional (Antivirus) (descomente la que necesite) #refresh_pattern .avast.com/.*\.(vpu|stamp) 14400 80% 43200 reload-into-ims #refresh_pattern .eset.com/.*\.(exe|rar|nup|ver) 4320 100% 43200 reloadinto-ims #refresh_pattern .avg.com/.*\.(rar|nup|ver) 4320 100% 43200 reload-into-ims #refresh_pattern .pandasecurity.com/.*\.* 4320 100% 43200 reload-into-ims #refresh_pattern .pandasoftware.com/.*\.exe 4320 100% 43200 reload-into-ims #refresh_pattern .*downloads.*\.kaspersky-labs\.com/.*\.(.*) 1440 100% 1440 reload-into-ims
service squid restart o service squid3 restart
nano /etc/apt/apt.conf
# Configuración para utilizar apt Acquire { http { Proxy "http://192.168.1.10:3128"; } }
# Configuración para utilizar apt Acquire { http { Proxy "http://usuario:[email protected]:3128"; } }
#Acquire::http::proxy “false”;
apt-get update
25/01/21 04:46p. m.
Squid Cache - Maravento
5 de 24
https://www.maravento.com/2013/07/proxy-cache.html
apt-get install squid3-cgi squid3 squid3-common squid3-client nano /etc/squid3/squid.conf
acl manager proto cache_object # Only allow cachemgr access from localhost http_access allow manager nombre_del_servidor http_access allow manager localhost http_access deny manager
http_port 192.168.1.10:8080 transparent o http_port 192.168.1.10:8080 intercept
#Example: # cachemgr_passwd secret shutdown # cachemgr_passwd lesssssssecret info stats/objects # cachemgr_passwd disable all cachemgr_passwd su_contraseña all
/etc/webmin/squid/config
sort_conf=0 squid_restart=service squid3 restart squidclient=squidclient cache_dir=/var/spool/squid3 sync_create=0 log_dir=/var/log/squid3 pid_file=/var/run/squid3.pid cal_max=50000 squid_start=service squid3 start sync_modify=1 cal_fmt=w cal_all=1 cal_extra= squid_path=squid3 calamaris=calamaris squid_conf=/etc/squid3/squid.conf sync_delete=0 cal_args=-aw cachemgr_path=/usr/lib/cgi-bin/cachemgr.cgi crypt_conf=0 restart_pos=0 squid_stop=service squid3 stop
25/01/21 04:46p. m.
Squid Cache - Maravento
6 de 24
https://www.maravento.com/2013/07/proxy-cache.html
cp /etc/squid/cachemgr.conf /etc/squid3/ nano /etc/squid3/cachemgr.conf
192.168.1.10:8080
service squid3 restart
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Require all granted
service apache2 restart
apt-get purge squid apt-get autoremove rm -rf squid reboot
https://localhost:10000/squid3/cachemgr.cgi
http://localhost/cgi-bin/cachemgr.cgi
# Ej: http://ip_del_servidor:puerto/squid-internal-mgr/info http://192.168.1.10:3128/squid-internal-mgr/info
25/01/21 04:46p. m.
Squid Cache - Maravento
7 de 24
https://www.maravento.com/2013/07/proxy-cache.html
Conexión segura fallida Ha ocurrido un error al conectar con googleads.g.doubleclick.net. SSL ha recibido un registro que excedía la longitud máxima permitida. Código de error: SSL_ERROR_RX_RECORD_TOO_LONG La página que está intentando ver no se puede mostrar porque la autenticidad de los datos recibidos no ha podido ser verificada. Contacte con los propietarios del sitio web para informarles de este problema. Más información…
cache_swap_low 90 cache_swap_high 95
# Liberando Memoria Ram memory_pools off # Cantidad de RAM para almacenamiento Squid memory_pools_limit 512 MB
half_closed_clients off
dns_nameservers 8.8.8.8 8.8.4.4
visible_hostname proxy.lan
cache_effective_user proxy cache_effective_group proxy
acl conexiones maxconn 5 http_access deny conexiones acl limit src "/etc/squid3/acls/limit" acl abuse maxconn 3
25/01/21 04:46p. m.
Squid Cache - Maravento
8 de 24
https://www.maravento.com/2013/07/proxy-cache.html
http_access deny limit abuse
error_directory /usr/share/squid3/errors/es
# reemplazar hierarchy_stoplist cgi-bin ? # por hierarchy_stoplist cgi-bin ? hotmail gmail yahoo outlook misitioweb.com
cache_log /var/log/squid3/cache.log # logs access_log daemon:/var/log/squid3/access.log squid access_log stdio:/var/log/squid3/access.log squid cache_access_log stdio:/var/log/squid3/access.log cache_store_log stdio:/var/log/squid3/store.log cache_store_log daemon:/var/log/squid3/store.log # Ver los logs cat /var/log/squid3/cache.log
# Ejemplo squidclient -h 192.168.1.10 -p 3128 mgr:info | grep 'Average HTTP requests'
acl CONNECT method CONNECT 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 acl Safe_ports port 488
# http-mgmt # gss-http
acl Safe_ports port 591 acl Safe_ports port 777
# filemaker # multiling http
acl localhost src 127.0.0.1 # Linea no valida para squid3x acl my_proxy srcdomain .proxy.example.com follow_x_forwarded_for allow localhost follow_x_forwarded_for allow my_proxy acl_uses_indirect_client on delay_pool_uses_indirect_client on
25/01/21 04:46p. m.
Squid Cache - Maravento
9 de 24
https://www.maravento.com/2013/07/proxy-cache.html
log_uses_indirect_client on
Conexión segura fallida Ha ocurrido un error al conectar con googleads.g.doubleclick.net. SSL ha recibido un registro que excedía la longitud máxima permitida. Código de error: SSL_ERROR_RX_RECORD_TOO_LONG La página que está intentando ver no se puede mostrar porque la autenticidad de los datos recibidos no ha podido ser verificada. Contacte con los propietarios del sitio web para informarles de este problema. Más información…
Log personalizado TCP_DENIED/403
# Squid normally listens to port 3128 http_port 192.168.1.10:3128 intercept
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS acl blacklistweb dstdomain -i "/home/servidor/acl/blacklistweb" http_access deny blacklistweb
acl blacklistweb dstdomain -i "/home/servidor/acl/blacklistweb" acl rwords url_regex -i "/home/servidor/acl/rwords" acl extensiones url_regex "/home/servidor/acl/ext" acl archivos-bloqueados rep_mime_type -i "/home/servidor/acl/ext-mime" http_access deny blacklistweb http_access deny rwords
25/01/21 04:46p. m.
Squid Cache - Maravento
10 de 24
https://www.maravento.com/2013/07/proxy-cache.html
http_reply_access deny ext http_access deny ext-mime
#Default: cache_log /var/log/squid3/cache.log
access_log /var/log/squid3/access.log squid
tail -f /var/log/squid3/access.log
416669690.372 108 192.168.1.40 TCP_DENIED/403 417706 GET http://feedproxy.google.com/~r/fan_de_este_puto_sitio/~3/Q5y7jB2v9ZA /leyendo_estupideces_en_internet.html? - NONE/- text/html
#Default: # debug_options ALL,1
#Default: debug_options ALL,9
grep -i checklistmatches /var/log/squid3/cache.log o grep -i feedproxy /var/log/squid3/cache.log
25/01/21 04:46p. m.
Squid Cache - Maravento
11 de 24
https://www.maravento.com/2013/07/proxy-cache.html
#Default: debug_options ALL,1
#Default: debug_options ALL,1 33,2 28,9
#Default: debug_options ALL,2 28,4 82,4
service squid3 restart o squid3 -k reconfigure
squid3 -k parse
grep -i feedproxy /var/log/squid3/cache.log
2014/11/22 10:39:05.872| The request GET http://feedproxy.google.com /favicon.ico is DENIED, because it matched 'rwords
acl DENY_ACCESS http_status 403 access_log /var/log/squid3/deny.log squid DENY_ACCESS
25/01/21 04:46p. m.
Squid Cache - Maravento
12 de 24
https://www.maravento.com/2013/07/proxy-cache.html
debug_options 9,5 20,9 4,2 ALL,1
Cannot open '/var/log/squid3/deny.log' for writing.#012#011The parent directory must be writeable by the#012#011user 'proxy', which is the cache_effective_user#012#011set in squid.conf
chmod 666 /var/log/squid3/deny.log && squid3 -k reconfigure | invoke-rc.d apache2 reload
tail -f /var/log/squid3/access.log | perl -pe 's/[\d\.]+/localtime($&)/e'
WARNING: Netmasks are deprecated. Please use CIDR masks instead WARNING: IPv4 netmasks are particularly nasty when used to compare IPv6 to IPv4 ranges WARNING: For now we will assume you meant to write /32
Page faults with physical i/o
25/01/21 04:46p. m.
Squid Cache - Maravento
13 de 24
https://www.maravento.com/2013/07/proxy-cache.html
# Modifique Pinger chmod 4755 /usr/lib/squid3/pinger /usr/lib/squid3/pinger # Configurar Squid3 nano /etc/squid3/squid.conf # Modifique la linea de pinger a off pinger_program /usr/lib/squid3/pinger pinger_enable off # Reinicie squid service squid3 restart
emulate_httpd_log off
dns_v4_first on
nano /etc/network/interfaces # si recibe el internet por dhcp auto eth0 iface eth0 inet dhcp # psi recibe el internet por ip estática # Reemplace las ips por las de su ISP auto eth0 iface eth0 inet static address 19X.XX.XX.XX gateway 19X.XX.XX.XX netmask 255.255.255.XXX broadcast 19X.XX.XX.XX # salida a la redlocal auto eth1 iface eth1 inet static address 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.255 network 192.168.1.0
/etc/init.d/network restart o service networking restart
25/01/21 04:46p. m.
Squid Cache - Maravento
14 de 24
https://www.maravento.com/2013/07/proxy-cache.html
# reemplace los DNS de google por los de su ISP nano /etc/resolv.conf nameserver 8.8.8.8 nameserver 8.8.4.4
# Instale el servidor DHCP apt-get install isc-dhcp-server # Edite isc-dhcp-server nano /etc/default/isc-dhcp-server # /etc/default/dhcp3-server (para Ubuntu 10x) # Busque la linea INTERFACES y agregue la interface de la red local INTERFACES="eth1"
# nano /etc/dhcp/dhcpd.conf
# If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented. authoritative;
# redlocal (localnet) subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.100 192.168.1.200; # reemplace los dns de google por los de su ISP option domain-name-servers 8.8.8.8, 8.8.4.4; # option domain-name "inf01.server.public"; option routers 192.168.1.10; option broadcast-address 192.168.1.255; default-lease-time 600; max-lease-time 7200; }
service isc-dhcp-server restart
apt-get install squid-cgi squid3 squid3-common squidclient
service squid3 stop
rm -Rf /var/spool/squid3/*
25/01/21 04:46p. m.
Squid Cache - Maravento
15 de 24
https://www.maravento.com/2013/07/proxy-cache.html
squid3 -z
nano /etc/squid3/squid.conf
# WELCOME TO SQUID 3.3.8 # ---------------------------# SQUID.CONF # probar: squid3 -k parse o netstat -pltn | grep 3128 # recarga: squid3 -k reconfigure | invoke-rc.d apache2 force-reload # verificar configuracion: squid – v # asegurese que su servidor tiene ipv6 desactivado http://ipv6-test.com/ # ACCESS CONTROLS # ---------------------------------------------------------------------------# Recommended minimum configuration: # servidor (cambie la ip por la de su servidor proxy) acl servidor src 192.168.1.10/32 http_access allow localhost http_access allow servidor # Redlocal (localnet). Reemplace la información por la de su red local acl localnet src 192.168.1.0/24 # IPv RULES # DNS Ipv4 dns_v4_first on # BLOCK IPv6 acl to_ipv6 dst ipv6 http_access deny to_ipv6 !all # outgoing proxy. (Activela si usa tiene DNS-LOCAL) outgoing_address 192.168.1.10 udp_outgoing_address 192.168.1.10 acl SSL_ports port 443 acl SSL_ports port 5228 acl Safe_ports port 80 acl Safe_ports port 21
# GTalk # http # 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 acl Safe_ports port 488
# http-mgmt # gss-http
acl Safe_ports port 591
# filemaker
acl Safe_ports port 777 # multiling http acl CONNECT method CONNECT # 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 allow servidor manager http_access deny manager #http_access deny to_localhost
25/01/21 04:46p. m.
Squid Cache - Maravento
16 de 24
https://www.maravento.com/2013/07/proxy-cache.html
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENT # Visite blacklistweb.com acl blacklistweb dstdomain -i "/etc/acl/blacklistweb.txt" http_access deny blacklistweb # Access Localnet http_access allow localnet # And finally deny all other access to this proxy http_access deny all # ICP-HTCP-CLR # Allow ICP queries from local networks only icp_access allow localnet icp_access deny all # Allow HTCP queries from local networks only htcp_access allow localnet htcp_access deny all # Ancho de banda reply_body_max_size 2048 MB # NETWORK OPTIONS # ---------------------------------------------------------------------------# Squid Port http_port 192.168.1.10:3128 ignore-cc # PROXYINTERCEPT (Active esta linea si es transparente) #http_port 192.168.1.10:8080 ignore-cc # Qos qos_flows local-hit=0x30 qos_flows parent-hit=0x32 # To prevent error FATAL: Bungled comment this line # qos_flows disable-preserve-miss # Destination IP address matches the Host header domain or IP host_verify_strict on # Verificacion de la cabecera Host # client_dst_passthru on # OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM # ---------------------------------------------------------------------------# CACHEPEER (cambie el puerto 3128 a 8080 si es proxy transparente) cache_peer 192.168.1.10 parent 3128 0 proxy-only no-digest no-delay nonetdb-exchange no-query no-tproxy dead_peer_timeout 2 seconds cache_peer_access 192.168.1.10 allow all # Páginas que contengan ciertos caracteres no se almacenan en la cache. Solicitudes de 'cgi-bin' or '?' van directo al servidor hierarchy_stoplist cgi-bin ? hotmail gmail yahoo outlook # Si la url contiene 'cgi-bin' o '?', no se almacena en la cache # http://gofedora.com/how-to-configure-squid-proxy-server/comment-page-1/ acl QUERY urlpath_regex cgi-bin \? cache deny QUERY # MEMORY CACHE OPTIONS # ---------------------------------------------------------------------------# Cache de memoria # Por cada 256MB en ram son 32MB (buffers, delay_pools, etc). Ejemplo: 8 GB
25/01/21 04:46p. m.
Squid Cache - Maravento
17 de 24
https://www.maravento.com/2013/07/proxy-cache.html
(8192 MB) = 1024 MB # Se recomienda que dedique aprox 5MB de RAM por cada 1GB asignado a cache_dir cache_mem 512 MB # Tamano máximo del tamaño de los objetos en memoria (cámbielo según sus especificaciones) maximum_object_size_in_memory 1024 KB # objects are purged from memory when memory space is needed memory_replacement_policy heap GDSF # DISK CACHE OPTIONS # ---------------------------------------------------------------------------# objects are evicted (replaced) when disk space is needed cache_replacement_policy heap LFUDA # cache de disco (No puede superar el 70% del total del disco menos el espacio ocupado) # Ejemplo: 100 GB asignados para disco de 250 GB cache_dir aufs /var/spool/squid3 100000 16 256 #
TAG: max_open_disk_fds
# no limit # tamaño mínimo y máximo de los objetos que se guardarán en memoria # Ej: 200 Mb (maximum_object_size 20480 KB) minimum_object_size 0 KB maximum_object_size 4 MB # Squid vaciar la caché (1% de 100 GB) cache_swap_low 95 cache_swap_high 99 # LOGFILE OPTIONS # ---------------------------------------------------------------------------# logs access_log daemon:/var/log/squid3/access.log squid access_log stdio:/var/log/squid3/access.log squid cache_access_log stdio:/var/log/squid3/access.log cache_store_log stdio:/var/log/squid3/store.log cache_store_log daemon:/var/log/squid3/store.log # Rotacion manual de log # apt-get install logrotate # squid3 -k rotate logfile_rotate 7 # netdb_filename # netdb_filename stdio:/var/log/squid3/netdb.state # Disable Journal # netdb_filename none # OPTIONS FOR TROUBLESHOOTING # ---------------------------------------------------------------------------# Squid administrative logging file. cache_log /var/log/squid3/cache.log # debug debug_options ALL,1 # Leave coredumps in the first cache dir
25/01/21 04:46p. m.
Squid Cache - Maravento
18 de 24
https://www.maravento.com/2013/07/proxy-cache.html
coredump_dir /var/spool/squid3 # OPTIONS FOR EXTERNAL SUPPORT PROGRAMS # ---------------------------------------------------------------------------# Pinger (chmod 4755 /usr/lib/squid3/pinger) pinger_program /usr/lib/squid3/pinger pinger_enable off # OPTIONS FOR TUNING THE CACHE # ---------------------------------------------------------------------------# refresh_pattern (frecuencia de actualizacion de archivos) ref: maximum_object_size # http://www.alterserv.com/foros/index.php?topic=363.msg2695#msg2695 # Calcule Minutos http://www.convertworld.com/es/tiempo/Minutos.html # Agregue mas Extensiones http://filext.com/ # Nota: override-expire override-lastmod refresh-ims reload-into-ims ignorereload ignore-no-store ignore-private ignore-auth ignore-must-revalidate pueden generar advertencia 'violates HTTP' # Standard de actualización de objetos: Mayor a 43200 min (30d) download. Menor a 14400 min (10d) keep. Fecha de modificacion mayor a 80%, download refresh_pattern -i .(gif|png|jp?g|ico|bmp|pict|tiff?)$ 14400 80% 43200 reload-into-ims ignore-no-store ignore-private ignore-auth refresh-ims refresh_pattern -i .(swf|htm|html|shtm|shtml|nub)$ 14400 80% 43200 reloadinto-ims ignore-no-store ignore-private ignore-auth refresh-ims refresh-ims refresh_pattern -i .(rpm|cab|deb|exe|msi|msu|zip|tar|xz|bz|bz2|lzma|gz|tgz|rar|bin|7z|doc?|xls? |ppt?|pdf|nth|psd|sis)$ 14400 80% 43200 ignore-private ignore-auth refresh-ims
reload-into-ims ignore-no-store
refresh_pattern -i .(avi|iso|wav|mid|ogg|mp?|mpe?g?|mpeg|aiff?|mov|3gp|wm?|flv|x-flv|axd)$ 14400 80% 43200 reload-into-ims ignore-no-store ignore-private ignore-auth refresh-ims refresh_pattern -i .(qtm?|viv|au|ram?|snd|sit|hqx|arj|lzh|lha|txt|rtf|tex|latex|class|js|ico|do |dll|asf|dat|psf)$ 14400 80% 43200 refresh_pattern -i \.a[0-9][0-9]$ 14400 80% 43200 refresh_pattern -i \.r[0-9][0-9]$ 14400 80% 43200 refresh_pattern -i \.css$ 10 20% 4320 # Default refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 refresh_pattern . 0 20% 4320 # Opcional (Antivirus) (descomente la que necesite) #refresh_pattern .avast.com/.*\.(vpu|stamp) 14400 80% 43200 reload-into-ims #refresh_pattern .eset.com/.*\.(exe|rar|nup|ver) 4320 100% 43200 reloadinto-ims #refresh_pattern .avg.com/.*\.(rar|nup|ver) 4320 100% 43200 reload-into-ims #refresh_pattern .pandasecurity.com/.*\.* 4320 100% 43200 reload-into-ims #refresh_pattern .pandasoftware.com/.*\.exe 4320 100% 43200 reload-into-ims #refresh_pattern .*downloads.*\.kaspersky-labs\.com/.*\.(.*) reload-into-ims
1440 100% 1440
# HTTP Options request_header_max_size 256 KB ie_refresh on quick_abort_min 16 KB quick_abort_max 16 KB quick_abort_pct 95 read_ahead_gap 16 KB negative_ttl 0 seconds positive_dns_ttl 6 hours negative_dns_ttl 10 seconds fqdncache_size 16384
25/01/21 04:46p. m.
Squid Cache - Maravento
19 de 24
https://www.maravento.com/2013/07/proxy-cache.html
# Range range_offset_limit -1 minimum_expiry_time 60 seconds # HTTP OPTIONS # ---------------------------------------------------------------------------# Cambiar via a off oculta localnet pero genera violacion via on # TIMEOUTS # ---------------------------------------------------------------------------# Timeouts forward_timeout 4 minutes connect_timeout 1 minute peer_connect_timeout 30 seconds read_timeout 15 minutes write_timeout 15 minutes request_timeout 5 minutes persistent_request_timeout 60 seconds client_lifetime 1 day pconn_timeout 60 seconds shutdown_lifetime 20 seconds pipeline_prefetch off client_idle_pconn_timeout 2 minutes # cerrar las peticiones que se queden a medias cuando cierra la conexión TCP half_closed_clients off # ADMINISTRATIVE PARAMETERS # ---------------------------------------------------------------------------#
TAG: cache_mgr
# Cambielo por su email # Default (webmaster) #cache_mgr [email protected] # proteger el squid3 (cámbielo según sus especificaciones) # http://www.linuceum.com/Server/srvSquidServer.php cache_effective_user proxy cache_effective_group proxy # Hide squid inf httpd_suppress_version_string on # nombre del proxy (reemplacelo por el nombre de su proxy) visible_hostname servidor # DELAY POOL PARAMETERS # ---------------------------------------------------------------------------# Pool # TABLA DE EQUIVALENCIAS #2048 B ==> 16 kb ==> 2KB #4096 B ==> 32 kb ==> 4KB #8192 B ==> 64 kb ==> 8KB #16384 B ==> 128kb ==> 16KB #32768 B ==> 256Kb ==> 32KB #65536 B ==> 512Kb ==> 64KB #131072 B ==> 1 Mb ==> 128KB #196608 B ==> 1.5 Mb ==> 192KB
25/01/21 04:46p. m.
Squid Cache - Maravento
20 de 24
https://www.maravento.com/2013/07/proxy-cache.html
#262144 B ==> 2 Mb ==> 256KB # Active el Delay Pool en dependencia de su localnet y ancho de banda # http://www.alterserv.com/foros/index.php?topic=825.0 #delay_initial_bucket_level 50 #delay_pools 1 #delay_class 1 1 #delay_access 1 allow localnet #delay_parameters 1 -1/-1 -1/-1 #delay_access 1 deny all # PERSISTENT CONNECTION HANDLING # ---------------------------------------------------------------------------# Conexiones persistentes server_persistent_connections off client_persistent_connections off # ICP OPTIONS # ---------------------------------------------------------------------------# Disable ICP (Inter-Cache Protocol) (default icp_port 3130) icp_port 0 # Disable icmp query_icmp off # ERROR PAGE OPTIONS # ---------------------------------------------------------------------------# Paginas de error squid3 (en español) error_directory /usr/share/squid3/errors/es # OPTIONS INFLUENCING REQUEST FORWARDING # ---------------------------------------------------------------------------# DIRECT always_direct allow servidor always_direct allow localnet never_direct allow CONNECT never_direct allow all # DNS OPTIONS # ---------------------------------------------------------------------------# Chequear hostnames # check_hostnames off # hosts_file /etc/hosts # Intervalo de Retransmisión DNS dns_retransmit_interval 5 seconds # Tiempo de espera de consulta DNS. >2 min se asume disponible dns_timeout 30 seconds # DNS publicos. Reemplace por los de su ISP # Si utiliza /etc/resolv.conf para DNS no se recomienda activarla dns_nameservers 8.8.8.8 8.8.4.4 # Si usa DNS-LOCAL (dnsmasq) active esta regla #dns_nameservers 127.0.0.1 192.168.1.10
25/01/21 04:46p. m.
Squid Cache - Maravento
21 de 24
https://www.maravento.com/2013/07/proxy-cache.html
# Numero max peticiones cache DNS # Default ipcache_size 1024 ipcache_size 8192 ipcache_low 90 ipcache_high 95 fqdncache_size 1024 # MISCELLANEOUS # ---------------------------------------------------------------------------# Liberando Memoria Ram memory_pools off # Cantidad de RAM para almacenamiento Squid memory_pools_limit 512 MB # hide internal ip forwarded_for deleted # Acceso a la cache. Si utiliza sqstat debe poner el mismo pass en config.inc.php cache_mgr servidor cachemgr_passwd servidor all # Validar (off) o no validar (on) los objetos de la cache Squid offline_mode on # Rotacion de ips # balance_on_multiple_ip off # Limite de memoria Squid ('cache.log' y 'syslog') high_memory_warning 3072 MB
service squid3 start
squid3 -k reconfigure
squid3 -k reconfigure | invoke-rc.d apache2 reload
service squid3 status squid3 -k parse netstat -pltn | grep 3128
25/01/21 04:46p. m.
Squid Cache - Maravento
22 de 24
https://www.maravento.com/2013/07/proxy-cache.html
Conexión segura fallida Ha ocurrido un error al conectar con googleads.g.doubleclick.net. SSL ha recibido un registro que excedía la longitud máxima permitida. Código de error: SSL_ERROR_RX_RECORD_TOO_LONG La página que está intentando ver no se puede mostrar porque la autenticidad de los datos recibidos no ha podido ser verificada. Contacte con los propietarios del sitio web para informarles de este problema. Más información…
25/01/21 04:46p. m.
Squid Cache - Maravento
23 de 24
https://www.maravento.com/2013/07/proxy-cache.html
MARAVENTO STUDIO
WinExternal, Directx, Adobe Flash Player, Adobe Shockwave Player, Java, …
6 Comentarios Recomendar
blackweb, blackip, lockstring, gateproxy, dextroyer, winexternal, …
Maravento Studio Tweet
Blackweb, Blackip, Blackstring, Gateproxy, Dextroyer, Winexternal, …
Política de privacidad de Disqus
Compartir
string, iptables, netfilter, ultrasurf, anonimizadores, server, linux
Alexis Diaz del Ri… Ordenar por los mejores
Únete a la conversación... Erick • hace 6 años
Amigo Maravento se puede usar Cache Manager en Squid 3.3.8, ya que lo he intentado pero sin resultados, Saludos • Responder • Compartir › Maravento
Moderador
Erick • hace 5 años • edited
Hola erik. Gusto en saludarte Recuerda que a partir de la version 3.2 el enlace cambió. La forma correcta para acceder a las estadísticas de cachemgr es: http://ip_del_servidor:puerto/squid-internal-mgr/info No se recomienda usar localhost o 127.0.0.1 y al puerto 3128 (con otros puertos da problemas) PD: No olvides ponerle contraseña en la directiva del squid3: cachemgr_passwd contraseña all Eliminar las lineas del squid3 # Comente las 3 lineas si tiene problemas en el inicio (para v3.2 o superior) #acl manager proto cache_object #acl localhost src 127.0.0.1/32 #acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 Y el archivo cachemgr.conf debe estar en /etc/squid y en /etc/squid3 y en ambos debe contener la ip_del_proxy:puerto_squid. Si no existe la carpeta /etc/squid debes crearla y meter ese archivo ahí (así trabajes con squid3). El problema radica en algunas dependencias que todavía están compiladas con /etc/squid por defecto. Sarg por ejemplo, crea esta carpeta. Anexo imagen cachemgr de squid 3.3.8
• Responder • Compartir › Patricio • hace 6 años
Muchisimas gracias! La verdad, que lo mejor que encontre sobre squid en español. Nuevamente, muchas gracias! • Responder • Compartir › Maravento
Moderador
Patricio • hace 6 años
gracias a usted por visitarnos. Le recomendamos la segunda entrega: http://www.maravento.com/20... • Responder • Compartir › Alexander • hace 6 años
Les recomiendo utilizar Artica Proxy, esta basado en squid proxy y ademas cuenta con una interfaz grafica para la gestion de reglas y estadisticas, etc. Mas informacion aqui: http://artica-proxy.com/ • Responder • Compartir › Maravento
Moderador
Alexander • hace 6 años
Gracias por tu visita. Muy pronto vamos a sacar una 3ra parte de esta serie sobre Squid y mencionaremos algunos front-end del proxy squid, y entre ellos dedicaremos una parte a artica, que nos parece muy acertada tu sugerencia. • Responder • Compartir ›
25/01/21 04:46p. m.
Squid Cache - Maravento
24 de 24
Contact [email protected] CL0027968 8553 NW 68TH ST, MIAMI, FL 33166-2664, USA Support Disqus: 08:00-18:00 NYC MON-FRI Help Desk for Business: 24/7 NYC
https://www.maravento.com/2013/07/proxy-cache.html
S UB MIT
25/01/21 04:46p. m.