Pinguim Gigante
(usa Fedora)
Enviado em 23/11/2007 - 16:44h
É com muita vergonha que mostro meus confs
Lembrando que aqui a internet é um IP
#############---SQUID---#############
http_port 3128
visible_hostname host@host.com.br
cache_mem 512 MB
maximum_object_size_in_memory 4096 KB
maximum_object_size 300 MB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid 10240 16 256
error_directory /usr/share/squid/errors/Portuguese
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 ip_liberado src "/etc/squid/ip_liberado"
http_access allow ip_liberado
acl palavra dstdom_regex "/etc/squid/palavras_negadas"
http_access deny palavra
acl site url_regex -i "/etc/squid/sites_negados"
http_access deny site
acl video1 url_regex -i \.avi
http_access deny video1
acl video2 url_regex -i \.wmv
http_access deny video2
acl video3 url_regex -i \.mpg
http_access deny video3
acl video4 url_regex -i \.rmvb
http_access deny video4
acl video5 url_regex -i \.mpeg
http_access deny video5
acl video6 url_regex -i \.mpe
http_access deny video6
acl video7 url_regex -i \.mov
http_access deny video7
acl mp3 url_regex -i \.mp3
http_access deny mp3
acl wav url_regex -i \.wav
http_access deny wav
acl all src 0.0.0.0/0.0.0.0
acl redelocal src 192.168.0.0/24
acl manager proto cache_object
acl localhost src 127.0.0.1/255.0.0.0
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, news
acl Safe_ports port 70 #gopher
acl Safe_ports port 210 #wais
acl Safe_ports port 1025-1862 #unregistred ports
acl Safe_ports port 1864-65535 #unregistred 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 Safe_ports port 20 #ftp-data
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 CONNECT !SSL_ports
delay_pools 1
delay_class 1 2
delay_parameters 1 1024000/1024000 128000/128000
delay_access 1 allow redelocal
http_access allow localhost
http_access allow redelocal
http_access deny all
httpd_accel_port 80
httpd_accel_host virtual
httpd_accel_uses_host_header on
httpd_accel_with_proxy on
##############################################
#############---IPTABLES---################
*mangle
:PREROUTING ACCEPT [4:474]
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
*nat
:PREROUTING ACCEPT [4:474]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-I PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
-I POSTROUTING -o eth0 -j ACCEPT
-I POSTROUTING -o eth1 -j MASQUERADE
COMMIT
*filter
#:INPUT DROP [0:0]
#:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
#-I INPUT -j DROP
-I INPUT -i lo -j ACCEPT
-I INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-I INPUT -i eth1 -j ACCEPT
-A INPUT -p tcp -s 0/0 --dport 5900 -j ACCEPT
-A OUTPUT -p tcp -d 0/0 --sport 5900 -j ACCEPT
-A FORWARD -i eth0 -o eth0 -p tcp --dport 5900 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -i eth1 -o eth1 -p tcp --dport 5900 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -i eth1 -o eth0 -p tcp --dport 5900 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -i eth0 -o eth1 -p tcp --dport 5900 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
-I INPUT -p udp -m udp --dport 53 -j ACCEPT
-I INPUT -p udp -m udp --dport 6002 -j ACCEPT
-I FORWARD -o eth0 -p tcp -m tcp --dport 20 -j ACCEPT
-I FORWARD -o eth0 -p tcp -m tcp --dport 21 -j ACCEPT
-I FORWARD -o eth0 -p udp -m udp --dport 20 -j ACCEPT
-I FORWARD -o eth0 -p udp -m udp --dport 21 -j ACCEPT
-I FORWARD -o eth0 -p tcp -m tcp --dport 995 -j ACCEPT
-I FORWARD -o eth0 -p tcp -m tcp --dport 465 -j ACCEPT
-I FORWARD -s 192.168.0.0/24 -p tcp -d xxx.xxx.xxx.xxx --dport 25 -j ACCEPT
-I FORWARD -s xxx.xxx.xxx.xxx -p tcp -d 192.168.0.0/24 --sport 110 -j ACCEPT
-I INPUT -s xxx.xxx.xxx.xxx -i eth1 -j ACCEPT
#-I FORWARD -j DROP
-I FORWARD -s 192.168.0.0/24 -o eth0 -j ACCEPT
#-I FORWARD -o eth0 -p tcp -m tcp --dport 5190 -j DROP
#-I FORWARD -o eth0 -p tcp -m tcp --dport 6346 -j DROP
#-I FORWARD -o eth0 -p tcp -m tcp --dport 1214 -j DROP
#-I FORWARD -o eth0 -s 192.168.0.135 -p tcp -m tcp --dport 5190 -j ACCEPT
-I FORWARD -o eth0 -p udp -m udp --sport 137:139 -j DROP
-I FORWARD -o eth0 -p tcp -m tcp --sport 137:139 -j DROP
-I FORWARD -o eth1 -j ACCEPT
-I OUTPUT -o eth0 -p udp -m udp --sport 137:139 -j DROP
-I OUTPUT -o eth0 -p tcp -m tcp --sport 137:139 -j DROP
-I OUTPUT -o eth0 -p tcp -m tcp --sport 137:139 -j DROP
-I FORWARD -p tcp -m tcp --dport 1863 -j REJECT
-I FORWARD -p tcp -m tcp --dport 5190 -j REJECT
-I FORWARD -s 192.168.0.230 -p tcp -m tcp --dport 1863 -j ACCEPT
-I FORWARD -s 192.168.0.230 -p tcp -m tcp --dport 5190 -j ACCEPT
COMMIT
#############################################
Socorro!!!