wrodrigomt
(usa Debian)
Enviado em 17/04/2012 - 09:23h
TENTEI CRIAR A ACL hotmail
Pessoal preciso muito de um help pois ja tentei varias coisa e ja estou ficando perdido dentre elas e gostaria muito de uma ajuda.
estou postando minha squid.conf completa e minhas iptables por favor se alguem puder verificar pra mim o que esta errado porque minha cabeca esta pra rolar aqui se eu nao bloquear esses malditos msn´s via https...>>>>
# ABAIXO E MINHA SQUID.CONF
http_port 3128 transparent
########## Configurações Cache ##########
cache_mem 32 MB
maximum_object_size 70 MB
minimum_object_size 0 KB
#maximum_object_size_in_memory 2 KB
cache_swap_low 70
cache_swap_high 90
ipcache_size 1024
ipcache_low 70
ipcache_high 90
fqdncache_size 1024
cache_replacement_policy lru
memory_replacement_policy lru
cache_dir ufs /var/spool/squid 4000 16 256
debug_options all,1
log_fqdn off
#ftp_user neoserver
#ftp_passive on
cache_mgr root@localhost
logfile_rotate 0
snmp_port 0
visible_hostname transmino
hosts_file /etc/hosts
dns_nameservers 8.8.8.8
dns_nameservers 8.8.4.4
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 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 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 901 # swat
acl Safe_ports port 1025-65535 # portas altas
acl purge method PURGE
acl CONNECT method CONNECT
#gravar relatorio
cache_access_log /var/log/squid/access.log
#liberar hotmail
acl hotmail url_regex -i "/etc/squid/regras/hotmail.txt"
acl ip_liberados src "/etc/squid/regras/ip_liberados"
#acl sites_liberados dstdomain "/etc/squid/regras/sites_liberados"
acl sites_proibidos dstdomain "/etc/squid/regras/sites_proibidos"
acl palavras_proibidas url_regex -i "/etc/squid/regras/palavras_bloqueadas"
acl Negar_MSN dstdomain "/etc/squid/regras/msn.txt"
acl Negar_MSN2 url_regex "/etc/squid/regras/msn2.txt"
acl ip_bloqueados src "/etc/squid/regras/ips_bloqueados"
#bloquear msn
#acl MSN dstdomain loginnet.passport.com
#http_access deny MSN
acl msnmessenger url_regex -i gateway.dll
acl msn req_mime_type -i ^application/x-msn-messenger$
http_access deny msnmessenger
http_access deny msn
acl webmsn dstdomain webmessenger.msn.com
http_access deny webmsn
#liberar hotmail
http_access allow hotmail
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow ip_liberados
#http_access allow sites_liberados
http_access deny sites_proibidos
http_access deny palavras_proibidas
http_access allow ip_bloqueados
http_access deny Negar_MSN
http_access deny Negar_MSN2
acl redelocal src 10.1.1.0/24
http_access allow localhost
http_access allow redelocal
http_access deny all
# ESTE E SAO MINHAS IPTABLES
# Generated by iptables-save v1.4.2 on Wed Apr 11 20:33:17 2012
*filter
:INPUT ACCEPT [182123:120937318]
:FORWARD ACCEPT [101335:52235585]
:OUTPUT ACCEPT [195491:131126965]
-A INPUT -i eth1 -p udp -m udp --dport 67 -j ACCEPT
-A INPUT -i eth1 -p tcp -m tcp --dport 67 -j ACCEPT
-A INPUT -i eth1 -p udp -m udp --dport 53 -j ACCEPT
-A INPUT -i eth1 -p tcp -m tcp --dport 53 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 8 -m limit --limit 1/sec -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 8 -j DROP
-A INPUT -m state --state INVALID -j DROP
-A FORWARD -d 10.1.1.70 -p tcp --dport 80 -j ACCEPT
#MSN liberando maq
#-A FORWARD -s 10.1.1.141/24 -p tcp --dport 1863 -j ACCEPT
#-A FORWARD -s 10.1.1.141/24 -d loginnet.passport.com -j ACCEPT
-A FORWARD -s 10.1.1.141/24 -p tcp --dport 1863 -j ACCEPT
-A FORWARD -s 10.1.1.141/24 -p udp --dport 1863 -j ACCEPT
#-A FORWARD -s 192.168.0.3/32 -p tcp --dport 1863 -j ACCEPT
#-A FORWARD -s 192.168.0.3/32 -d loginnet.passport.com -j ACCEPT
#-A FORWARD -s 192.168.0.107/24 -d loginnet.passport.com -j ACCEPT
#-A FORWARD -s 192.168.0.3/32 -p tcp --dport 1863 -j ACCEPT
#-A FORWARD -s 192.168.0.3/32 -d loginnet.passport.com -j ACCEPT
#-A FORWARD -s 192.168.0.4/32 -p tcp --dport 1863 -j ACCEPT
#-A FORWARD -s 192.168.0.4/32 -d loginnet.passport.com -j ACCEPT
#MSN bloqueando
-A FORWARD -s 10.1.1.0/24 -p tcp --dport 1863 -j REJECT
-A FORWARD -s 10.1.1.0/24 -d loginnet.passport.com -j REJECT
-A FORWARD -s 10.1.1.0/24 -d webmessenger.msn.com -j REJECT
#TODOS MSN BLOQUEADOS
-A FORWARD -s 10.1.1.0/24 -p tcp --dport 1863 -j REJECT
-A FORWARD -s 10.1.1.0/24 -p udp --dport 1863 -j REJECT
#SEFAZ
-A FORWARD -s 10.1.1.230 -d 187.6.86.0/24 -p tcp -m tcp --dport 80 -j ACCEPT
-A FORWARD -s 10.1.1.70 -d 187.6.86.0/24 -p tcp -m tcp --dport 80 -j ACCEPT
-A FORWARD -s 10.1.1.0/24 -d 200.201.0.0/24 -p tcp -m tcp --dport 80 -j ACCEPT
-A FORWARD -s 10.1.1.0/24 -p tcp -m tcp --dport 1863 -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -s 10.1.1.0/24 -d 64.4.12.76/32 -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -s 10.1.1.0/24 -d 64.4.12.97/32 -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -s 10.1.1.0/24 -d 65.55.64.254/32 -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -s 10.1.1.0/24 -d 65.55.60.123/32 -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -p tcp -m tcp --dport 1080 -j DROP
-A FORWARD -s 10.1.1.0/24 -p tcp -m tcp --dport 1080 -j REJECT --reject-with icmp-port-unreachable
COMMIT
# Completed on Wed Apr 11 20:33:17 2012
# Generated by iptables-save v1.4.2 on Wed Apr 11 20:33:17 2012
*nat
:PREROUTING ACCEPT [16835:3537350]
:POSTROUTING ACCEPT [32:4235]
:OUTPUT ACCEPT [7304:512901]
-A PREROUTING -s 10.1.1.70 -p tcp -m tcp --dport 80 -j ACCEPT
-A PREROUTING -s 10.1.1.70 -p udp -m udp --dport 80 -j ACCEPT
#-A PREROUTING -i eth1 -s 10.1.1.230 -p tcp --dport 80 -j ACCEPT
-A PREROUTING -s 10.1.1.0/24 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
#redirecionamento atual
#-A PREROUTING -i eth0 -p tcp -m tcp --dport 3389 -j DNAT --to-destination 10.1.1.106
#-A PREROUTING -i eth0 -p tcp -m tcp --dport 3389 -j DNAT --to-destination 10.1.1.102:3390
-A PREROUTING -i eth0 -p tcp --dport 1715 -j DNAT --to 10.1.1.106:3389
-A PREROUTING -i eth0 -p tcp --dport 1716 -j DNAT --to 10.1.1.102:3389
-A PREROUTING -i eth0 -p tcp --dport 1717 -j DNAT --to 10.1.1.70:3389
#-A PREROUTING -s 10.1.1.230/32 -j ACCEPT
-A PREROUTING -s 10.1.1.102/32 -j ACCEPT
-A PREROUTING -s 10.1.1.70/32 -j ACCEPT
-A PREROUTING -i eth0 -p tcp -m tcp --dport 90 -j DNAT --to-destination 10.1.1.108
-A PREROUTING -i eth0 -p tcp -m tcp --dport 37777 -j DNAT --to-destination 10.1.1.108
-A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
#-A POSTROUTING -s 10.1.1.230 -o eth0 -j MASQUERADE
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Wed Apr 11 20:33:17 2012