orakulo
(usa openSUSE)
Enviado em 16/09/2010 - 19:42h
Olá...
meu thunderbird não recebe emails quando configurado para usar o squid de proxy.
com o squid navega e até recebe emails pelo thunderbir, mas não envia
da a mensagem que o tempo se esgotou...
segue meu iptables e squid
#!/bin/bash
iniciar(){
#Compartilhar a conexao
modprobe iptable_nat
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo "Compartilhamento ativado"
#Permite conexoes na interface de rede local e na porta 22 465 993
iptables -A INPUT -i eth0 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A FORWARD -p tcp -i eth0 --dport 465 -j ACCEPT
iptables -A FORWARD -p tcp -i eth0 --dport 993 -j ACCEPT
iptables -A FORWARD -p tcp -i eth0 --dport 25 -j ACCEPT
iptables -A FORWARD -p tcp -i eth0 --dport 110 -j ACCEPT
#Redireciona um conjunto de portas
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p tcp -i eth0 -m multiport --dport 22,465,993 -j DNAT --to-dest 192.168.1.90 iptables -t nat -A POSTROUTING -d 192.168.1.90 -j SNAT --to 192.168.1.61
echo "Portas redirecionadas"
#Regras basicas de firewall
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-request -j DROP
echo 1 > /proc/sys/net/ipv4/conf/default/rp_filter
iptables -A INPUT -p tcp --syn -j DROP
echo "Regras de firewall e compartilhamento ativados"
iptables -A FORWARD -p tcp -i eth0 -j LOG
}
parar(){
iptables -F
iptables -t nat -F
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
echo 0 > /proc/sys/net/ipv4/ip_forward
echo "Regras de firewall e compartilahmento desativados"
}
case "$1" in
"start") iniciar ;;
"stop") parar ;;
"restart") parar; iniciar ;;
*) echo "Use os parametros start ou stop"
http_port 3128
visible_hostname internet
error_directory /usr/share/squid/errors/Portuguese
cache_mem 256 MB
maximum_object_size_in_memory 64 KB
maximum_object_size 512 MB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_hight 95
cache_dir ufs /var/spool/squid 2048 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
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 993 465 3001
acl Safe_ports port 21 25 110 80 443 563 70 210 280 488 59 777 901 3000 1025-65525
acl purge method PURGE
acl CONNECT method CONNECT
acl extban url_regex -i \.avi \.exe \.mp3 \.wmv \.zip \.rar
http_access deny extban
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
acl redelocal src 192.168.1.0/24
http_access allow localhost
http_access allow redelocal
http_access deny all