emerson2703
(usa CentOS)
Enviado em 12/01/2009 - 11:15h
Estou com este problema a dias e não consigo soluções em nenhum dos forum, gostaria que algum de vocês me ajudasse com este caso, estou configurando um firewall, que ira trabalhar com o proxy transparente, mas não consigo que as minhas estações funcione de modo transparente so consigo que funcione configurando o proxy manualmente segue abaixo as configurações.
eth0 rede interna
eth1 internet
***************squid*******************************
http_port 3128 transparent
visible_hostname Firewall-Lauro
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1
acl ip_liberado src "/etc/squid/ip_liberado.txt"
acl ip_restrito src "/etc/squid/ip_restrito.txt"
acl sites_liberados url_regex -i "/etc/squid/sites_liberados.txt"
http_access allow ip_liberado
http_access deny ip_restrito !sites_liberados
http_access deny all
**************************Iptables****************************************
# Generated by iptables-save v1.3.5 on Mon Jan 12 09:41:32 2009
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [1003:300598]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state INVALID -j DROP
-A INPUT -s 192.168.0.0/255.255.255.0 -p tcp -m tcp --dport 3128 -j ACCEPT
-A INPUT -s 192.168.0.0/255.255.255.0 -p tcp -m tcp --dport 10000 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -j RH-Firewall-1-INPUT
-A FORWARD -m state --state INVALID -j DROP
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -i eth1 -j ACCEPT
-A RH-Firewall-1-INPUT -i eth0 -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p esp -j ACCEPT
-A RH-Firewall-1-INPUT -p ah -j ACCEPT
-A RH-Firewall-1-INPUT -d 224.0.0.251 -p udp -m udp --dport 5353 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Mon Jan 12 09:41:32 2009
# Generated by iptables-save v1.3.5 on Mon Jan 12 09:41:32 2009
*mangle
:PREROUTING ACCEPT [1453:400453]
:INPUT ACCEPT [863:328633]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [1003:300598]
:POSTROUTING ACCEPT [1003:300598]
-A PREROUTING -i eth1 -j MARK --set-mark 0x9
-A PREROUTING -i eth0 -j MARK --set-mark 0x9
COMMIT
# Completed on Mon Jan 12 09:41:32 2009
# Generated by iptables-save v1.3.5 on Mon Jan 12 09:41:32 2009
*nat
:PREROUTING ACCEPT [601:72737]
:POSTROUTING ACCEPT [95:5687]
:OUTPUT ACCEPT [95:5687]
-A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
-A POSTROUTING -m mark --mark 0x9 -j MASQUERADE
-A POSTROUTING -s 192.168.0.0/255.255.255.0 -o eth1 -j MASQUERADE
COMMIT
# Completed on Mon Jan 12 09:41:32 2009