PedroSP
(usa Conectiva)
Enviado em 26/07/2007 - 15:14h
Aqui vai a regra q tem no Squid.conf do Conectiva e no Iptables do Coyote.
################# COMEÇO SQUID.CONF ##########
http_port 3128
visible_hostname 192.171.1.103
error_directory /etc/squid/errors
###CONFIGURACAO DO CACHE
cache_mem 15 MB
maximum_object_size_in_memory 128 KB
maximum_object_size 512 KB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/cache/squid 2048 16 256
cache_access_log /var/log/squid/access.log
refresh_pattern ^ftp: 15 20% 2280
refresh_pattern ^gopher: 15 20% 2280
refresh_pattern . 15 20% 22820
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
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 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 Connet !SSL_ports
# AUTENTICAÇÃO DE USUÁRIOS
#auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_password
#acl autenticados proxy_auth REQUIRED
#http_access allow autenticados
acl acesso_liberado src "/etc/squid/acesso_liberado.txt"
acl acesso_geral src "/etc/squid/acesso_geral.txt"
acl acesso_restrito src "/etc/squid/acesso_restrito.txt"
acl acesso_negado src "/etc/squid/acesso_negado.txt"
acl sites_liberados url_regex -i "/etc/squid/sites_liberados.txt"
acl download_negado urlpath_regex -i "/etc/squid/download_negado.txt"
acl sites_negado url_regex -i "/etc/squid/sites_negado.txt"
http_access allow acesso_liberado
http_access allow acesso_geral !sites_negado !download_negado
http_access deny acesso_restrito !sites_liberados
http_access deny acesso_negado
#http_access deny all
###### LIBERA DA REDE LOCAL
acl redelocal src 192.171.1.0/24
http_access allow localhost
http_access allow redelocal
###### PROXY TRANSPARENTE
httpd_accel_port 80
httpd_accel_host virtual
httpd_accel_uses_host_header on
httpd_accel_with_proxy on
####### FIM SQUID.CONF #######
Regras do IP Tables
Obs. Não sei se é ai que pega essas regras, mas entrei no coyote pelo webAdmin na opção Configuração Avançada do Firewall e fui na ultima opção " Editar Regras Personalizadas "
#!/bin/sh
#
# Local Custom Firewall rules
# Level 7 Filtering example rules:
# Block Kazaa, Morpheus, iMesh, Grokster, eDonkey, eMule, DC++, etc:
#iptables -t mangle -A POSTROUTING -m layer7 --l7proto fasttrack -j DROP
#iptables -t mangle -A POSTROUTING -m layer7 --l7proto edonkey -j DROP
#iptables -t mangle -A POSTROUTING -m layer7 --l7proto directconnect -j DROP
# Other Examples:
#iptables -t mangle -A POSTROUTING -m layer7 --l7proto ftp -j LOG
#iptables -t mangle -A POSTROUTING -m layer7 --l7proto pop3 -j MARK --set-mark 1
#
# To see a list of all available protocols use this command:
# ls /etc/l7-protocols
# Attention: To enable the commands below can cause some side effects
# Syn-flood and DOS protection
#iptables -A FORWARD -p tcp --syn -m limit --limit 1/s -j ACCEPT
# Port Scanners protection
#iptables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 1/s -j ACCEPT
#iptables -A FORWARD -p tcp --tcp-flags ALL SYN,ACK -j DROP
# Ping-of-dead protection
#iptables -A FORWARD -p icmp --icmp-type echo-request -m limit --limit 1/s -j ACCEPT
# IP Spoofing protection
#iptables -A INPUT -s 10.0.0.0/8 -i $IF_INET -j DROP
#iptables -A INPUT -s 172.16.0.0/16 -i $IF_INET -j DROP
#iptables -A INPUT -s 192.171/24 -i $IF_INET -j DROP
Fico no aguardo......
Por enquanto fico grato pela ajuda de todos....