edinaldo_98
(usa CentOS)
Enviado em 07/01/2014 - 13:16h
Meu squid.conf vai abaixo, o Iptables eu não tenho.
#
http_port 3128
#
#################################################################
cache_mem 128 MB
maximum_object_size_in_memory 64 KB
maximum_object_size 1512 MB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 95
#cache_dir ufs /files/squid 5248 16 256
cache_dir ufs /var/spool/squid 5248 16 256
cache_access_log /var/log/squid/access.log
refresh_pattern ^ftp: 15 20% 2280
refresh_pattern ^gopher: 15 0% 2280
refresh_pattern . 15 20% 2280
##################################################################
#****************************************************************#
# PARAMETROS PARA DEMONSTRARA MENSAGEM NA JANELA DE AUTENTICACAO #
#****************************************************************#
auth_param basic realm ---> Entre com seu Login e Senha <---
auth_param basic children 5
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
#refresh_pattern ^ftp: 1440 20% 10080
#refresh_pattern ^gopher: 1440 0% 1440
#refresh_pattern . 0 20% 4320
#****************************************************************#
#****************************************************************#
# ACCESS CONTROLS #
#****************************************************************#
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
acl redelocal dst 192.168.1.0/24 # Rede Local
#
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 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
#
#
#******************************************************************
# AUTENTICACAO #
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/regras/squid_passwd
acl autenticados proxy_auth REQUIRED
#*****************************************************************#
# ARQUIVO "ADMIN" - DEVEM FICAR OS USUÁRIOS COM ACESSO TOTAL A INTERNET
acl admin proxy_auth "/etc/squid/regras/admin"
# ARQUIVO "USUÁRIOS" - DEVEM FICAR OS USUÁRIOS COM ACESSO APENAS AOS SITES DA LISTA "LIBERADO_USUARIOS"
acl usuarios proxy_auth "/etc/squid/regras/usuarios"
# LISTA DE SITES LIBERADOS PARA OS "USUARIOS"
acl liberado_usuarios url_regex -i "/etc/squid/regras/liberado_usuarios"
# BLOQUEIA TUDO, EXCETO OS SITES DA LISTA "LIBERADO_USUARIOS" PARA OS "USUARIOS"
http_access deny all usuarios !liberado_usuarios
# LISTA DE EXTENSÕES BLOQUEADAS PARA "USUARIOS"
acl bloqueia_extensao url_regex -i "/etc/squid/regras/bloqueia_extensao"
# BLOQUEIA EXTENSÕES PARA OS "USUARIOS"
http_access deny bloqueia_extensao usuarios
# LIBERA ACESSO PARA O GRUPO "ADMIN"
http_access allow admin
# LIBERA ACESSO PARA OS USUÁRIOS AUTENTICADOS
http_access allow autenticados
# BLOQUEIA ACESSO AOS USUÁRIOS NÃO AUTENTICADOS
http_access deny all
#******************************************************************#
#
# Only allow cachemgr access from localhost
http_access allow manager localhost redelocal
http_access deny manager
# 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
# 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
# We recommend you to use at least the following line.
hierarchy_stoplist cgi-bin ?
# Leave coredumps in the first cache dir
#coredump_dir /var/spool/squid
Caso o Iptables que você se refere seja o /etc/sysconfig/iptables, segue abaixa.
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 69 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3128 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT