----- Mensagem original ----
De: Thiago Athayde Viana <thiago@cmci.es.gov.br>
Para: debian-user-portuguese@lists.debian.org
Enviadas: Sexta-feira, 17 de Novembro de 2006 14:04:13
Assunto: Desabilitar porta 80 para tudo passar pelo squid
Comunidade,
Tenho um firewall iptables com duas placas de rede:
eth0 192.168.0.1 255.255.255.0 DMZ GW 192.168.0.2
velox 192.168.0.2
255.255.255.0
eth1 10.3.132.254 255.255.255.128 Rede Local
O compartilhamento da Internet já funciona com esse script:
#compartilhando a internet
modprobe iptable_nat
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
Não quero usar o proxy transparente, o ideal seria bloquear a porta 80 e
deixar o navegador do cliente configurado com o servidor proxy squid.
Dessa forma se o cliente estiver usando "conectar diretamente" ele não
navegaria, tornando a configuração do proxy necessária.
Andei tentando
iptables -A FORWARD -s 10.3.132.0/25 -p tcp --dport 80 -j REJECT
iptables -A INPUT -p tcp --dport 80 -j DROP
#iptables - L
Chain INPUT (policy ACCEPT)
target
prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:3128
ACCEPT all -- 192.168.0.0/24 anywhere
ACCEPT all -- 10.3.132.0/25 anywhere
ACCEPT tcp -- anywhere
anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:telnet
ACCEPT all -- anywhere anywhere
DROP tcp -- anywhere anywhere tcp
flags:FIN,SYN,RST,ACK/SYN
DROP tcp -- anywhere
anywhere tcp dpt:www
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT tcp -- 10.3.132.0/25 anywhere tcp dpt:www
reject-with icmp-port-unreachable
REJECT tcp -- 10.3.132.0/25 anywhere tcp dpt:www
reject-with icmp-port-unreachable
Chain OUTPUT (policy ACCEPT)
target prot opt
source destination
REJECT tcp -- 192.168.6.0/24 anywhere tcp dpt:www
reject-with icmp-port-unreachable
REJECT tcp -- 10.3.132.0/25 anywhere tcp dpt:www
reject-with icmp-port-unreachable
Aguardo ansiosamente,
Thiago Athayde Viana
Cachoeiro de Itapemirim-ES
--
To UNSUBSCRIBE, email to debian-user-portuguese-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org