Boa tarde pessoal, será que alguém passou por este problema:
Tenho o squid rodando aqui na empresa, como proxy transparente, a principio todas as máquinas estão funcionando perfeitamente, o problema é que a máquina de um contador que precisa rodar o programa DPI (Declaração Periódica de Informações), tá com um problema, o programa DPI 2003 abre normalmente, fica conectado, na hora de enviar o arquivo, a msg que aparece é que esta transmitindo, e fica transmitindo direto, sem terminar, não sei o que pode ser, ele não tem configurações de proxy e rede, e não sei dizer se é a porta, pois no site não especifica se ele usa alguma porta diferente, o site é www.sefaz.go.gov.br Uso o DPI2003 do estado de Goiás, alguém pode me dar uma dica? abaixo o meu rc.firewall e squid.conf:
Firewall
Código :#!/bin/bash # Script de Firewall ##################################### ### Passo 1: Primeiro vamos arrumar a casa :) ### ##################################### # Limpando as Regras iptables -F INPUT iptables -F OUTPUT iptables -F FORWARD # Definindo a Politica Default das Cadeias iptables -P INPUT DROP iptables -P OUTPUT ACCEPT iptables -P FORWARD DROP ###################################### ### Passo 2: Antes de Servir, vamos nos proteger ! ### ###################################### # Desabilitando o trafego IP Entre as Placas de Rede echo "0" > /proc/sys/net/ipv4/ip_forward # Configurando a Protecao anti-spoofing echo "Setting anti-spoofing .....[ OK ]" for spoofing in /proc/sys/net/ipv4/conf/*/rp_filter; do echo "1" > $spoofing done ####################################### ### Passo 3: Carregando os modulos do iptables ### ####################################### modprobe ip_tables modprobe iptable_filter modprobe iptable_mangle modprobe iptable_nat modprobe ipt_MASQUERADE echo "Setting rules .............[ OK ]" ####################################### ### Passo 4: Agora, vamos definir o que pode passar e o que nao ### ####################################### # Cadeia de Entrada. Esta cadeia, so vale para o proprio host # Qualquer pacote IP que venha do localhost, Ok. iptables -A INPUT -i lo -j ACCEPT # REDE INTERNA LIBERADA iptables -A INPUT -i eth0 -j ACCEPT # No iptables, temos de dizer quais sockets sao validos em uma conexao iptables -A INPUT -m state --state ESTABLISHED,RELATED,NEW -j ACCEPT # Cadeia de Reenvio (FORWARD) # Primeiro, ativar o mascaramento (nat). iptables -t nat -F POSTROUTING iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE # Agora dizemos quem e o que podem acessar externamente # No iptables, o controle do acesso a rede externa e feito na cadeia "FORWARD" # Redireciona porta 80 para 3128 (squid) iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128 iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 8080 -j REDIRECT --to-port 3128 # REDE INTERNA LIBERADA iptables -A FORWARD -i eth0 -j ACCEPT # No iptables, temos de dizer quais sockets sao validos em uma conexao iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT ######################################## ### Finalmente, podemos "Ligar" o foward (clientes) :) ### ######################################## # Habilitando o trafego Ip, entre as Interfaces de rede echo "1" > /proc/sys/net/ipv4/ip_forward echo "Firewall OK ...............[ OK ]"
squid.conf
Código :# ================ Acceleration (Proxy Transparent) ============ http_port 3128 icp_port 0 httpd_accel_port 80 httpd_accel_host virtual httpd_accel_with_proxy on httpd_accel_uses_host_header on visible_hostname proxiserver.cpd.haiala # ================== Access List for CGI ======================= acl QUERY urlpath_regex cgi-bin \? # ================== Replacements ============================== cache_replacement_policy lru memory_replacement_policy lru # ================== Service Access Lists ====================== 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 Safe_ports port 873 # rsync acl Safe_ports port 23 # telnet acl Safe_ports port 631 # cups acl Safe_ports port 901 # SWAT acl Safe_ports port 3001 # Receptor Imprensa Nacional acl Safe_ports port 8004 # Imprensa Nacional acl Safe_ports port 1494 # Sigov acl Safe_ports port 1521 # Siafi Gerencial acl Safe_ports port 3460 # Serpro EDM acl Safe_ports port 102 # X400 acl Safe_ports port 16000 # Siscon acl Safe_ports port 23000 # SerproWeb acl Safe_ports port 2631 # Sefip acl Safe_ports port 12010 # Cnpq Curriculo Lates acl CONNECT method CONNECT # ================================================ # =============== Clientes ======================= # ================================================ # ==== Bloqueia sites pornograficos ==== acl pornoblock url_regex -i "/etc/squid/bloqueios/porno.txt" acl nopornoblock url_regex -i "/etc/squid/bloqueios/noporno.txt" http_access deny pornoblock !nopornoblock acl local src 127.0.0.0/8 http_access allow local acl intranet src 198.164.1.0/24 http_access allow intranet acl gti src 10.1.100.0/24 http_access allow gti # ======== Regra Proibir Download mp3,jpeg,mjeg,mov,avi ======== acl downloads urlpath_regex .mp3$ .mov$ .avi$ .mpeg$ .wmv$ .wav$ http_access deny downloads acl all src 0.0.0.0/0.0.0.0 http_access allow all # ===================== Management =========================== cache_mgr [email][email protected][/email] cachemgr_passwd Sync # ===================== Cache Size =========================== cache_mem 96 MB cache_swap_low 90 cache_swap_high 95 maximum_object_size 5000 KB # ================ Internet Explorer Compatibility ============ ie_refresh on request_timeout 20 seconds fqdncache_size 4000 # ================ Logs de acesso ============================= emulate_httpd_log on cache_dir ufs /var/spool/squid 1000 64 64 cache_access_log /var/log/squid/access.log cache_log /var/log/squid/cache.log cache_store_log /var/log/squid/store.log logfile_rotate 10 # 10 logs coredump_dir /var/spool/squid
Abraços,
Eduardo Henrique.