RES: [FUGSPBR] Squid+trasparent_proxing naum funciona mais!(LONGO)

Heini Thomas Geib htgnews em terra.com.br
Sáb Jan 19 03:09:27 BRST 2002


Olá!
Vc. já tentou colocar no firewall a regra de forward antes da regra do natd?
[]´s
Heini.

-----Mensagem original-----
De: owner-fugspbr em mail.fugspbr.org
[mailto:owner-fugspbr em mail.fugspbr.org]Em nome de Marcelo Pereira
Enviada em: quinta-feira, 17 de janeiro de 2002 13:23
Para: fugspbr em fugspbr.org
Assunto: [FUGSPBR] Squid+trasparent_proxing naum funciona mais!(LONGO)


Ola pessoal,

    Ontem fiz a instalação do 4.3 num server meu e
recompilei o kernel com os seguintes parametros:
machine         i386
cpu             I486_CPU
cpu             I586_CPU
cpu             I686_CPU
ident           NAT
maxusers        64

#customizacoes:

options         EXT2FS
options         IPFIREWALL
options         IPFIREWALL_VERBOSE
options         IPFIREWALL_VERBOSE_LIMIT=100
options         IPFIREWALL_DEFAULT_TO_ACCEPT
options         IPFIREWALL_FORWARD
options         IPFILTER
options         IPFILTER_LOG

#Para habilitar i diskd no squid

options         MSGMNB=16384
options         MSGMNI=41
options         MSGSEG=2049
options         MSGSSZ=32
options         MSGTQL=512
options         SHMSEG=16
options         SHMMAX=2097152
options         SHMALL=3096

#Para NATD
options INCLUDE_CONFIG_FILE
options IPDIVERT
options TCP_DROP_SYNFIN
options TCP_RESTRICT_RST

#vidcontrol

options SC_PIXEL_MODE
options VGA_WIDTH90
options VESA

#Opcoes para pppoe server

options NETGRAPH
options NETGRAPH_PPPOE
options NETGRAPH_SOCKET
options NETGRAPH_IFACE
options BRIDGE
options DUMMYNET

E o resto eh do do GENERIC mesmo.

Meu /usr/local/etc/rc.d/firewall estah chmod +x
#!/bin/sh
/sbin/ipfw -f -q flush
/sbin/ipfw add 50 divert natd all from any to any via xl0
/sbin/ipfw add 50 divert natd all from 192.168.99.0/24 to any via xl0
out
/sbin/ipfw add 50 fwd 127.0.0.1,3128 tcp from any to any 80
/sbin/natd -m -s -n xl0


Meu squid foi compilado pelo ports, vesão 2.4
squid.conf:
http_port 3128
cache_mem  8 MB
maximum_object_size 4096 KB
#minimum_object_size 0 KB
ipcache_size 1024
ipcache_low  90
ipcache_high 95
fqdncache_size 1024
cache_dir diskd /usr/local/squid/cache 256 16 256 Q1=64 Q2=72
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
mime_table /etc/squid/mime.conf
pid_filename /var/run/squid.pid
client_netmask 255.255.255.0
dns_nameservers 192.168.99.3
refresh_pattern         ^ftp:           1440    20%     10080
refresh_pattern         ^gopher:        1440    0%      1440
refresh_pattern         .               0       20%     4320
connect_timeout 120 seconds
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 21 443 563 70 210 1025-65535
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 CONNECT method CONNECT
http_access allow all
icp_access allow all
miss_access allow all
proxy_auth_realm Squid proxy-caching web server
cache_mgr root
cache_effective_user squid
cache_effective_group squid
visible_hostname freebsd.criarsolucoes.com.br
unique_hostname freebsd.criarsolucoes.com.br
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

e meu /etc/rc.conf estah assim
allscreens_flags="-g 100x37 VESA_800x600"
hostname="freebsd.criarsolucoes.com.br"
ifconfig_rl0="inet 192.168.99.3  netmask 255.255.255.0"
dhcp_program="/sbin/dhclient"
ifconfig_xl0="DHCP"
inetd_enable="YES"
kern_securelevel_enable="NO"
linux_enable="YES"
nfs_reserved_port_only="NO"
nfs_server_enable="NO"
portmap_enable="YES"
sshd_enable="YES"
sendmail_enable="NO"
gateway_enable="YES"
named_enable="YES"
named_flags="-u named -g named"

Tudo estah funcionando bem com escessão do proxy, que funciona se eu
setar no cliente para utilizar aporta 80 ou 3128, + por conexão direta
aparece uma mensagem do squid dizendo que a URL digitada etah errada.
Onde errei? Esses arquivos (incusive o de configuracao do kernel) eu jah

tinha testado antes em outra maquina e funcionava mauito bem.


----
Para sair da lista envie um e-mail para majordomo em fugspbr.org
com as palavras "unsubscribe fugspbr" no corpo da mensagem.

----
Para sair da lista envie um e-mail para majordomo em fugspbr.org
com as palavras "unsubscribe fugspbr" no corpo da mensagem.



Mais detalhes sobre a lista de discussão freebsd