bestmoor
(usa Debian)
Enviado em 24/08/2010 - 20:08h
squid + iptables nao consigo liberar msn
ola Amigos
estou com um problema um tanto diferente coloquei um iptables e squid em uma rede Windows com Active Diretory
esta autenticando no Servidor Windows tudo ok
bloqueios do sites ok
bancos ok.
unico problema algumas maquinas tenho que liberar o MSN e por incrivel que parace ele somente conecta alguns usuarios do msn
SERA que alguem tem uma luz
segue squid.conf
firewall tambem
http_port 3128
hierarchy_stoplist cgi-bin ?
cache_mem 80 MB
maximum_object_size_in_memory 10 MB
maximum_object_size 10 MB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 95
cache_access_log /var/log/squid3/access.log
cache_log /var/log/squid3/cache.log
cache_store_log /var/log/squid3/store.log
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern (cgi-bin|\?) 0 0% 0
refresh_pattern . 0 20% 4320
icp_port 3130
icon_directory /usr/share/squid3/icons
error_directory /usr/share/squid3/errors/Portuguese
coredump_dir /var/spool/squid3
############ autenticaçao no windows server 2003 ###############
auth_param basic program /usr/lib/squid3/squid_ldap_auth -R -b "dc=dominio,dc=local,dc=dns" -D "cn=proxy_,ou=Internet,dc=gns,dc=local,dc=dns" -w "senha" -f sAMAccountName=%s -h 192.168.1.1
#autenticao msnt_auth
#auth_param basic program /usr/lib/squid3/msnt_auth
auth_param basic children 5
auth_param basic realm Digite sua senha (Mesma senha que utiliza para entrar no computador)
auth_param basic credentialsttl 2 hour
auth_param basic casesensitive off
acl users proxy_auth "/etc/squid3/listas/usuarios_liberados"
acl users_down proxy_auth "/etc/squid3/bloqueados/liberado_download"
acl autenticados proxy_auth REQUIRED
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl rede_interna src 192.168.1.0/255.255.255.0
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
acl listabranca url_regex "/etc/squid3/listas/listabranca"
acl listanegra url_regex "/etc/squid3/listas/listanegra"
acl download_neg url_regex "/etc/squid3/listas/download_neg"
acl transparente url_regex "/etc/squid3/listas/transparente"
acl urls_msn url_regex "/etc/squid3/listas/urls_msn"
acl libera_webmail url_regex "/etc/squid3/listas/libera_webmail"
acl msn_libera url_regex "/etc/squid3/listas/usuarios_msn"
# politica de acesso
http_access allow users
http_access deny listanegra
http_access deny download_neg !users_down
http_access deny urls_msn !msn_libera
http_access allow autenticados
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow rede_interna
icp_access deny all
htcp_access deny all
*********firewall*****************
iptables -F
iptables -t nat -F
modprobe iptable_nat
iptables -A FORWARD -s 192.168.1.0/24 -p tcp -d
www.bradesco.com.br --dport 80 -j ACCEPT
#iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A INPUT -p tcp -j LOG
#liberar msn
#iptables -A FORWARD -p tcp --dport 1863 -j ACCEPT
#iptables -I FORWARD -s 192.168.1.0/255.255.255.0 -p tcp --dport 1863 -j ACCEPT
#iptables -I FORWARD -s 192.168.1.0/255.255.255.0 -d loginnet.password.com -j ACCEPT
#iptables -I FORWARD -s 192.168.1.0/255.255.255.0 -d hotmail.com -j ACCEPT
#iptables -I FORWARD -s 192.168.1.0/255.255.255.0 -d hotmail.com.br -j ACCEPT
iptables -A FORWARD -i eth0 -p tcp --dport 1863 -j ACCEPT
iptables -A FORWARD -i eth0 -d loginnet.passport.com -j ACCEPT
iptables -A FORWARD -i eth0 -d 64.4.13.0/24 -j ACCEPT
iptables -A FORWARD -i eth0 -d login.live.com -j ACCEPT
iptables -A FORWARD -i eth0 -d login.passport.com -j ACCEPT
iptables -A FORWARD -i eth0 -d gateway.messenger.hotmail.com -j ACCEPT
iptables -A FORWARD -d 192.168.1.1 -j ACCEPT -p tcp --dport 3388
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 3388 -j DNAT --to 192.168.1.1:3389