Squid (squid.conf)
squid.conf limpo, completo e rodando
Categoria: Segurança
Software: Squid
[ Hits: 13.498 ]
Por: André L. Antunes
Nesse aqrquivo de configuração, foram removidos todos os comentários, e ele foi editado de forma que o Squid rode com as configurações mínimas para o bom funcionamento. O fato de eu ter mantido todas as opções comentadas, é para que outros administradores possam ter o squid rodando imediatamente, e conforme seus avanços, as opções já estão no script, basta editar.
# --->>>  Arquivo de configuração do Squid <<<--- #
#------------------------------------------------------------------------------
http_port 3128 transparent
#------------------------------------------------------------------------------
# https_port
# ssl_unclean_shutdown off
# ssl_engine
# sslproxy_client_certificate
# sslproxy_client_key
# sslproxy_options
# sslproxy_cipher
# sslproxy_cafile
# sslproxy_capath
# sslproxy_flags
# sslpassword_program
# icp_port 3130
# htcp_port 0
# mcast_groups
# udp_incoming_address 0.0.0.0
# udp_outgoing_address 255.255.255.255
##############################################################
# OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
##############################################################
# cache_peer
# cache_peer_domain
# neighbor_type_domain
# icp_query_timeout 0
# maximum_icp_query_timeout 2000
# mcast_icp_query_timeout 2000
# dead_peer_timeout 10 seconds
#---------------------------------------------------------------
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
#---------------------------------------------------------------
# cache_vary on
#---------------------------------------------------------------
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
#---------------------------------------------------------------
#####################################################
# OPTIONS WHICH AFFECT THE CACHE SIZE
####################################################
# cache_mem 8 MB
# cache_swap_low 90
# cache_swap_high 95
# maximum_object_size 4096 KB
# minimum_object_size 0 KB
# maximum_object_size_in_memory 8 KB
# ipcache_size 1024
# ipcache_low 90
# ipcache_high 95
# fqdncache_size 1024
# cache_replacement_policy lru
# memory_replacement_policy lru
#########################################################
# LOGFILE PATHNAMES AND CACHE DIRECTORIES
#########################################################
# cache_dir ufs /var/lib/squid/cache 100 16 256
#logformat squid  %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
#logformat squidmime  %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt [%>h] [%<h]
#logformat common %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st %Ss:%Sh
#logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
#---------------------------------------------------------------
access_log /var/lib/squid/logs/access.log squid
#---------------------------------------------------------------
# cache_log /var/lib/squid/logs/cache.log
# cache_store_log /var/lib/squid/logs/store.log
# cache_swap_log
# emulate_httpd_log off
# log_ip_on_direct on
# mime_table /etc/squid/mime.conf
# log_mime_hdrs off
# useragent_log
# referer_log
# pid_filename /var/lib/squid/logs/squid.pid
# debug_options ALL,1
# log_fqdn off
# client_netmask 255.255.255.255
#####################################################
# OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
####################################################
# ftp_user Squid@
# ftp_list_width 32
# ftp_passive on
# ftp_sanitycheck on
# ftp_telnet_protocol on
# check_hostnames on
# allow_underscore on
# cache_dns_program /usr/libexec/dnsserver
# dns_children 5
# dns_retransmit_interval 5 seconds
# dns_timeout 2 minutes
# dns_defnames off
# dns_nameservers 10.0.0.1 192.172.0.4
# hosts_file /etc/hosts
# diskd_program /usr/libexec/diskd-daemon
# unlinkd_program /usr/libexec/unlinkd
# pinger_program /usr/libexec/pinger
# url_rewrite_program
# url_rewrite_children 5
# url_rewrite_concurrency 0
# url_rewrite_host_header on
# url_rewrite_access
# location_rewrite_program
# location_rewrite_children 5
# location_rewrite_concurrency 0
# location_rewrite_access
#auth_param negotiate program <uncomment and complete this line to activate>
#auth_param negotiate children 5
#auth_param negotiate keep_alive on
#auth_param ntlm program <uncomment and complete this line to activate>
#auth_param ntlm children 5
#auth_param ntlm keep_alive on
#auth_param digest program <uncomment and complete this line>
#auth_param digest children 5
#auth_param digest realm Squid proxy-caching web server
#auth_param digest nonce_garbage_interval 5 minutes
#auth_param digest nonce_max_duration 30 minutes
#auth_param digest nonce_max_count 50
#auth_param basic program <uncomment and complete this line>
#auth_param basic children 5
#auth_param basic realm Squid proxy-caching web server
#auth_param basic credentialsttl 2 hours
#auth_param basic casesensitive off
# authenticate_cache_garbage_interval 1 hour
# authenticate_ttl 1 hour
# authenticate_ip_ttl 0 seconds
# external_acl_type
########################################################################
# OPTIONS FOR TUNING THE CACHE
########################################################################
# wais_relay_host
# wais_relay_port 0
# request_header_max_size 20 KB
# request_body_max_size 0 KB
#------------------------------------------------------------------------------
refresh_pattern ^ftp:      1440   20%   10080
refresh_pattern ^gopher:   1440   0%   1440
refresh_pattern .      0   20%   4320
#------------------------------------------------------------------------------
# quick_abort_min 16 KB
# quick_abort_max 16 KB
# quick_abort_pct 95
# read_ahead_gap 16 KB
# negative_ttl 5 minutes
# positive_dns_ttl 6 hours
# negative_dns_ttl 1 minute
# range_offset_limit 0 KB
# collapsed_forwarding off
# refresh_stale_hit 0 seconds
########################################################
# TIMEOUTS
########################################################
# forward_timeout 4 minutes
# connect_timeout 1 minute
# peer_connect_timeout 30 seconds
# read_timeout 15 minutes
# request_timeout 5 minutes
# persistent_request_timeout 1 minute
# client_lifetime 1 day
# half_closed_clients on
# pconn_timeout 120 seconds
# ident_timeout 10 seconds
# shutdown_lifetime 30 seconds
################################################################################
# ACCESS CONTROLS
###############################################################################
#-----------------------------------------------------------------------------------------------------
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 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 777      # multiling http
acl CONNECT method CONNECT
#--------------------------------------------------------------------------------------------------------
# follow_x_forwarded_for deny all
# acl_uses_indirect_client on
# delay_pool_uses_indirect_client on
# log_uses_indirect_client on
#---------------------------------------------------------------------------------------------------------------
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny to_localhost
http_access allow all
# http_access2
#http_reply_access allow all
#icp_access deny all
# htcp_access deny all
# htcp_clr_access deny all
# miss_access allow all
# cache_peer_access
# ident_lookup_access deny all
# tcp_outgoing_tos
# tcp_outgoing_address
# reply_header_max_size 20 KB
# reply_body_max_size 0 allow all
# log_access   allow|deny acl acl...
#################################################
# ADMINISTRATIVE PARAMETERS
#################################################
# cache_mgr webmaster
# mail_from
# mail_program mail
# cache_effective_user nobody
# cache_effective_group
# httpd_suppress_version_string off
# visible_hostname
# unique_hostname
# hostname_aliases
# umask 027
#############################################################################
# OPTIONS FOR THE CACHE REGISTRATION SERVICE
#############################################################################
#announce_period 1 day
# announce_file
# announce_host tracker.ircache.net
# announce_port 3131
#######################################
# HTTPD-ACCELERATOR OPTIONS
######################################
# httpd_accel_no_pmtu_disc off
#################################################################################
# MISCELLANEOUS
#################################################################################
# dns_testnames netscape.com internic.net nlanr.net microsoft.com
# logfile_rotate 10
# append_domain .yourdomain.com
# tcp_recv_bufsize 0 bytes
# error_map
# err_html_text
#  TAG: deny_info
# memory_pools on
# memory_pools_limit 5 MB
# via on
# forwarded_for on
# log_icp_queries on
# icp_hit_stale off
# minimum_direct_hops 4
# minimum_direct_rtt 400
#  TAG: cachemgr_passwd
# store_avg_object_size 13 KB
# store_objects_per_bucket 20
# client_db on
# netdb_low 900
# netdb_high 1000
# netdb_ping_period 5 minutes
# query_icmp off
# test_reachability off
# buffered_logs off
# reload_into_ims off
# always_direct
# never_direct
# header_access
# header_replace
# icon_directory /usr/share/squid/icons
# global_internal_static on
# short_icon_urls off
# error_directory /usr/share/squid/errors/English
# maximum_single_addr_tries 1
# retry_on_error off
# snmp_port 3401
# snmp_access deny all
# snmp_incoming_address 0.0.0.0
# snmp_outgoing_address 255.255.255.255
# as_whois_server whois.ra.net
# as_whois_server whois.ra.net
# wccp2_router
# wccp_router 0.0.0.0
# wccp_version 4
# wccp2_rebuild_wait on
# wccp2_forwarding_method 1
# wccp2_return_method 1
# wccp2_assignment_method 1
# wccp2_service standard 0
# wccp2_service_info
# wccp2_weight 10000
# wccp_address 0.0.0.0
# wccp2_address 0.0.0.0
###############################################################################
# DELAY POOL PARAMETERS (all require DELAY_POOLS compilation option)
###############################################################################
# delay_pools 0
# delay_class
# delay_access
# delay_parameters
# delay_initial_bucket_level 50
# incoming_icp_average 6
# incoming_http_average 4
# incoming_dns_average 4
# min_icp_poll_cnt 8
# min_dns_poll_cnt 8
# min_http_poll_cnt 8
# max_open_disk_fds 0
# offline_mode off
# uri_whitespace strip
# broken_posts
# mcast_miss_addr 255.255.255.255
# mcast_miss_ttl 16
# mcast_miss_port 3135
# mcast_miss_encode_key XXXXXXXXXXXXXXXX
# nonhierarchical_direct on
# prefer_direct off
# strip_query_terms on
# coredump_dir none
#-------------------------------------------------------
coredump_dir /var/lib/squid/cache
#-------------------------------------------------------
# redirector_bypass off
# ignore_unknown_nameservers on
# digest_generation on
# digest_bits_per_entry 5
# digest_rebuild_period 1 hour
# digest_rewrite_period 1 hour
# digest_swapout_chunk_size 4096 bytes
# digest_rebuild_chunk_percentage 10
# chroot
# client_persistent_connections on
# server_persistent_connections on
# persistent_connection_after_error off
# detect_broken_pconn off
# balance_on_multiple_ip on
# pipeline_prefetch off
# extension_methods
# request_entities
# request_entities off
# high_response_time_warning 0
# high_page_fault_warning 0
# high_memory_warning 0
# store_dir_select_algorithm least-load
# forward_log
# ie_refresh off
# vary_ignore_expire off
# sleep_after_fork 0
# minimum_expiry_time 60 seconds
# relaxed_header_parser on
IA Turbina o Desktop Linux enquanto distros renovam forças
Como extrair chaves TOTP 2FA a partir de QRCODE (Google Authenticator)
Linux em 2025: Segurança prática para o usuário
Desktop Linux em alta: novos apps, distros e privacidade marcam o sábado
IA chega ao desktop e impulsiona produtividade no mundo Linux
Atualizando o Fedora 42 para 43
Como saber se o seu e-mail já teve a senha vazada?
Como descobrir se a sua senha já foi vazada na internet?
Instalação dualboot Windows 11 e Debian 13 (0)
Programa fora de escala na tela do pc (33)
Eu queria adicionar a incon do wifi e deixa transparente no fluxbox no... (0)









