fcmorini
(usa Debian)
Enviado em 09/09/2013 - 11:04h
Galera estou quebrando a cabeça a algumas semanas e não consegui resolver o problema com o skype acessando através do proxy... vou postar aqui as confs e logs para ver se alguem pode me ajudar...
FIREWALL
#!/bin/bash
# DECLARACAO DE VARIAVEIS
IPTABLES="/sbin/iptables"
# LIMPAR TODAS AS REGRAS
$IPTABLES -F
$IPTABLES -X
$IPTABLES -Z
$IPTABLES -F -t nat
$IPTABLES -X -t nat
$IPTABLES -Z -t nat
$IPTABLES -F -t mangle
$IPTABLES -X -t mangle
$IPTABLES -Z -t mangle
# ALTERA POLITICAS PARA DROP
$IPTABLES -P INPUT DROP
$IPTABLES -P FORWARD DROP
$IPTABLES -P OUTPUT ACCEPT
##### REGRAS DE INPUT #####
# LOGAR TODAS AS ENTRADAS
$IPTABLES -A INPUT -j LOG --log-prefix "INPUT: "
# LIBERAR PORTAS
$IPTABLES -A INPUT -p tcp --dport 22 -j ACCEPT
$IPTABLES -A INPUT -p udp --dport 53 -i eth1 -s 10.1.1.0/24 -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport 80 -i eth1 -s 10.1.1.0/24 -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport 3128 -i eth1 -s 10.1.1.0/24 -j ACCEPT
$IPTABLES -A INPUT -i lo -j ACCEPT
$IPTABLES -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
##### REGRAS DE FORWARD #####
# LOGAR CONEXOES QUE PASSAM PELO FIREWALL
$IPTABLES -A FORWARD -j LOG --log-prefix "FORWARD: "
# LIBERAR CONEXOES PARA OUTRAS REDES
IPS="10.1.1.2"
for IP in $IPS; do
$IPTABLES -A FORWARD -s $IP -j ACCEPT
$IPTABLES -A FORWARD -d $IP -j ACCEPT
done
##### REGRAS DE NAT #####
## LOGAR CONEXOES NA TABELA NAT CHAIN PREROUTING
$IPTABLES -t nat -A PREROUTING -j LOG --log-prefix "NAT-PREROUTING: "
# LOGAR CONEXOES NA TABELA NAT CHAIN POSTROUTING
$IPTABLES -t nat -A POSTROUTING -j LOG --log-prefix "NAT-POSTROUTING: "
# PERMITIR PASSAR FORA DO PROXY
for IP in $IPS; do
$IPTABLES -t nat -A PREROUTING -p tcp -m multiport --dport 80,443 -s 10.1.1.1/32 -i eth1 -j ACCEPT
done
# REDIRECIONAR CONEXOES PARA O PROXY
$IPTABLES -t nat -A PREROUTING -p tcp -m multiport --dport 80,443 -i eth1 -s 10.1.1.0/24 -j REDIRECT --to-port 3128
# LIBERAR ACESSO A INTERNET
$IPTABLES -t nat -A POSTROUTING -o eth0 -s 10.1.1.0/24 -j MASQUERADE
SQUID.CONF COM HTTP_ACESS ALLOW LOCALNET
acl all src all
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
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 SSL_ports port 443 # https
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
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 Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
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 localnet
http_access allow localhost
http_access deny all
icp_access allow localnet
icp_access deny all
http_port 3128
hierarchy_stoplist cgi-bin ?
access_log /var/log/squid/access.log squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880
refresh_pattern . 0 20% 4320
acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
upgrade_http0.9 deny shoutcast
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
extension_methods REPORT MERGE MKACTIVITY CHECKOUT
hosts_file /etc/hosts
coredump_dir /var/spool/squid
LOG DE ACESSOS VIA PROXY COM A CONFIGURAÇÃO ALLOW
1378732423.214 1241 10.1.1.1 TCP_MISS/200 7214 CONNECT login.live.com:443 - DIRECT/131.253.61.80 -
1378732424.413 1194 10.1.1.1 TCP_MISS/200 5851 CONNECT login.live.com:443 - DIRECT/131.253.61.100 -
1378732425.636 1165 10.1.1.1 TCP_MISS/200 11439 CONNECT login.live.com:443 - DIRECT/131.253.61.82 -
1378732432.015 6363 10.1.1.1 TCP_MISS/200 22075 CONNECT auth.gfx.ms:443 - DIRECT/23.4.184.70 -
1378732451.950 7332 10.1.1.1 TCP_MISS/200 11743 CONNECT login.live.com:443 - DIRECT/131.253.61.82 -
1378732453.409 1440 10.1.1.1 TCP_MISS/200 9276 CONNECT login.live.com:443 - DIRECT/131.253.61.84 -
1378732464.920 1765 10.1.1.1 TCP_MISS/200 6921 CONNECT 131.253.61.80:443 - DIRECT/131.253.61.80 -
1378732471.614 49889 10.1.1.1 TCP_MISS/200 5226 CONNECT apps.skypeassets.com:443 - DIRECT/23.62.51.240 -
1378732472.226 959 10.1.1.1 TCP_MISS/200 5531 GET
http://api.skype.com/users/live:billmusic/profile/avatar - DIRECT/91.190.218.17 image/jpeg
1378732472.560 1567 10.1.1.1 TCP_MISS/200 1513 CONNECT 149.13.32.15:443 - DIRECT/149.13.32.15 -
1378732472.778 541 10.1.1.1 TCP_MISS/200 3934 GET
http://api.skype.com/users/live:welingtonmuniz/profile/avatar - DIRECT/91.190.218.17 image/jpeg
1378732472.806 19124 10.1.1.1 TCP_MISS/200 8854 CONNECT api.skype.com:443 - DIRECT/91.190.218.17 -
1378732475.170 1582 10.1.1.1 TCP_MISS/200 6937 CONNECT 131.253.61.80:443 - DIRECT/131.253.61.80 -
1378732475.370 1666 10.1.1.1 TCP_MISS/200 6761 CONNECT 131.253.61.80:443 - DIRECT/131.253.61.80 -
1378732476.091 2500 10.1.1.1 TCP_MISS/200 6761 CONNECT 131.253.61.80:443 - DIRECT/131.253.61.80 -
1378732476.487 4870 10.1.1.1 TCP_MISS/302 587 GET
http://ui.skype.com/ui/0/6.5.0.158./pt-BR/upgrade - DIRECT/157.56.109.8 text/html
1378732476.524 5503 10.1.1.1 TCP_CLIENT_REFRESH_MISS/200 414 GET
http://ui.skype.com/ui/0/6.5.0.158./pt-BR/getlatestversion? - DIRECT/157.56.109.8 text/plain
1378732480.140 2138 10.1.1.1 TCP_MISS/200 7620 CONNECT 65.55.142.165:443 - DIRECT/65.55.142.165 -
1378732480.195 1664 10.1.1.1 TCP_MISS/200 5478 CONNECT 157.56.108.82:443 - DIRECT/157.56.108.82 -
1378732480.808 1279 10.1.1.1 TCP_MISS/200 4234 CONNECT 157.55.102.249:443 - DIRECT/157.55.102.249 -
1378732480.872 11090 10.1.1.1 TCP_MISS/200 1514 CONNECT 213.166.51.4:443 - DIRECT/213.166.51.4 -
1378732482.534 1549 10.1.1.1 TCP_MISS/200 1120 CONNECT 212.161.8.36:443 - DIRECT/212.161.8.36 -
1378732482.537 6022 10.1.1.1 TCP_MISS/302 626 GET
http://www.skype.com/go/getskype-full-last - DIRECT/157.56.109.9 text/html
1378732485.702 7261 10.1.1.1 TCP_MISS/200 176716 CONNECT connect.facebook.net:443 - DIRECT/23.196.31.139 -
1378732486.012 2161 10.1.1.1 TCP_MISS/200 4746 CONNECT 157.56.194.23:443 - DIRECT/157.56.194.23 -
1378732488.933 6388 10.1.1.1 TCP_MISS/200 66922 GET
http://download.skype.com/8cb1db0f1525077c8e684e4d8ec63eb0/SkypeSetupFull.exe - DIRECT/72.164.252.83 application/octet-stream
1378732490.584 1946 10.1.1.1 TCP_MISS/200 5994 CONNECT 157.56.194.23:443 - DIRECT/157.56.194.23 -
1378732491.802 18986 10.1.1.1 TCP_MISS/200 6846 CONNECT apps.skype.com:443 - DIRECT/23.62.50.161 -
1378732491.817 6056 10.1.1.1 TCP_MISS/200 101648 CONNECT ajax.aspnetcdn.com:443 - DIRECT/65.54.85.57 -
1378732493.608 1599 10.1.1.1 TCP_MISS/200 1006 CONNECT 212.161.8.36:443 - DIRECT/212.161.8.36 -
1378732495.177 1925 10.1.1.1 TCP_MISS/200 6026 CONNECT 157.56.194.23:443 - DIRECT/157.56.194.23 -
1378732497.643 6026 10.1.1.1 TCP_MISS/200 4899 CONNECT secure.skypeassets.com:443 - DIRECT/23.62.49.195 -
1378732497.942 6136 10.1.1.1 TCP_MISS/200 6060 CONNECT
www.facebook.com:443">
www.facebook.com:443 - DIRECT/31.13.73.49 -
1378732498.140 6448 10.1.1.1 TCP_MISS/200 3577 CONNECT m.hotmail.com:443 - DIRECT/65.54.225.167 -
1378732498.208 265 10.1.1.1 TCP_MISS/200 1312 CONNECT apps.skype.com:443 - DIRECT/23.62.50.161 -
1378732498.278 66 10.1.1.1 TCP_MISS/200 39 CONNECT apps.skype.com:443 - DIRECT/23.62.50.161 -
1378732498.347 67 10.1.1.1 TCP_MISS/200 39 CONNECT apps.skype.com:443 - DIRECT/23.62.50.161 -
1378732498.371 6544 10.1.1.1 TCP_MISS/200 6045 CONNECT c.msn.com:443 - DIRECT/65.52.108.11 -
1378732498.382 238 10.1.1.1 TCP_MISS/200 1312 CONNECT apps.skype.com:443 - DIRECT/23.62.50.161 -
1378732498.598 248 10.1.1.1 TCP_MISS/200 39 CONNECT api.skype.com:443 - DIRECT/91.190.218.17 -
1378732499.166 568 10.1.1.1 TCP_MISS/200 20496 CONNECT secure.skypeassets.com:443 - DIRECT/23.62.49.195 -
1378732505.321 6151 10.1.1.1 TCP_MISS/200 20496 CONNECT secure.skypeassets.com:443 - DIRECT/23.62.49.195 -
1378732505.341 6969 10.1.1.1 TCP_MISS/200 31407 CONNECT s-static.ak.facebook.com:443 - DIRECT/96.16.82.110 -
1378732505.591 248 10.1.1.1 TCP_MISS/200 1383 CONNECT apps.skype.com:443 - DIRECT/23.62.50.161 -
1378732505.592 268 10.1.1.1 TCP_MISS/200 1383 CONNECT apps.skype.com:443 - DIRECT/23.62.50.161 -
1378732505.647 7262 10.1.1.1 TCP_MISS/200 5924 CONNECT aidps.atdmt.com:443 - DIRECT/131.253.40.44 -
1378732506.776 1125 10.1.1.1 TCP_REFRESH_MISS/200 172457 GET
http://connect.facebook.net/en_US/all.js - DIRECT/23.196.31.139 application/x-javascript
1378732506.847 1202 10.1.1.1 TCP_REFRESH_MISS/200 172457 GET
http://connect.facebook.net/en_US/all.js - DIRECT/23.196.31.139 application/x-javascript
1378732521.153 46385 10.1.1.1 TCP_MISS/200 5684 CONNECT 78.141.179.13:443 - DIRECT/78.141.179.13 -
1378732521.154 38022 10.1.1.1 TCP_MISS/200 12628 CONNECT 134.170.19.35:443 - DIRECT/134.170.19.35 -
1378732521.154 23342 10.1.1.1 TCP_MISS/200 4117 CONNECT 157.56.194.23:443 - DIRECT/157.56.194.23 -
1378732521.154 49954 10.1.1.1 TCP_MISS/200 2072 CONNECT 91.190.218.20:443 - DIRECT/91.190.218.20 -
1378732521.154 142 10.1.1.1 TCP_MISS/000 0 CONNECT 212.161.8.36:443 - NONE/- -
1378732521.159 57707 10.1.1.1 TCP_MISS/200 20760 CONNECT 65.55.223.21:443 - DIRECT/65.55.223.21 -
1378732527.954 6490 10.1.1.1 TCP_MISS/200 9138 CONNECT login.live.com:443 - DIRECT/131.253.61.82 -
1378732528.592 7129 10.1.1.1 TCP_MISS/200 9138 CONNECT login.live.com:443 - DIRECT/131.253.61.82 -
1378732529.116 1155 10.1.1.1 TCP_MISS/200 5851 CONNECT login.live.com:443 - DIRECT/131.253.61.100 -
1378732529.804 1204 10.1.1.1 TCP_MISS/200 5827 CONNECT login.live.com:443 - DIRECT/131.253.61.80 -
1378732531.971 2153 10.1.1.1 TCP_MISS/200 11431 CONNECT login.live.com:443 - DIRECT/131.253.61.86 -
1378732537.898 5883 10.1.1.1 TCP_MISS/200 4567 CONNECT auth.gfx.ms:443 - DIRECT/23.4.184.70 -
1378732538.679 759 10.1.1.1 TCP_MISS/200 1108 CONNECT auth.gfx.ms:443 - DIRECT/23.4.184.70 -
SQUID.CONF COM HTTP_ACESS DENY LOCALNET
acl all src all
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
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 SSL_ports port 443 # https
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
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 Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
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
#####Regras para liberar o skype
acl skype url_regex -i "/root/skype_urls.txt"
http_access allow localnet skype
################################
http_access deny localnet
http_access allow localhost
http_access deny all
icp_access allow localnet
icp_access deny all
http_port 3128
hierarchy_stoplist cgi-bin ?
access_log /var/log/squid/access.log squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880
refresh_pattern . 0 20% 4320
acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
upgrade_http0.9 deny shoutcast
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
extension_methods REPORT MERGE MKACTIVITY CHECKOUT
hosts_file /etc/hosts
coredump_dir /var/spool/squid
LOG DE ACESSO VIA PROXY COM A CONFIGURAÇÃO DENY
1378733853.979 6385 10.1.1.1 TCP_MISS/200 11407 CONNECT login.live.com:443 - DIRECT/131.253.61.82 -
1378733889.865 2122 10.1.1.1 TCP_MISS/200 11729 CONNECT login.live.com:443 - DIRECT/131.253.61.102 -
1378733891.318 1430 10.1.1.1 TCP_MISS/200 9268 CONNECT login.live.com:443 - DIRECT/131.253.61.98 -
1378733898.591 6997 10.1.1.1 TCP_MISS/200 6776 CONNECT api.skype.com:443 - DIRECT/91.190.218.17 -
1378733902.940 0 10.1.1.1 TCP_DENIED/403 1492 CONNECT 131.253.61.82:443 - NONE/- text/html
1378733923.987 0 10.1.1.1 TCP_DENIED/403 1492 CONNECT 131.253.61.82:443 - NONE/- text/html
1378733924.984 70966 10.1.1.1 TCP_MISS/200 22052 CONNECT auth.gfx.ms:443 - DIRECT/23.13.168.70 -
1378733945.117 0 10.1.1.1 TCP_DENIED/403 1492 CONNECT 131.253.61.82:443 - NONE/- text/html
1378733960.035 68638 10.1.1.1 TCP_MISS/200 5226 CONNECT apps.skypeassets.com:443 - DIRECT/23.62.51.240 -
1378733960.036 61416 10.1.1.1 TCP_MISS/200 3482 CONNECT api.skype.com:443 - DIRECT/91.190.218.17 -
1378733966.145 0 10.1.1.1 TCP_DENIED/403 1492 CONNECT 131.253.61.82:443 - NONE/- text/html
1378733984.462 81237 10.1.1.1 TCP_MISS/200 2455 CONNECT 65.55.223.21:443 - DIRECT/65.55.223.21 -
ARQUIVO SKYPE_URLS.TXT COM AS URL's DE LIBERAÇÃO
131.253.61.80
131.253.61.82
134.170.19.35
149.13.32.15
157.55.102.249
157.56.108.82
157.56.194.23
212.161.8.36
213.166.51.4
65.55.142.165
65.55.223.21
78.141.179.13
91.190.218.20
aidps.atdmt.com
ajax.aspnetcdn.com
api.skype.com
apps.skypeassets.com
apps.skype.com
auth.gfx.ms
c.msn.com
connect.facebook.net
http://connect.facebook.net/en_US/all.js
http://connect.facebook.net/en_US/all.js
http://download.skype.com/8cb1db0f1525077c8e684e4d8ec63eb0/SkypeSetupFull.exe
http://ui.skype.com/ui/0/6.5.0.158./pt-BR/getlatestversion?
http://ui.skype.com/ui/0/6.5.0.158./pt-BR/upgrade
http://www.skype.com/go/getskype-full-last
login.live.com
m.hotmail.com
secure.skypeassets.com
s-static.ak.facebook.com
www.facebook.com
Se alguem com disposição puder me ajudar, já não sei mais oq fazer, pois através do proxy permitindo acesso total o skype funciona, já com negação e liberação das url's não...
Muito obrigado a todos que puderem ajudar!