Olá Pessoal, Tive mesmo que tirar o firewall de produção pois estava causando prejuisos...
Como não posso mais parar o serviço, fiz um teste de sobrecarga encima do firewall com o AB. Usei 2 maquinas Opteron DUal Core no teste com a seguinte linha de comando ab -n 100000 -c 1000 http://200.xx.xx.87/index.php O index.php é um phpinfo(); A máquina web que recebe o trafego do firewall ficou com a seguinte carga CPU states: 15.7% user, 0.0% nice, 11.5% system, 5.5% interrupt, 67.3% idle O interessante que pude notar é que de 10 em 10 segundos a maquina ia de 65%idle para 100% e logo em seguida voltava para 65%, e isso pude notar com o firewall em produção. A maquina firewall ficou da seguinte forma. last pid: 2327; load averages: 0.57, 0.38, 0.18 up 0+01:32:20 08:01:09 27 processes: 1 running, 26 sleeping CPU states: 0.0% user, 0.0% nice, 0.0% system, 29.9% interrupt, 70.1% idle Mem: 15M Active, 9216K Inact, 40M Wired, 20K Cache, 12M Buf, 3855M Free Swap: 4096M Total, 4096M Free E a mesma variação de carga ocorreu tbm, como se ela travasse as conexões. Só para complementar, no teste com o ab tive 15% de perda de conexao. pf.conf ################################################## ############# # PLACAS DE REDE ################################################## ############# ext_if="bge0" int_if="bge1" ip_rede="10.10.1.0/24" adserver="10.10.1.7" PING = "echoreq" TCP_IN = "{ 53, 22, 80, ssh, ftp, 20, 21}" UDP_IN = "{ 53, 67, 80, 20, 21 }" TCP_OUT = "{ 53, 22, 80, 20, 21, ftp, http }" UDP_OUT = "{ 53, 80, 20, 21, domain }" ################################################## ############# # NORMALIZANDO OS PACOTES ################################################## ############# set timeout { tcp.first 60 tcp.opening 15 tcp.established 86400 \ tcp.closing 300 tcp.finwait 15 tcp.closed 15 } set timeout { udp.first 30 udp.single 15 udp.multiple 30 } set timeout { icmp.first 10 icmp.error 5 } set timeout { other.first 30 other.single 15 other.multiple 30 } set timeout { frag 30 interval 10 } set limit { states 50000 frags 25000 } set optimization aggressive set loginterface $ext_if set loginterface $int_if set block-policy return set require-order yes scrub all fragment reassemble random-id no-df ################################################## ############# # FAZENDO NAT ################################################## ############# nat on $ext_if from $ip_rede to any -> ($ext_if) ################################################## ############# # REDIRECIONAMENTO ################################################## ############# rdr on $ext_if proto tcp from any to 200.xxx.xxx.87 port www -> $adserver rdr on $ext_if proto tcp from any to 200.xxx.xxx.87 port 2207 -> $adserver ############################################################### # blockeando tudo por default #block in log on $int_if all #block out log on $int_if all # bloqueando spoof antispoof for { $ext_if } inet # bloqueando scanners block drop in quick on { $ext_if } from any os { NMAP } # bloqueando trafego ipv6 block log quick inet6 #Liberando loopback pass quick on lo0 all # liberando ping/traceroute pass out log on $ext_if inet proto icmp all icmp-type 8 code 0 keep state pass in log on $ext_if inet proto icmp all icmp-type 8 code 0 keep state # Liberando portas #INCOMING #TCP pass in quick on $ext_if inet proto tcp from any to $ext_if port $TCP_IN \ flags S/SA keep state #UDP #pass in quick on $ext_if inet proto udp from any to $ext_if port $UDP_IN \ keep state #PING pass in quick on $ext_if inet proto icmp from any to $ext_if icmp-type $PING \ keep state pass in on $ext_if inet proto { tcp udp } from any to any port 22 pass in on $ext_if inet proto { tcp udp } from any to any port 21 pass in on $ext_if inet proto { tcp udp } from any to any port 20 pass in on $ext_if inet proto { tcp udp } from any to any port 25 pass in on $ext_if inet proto { tcp udp } from any to any port 53 pass in on $ext_if inet proto { tcp udp } from any to any port 80 pass in on $ext_if inet proto { tcp udp } from any to any port 443 pass in on $ext_if inet proto { tcp udp } from any to any port 110 pass in on $ext_if inet proto { tcp udp } from any to any port 8080 pass in on $ext_if inet proto { tcp udp } from any to any port 6667 pass in on $ext_if inet proto { tcp udp } from any to any port 6891 pass in on $ext_if inet proto { tcp udp } from any to any port 6893 pass in on $ext_if inet proto { tcp udp } from any to any port 6900 pass in on $ext_if inet proto { tcp udp } from any to any port 1213 pass in on $ext_if inet proto { tcp udp } from any to any port 1214 pass in on $ext_if inet proto { tcp udp } from any to any port 1832 pass in on $ext_if inet proto { tcp udp } from any to any port 3094 pass in on $ext_if inet proto { tcp udp } from any to any port 3622 pass in on $ext_if inet proto { tcp udp } from any to any port 2216 pass in on $ext_if inet proto tcp from port 20 to $ext_if \ user proxy flags S/SA keep state #OUTGOING #EXTERNAL INTERFACE #TCP pass out quick on $ext_if inet proto tcp from $ext_if to any port $TCP_OUT \ flags S/SA keep state #UDP pass out quick on $ext_if inet proto udp from $ext_if to any port $UDP_OUT \ keep state #ICMP pass out quick on $ext_if inet proto icmp from $ext_if to any icmp-type $PING \ keep state # Liberando acesso ################################################## ############# # CONTROLE DE DOWNLOAD ################################################## ########### pass out log on $int_if from any to $ip_rede ################################################## ############# # CONTROLE DE UPLOAD ################################################## ############ pass in log on $int_if from $ip_rede to any Espero por um help..Valeu Em Seg, 2007-10-22 às 20:36 -0200, Giancarlo Rubio escreveu: > Esse seu cenario e basico seu hardware parece ser mais suficiente. > Isto esta cheirando dns, procure usar ferramentas como tcpdump para > verificar como os pacotes se comportam, procure testar a rede sem > maquinas. > > Uma outra coisa sem firewall sua rede fica mais rapida? > Poste suas regras, envie um ps e um top num momento de carga alta. > > > Em 22/10/07, Oliver Thies<[EMAIL PROTECTED]> escreveu: > > > > Olá para todos da lista. > > Este é o meu primeiro post. > > Estou recorrendo a lista pois já lí varios artigos , uma parte do handbook, > > e um guia para Open bsd e nao achei respostas. > > > > Á alguns dias montei um firewall simplezinho com pf, apenas com intuito de > > fazer redirecionamento de trafego para servidores web com IP privado a fim > > de ganhar um pouco mais de segurança. > > > > O esquema da Minha rede é o seguinte > > Config de Hardware do firewall. > > DELL 1435 > > Processador AMD Opteon dual core 1.8ghz > > HD SATA > > 4GB Memoria > > 2 Placas de rede GIGA > > 1 Placa ligada no link da embratel(100mb full) > > 1 Placa ligada na rede interna > > > > LINK > > | > > | > > FIREWALL 200.xxx.xxx.87,200.xxx.xxx.73,200.xxx.xxx.70 if_ext > > | 10.10.1.1 > > if_int > > | > > |---------------Balanceamento(Round Robin ->este serviço necessida de 2 > > servers) > > | | > > | |--------servidor > > web1(10.10.1.7) > > | |--------servidor > > web2(10.10.1.6) > > | > > |---------------servidor web3(sem balanceamento - apenas paginas php - > > 10.10.1.5) > > > > > > Levantei 3 ips na placa externa do firewall, cada ip responde para 1 > > serviço, que é encaminhado para a maquina de destino na rede interna. > > Tudo isso está funcionando. > > O grande problema é a demora que está ocorrendo para acessar os serviços, > > chega a dar timeout no browser. > > Nao aparece nada em dmesg e nem nos logs. > > Precisei desativar o firewall para voltar o serviço ao normal. > > O tráfego medido na interface externa do firewall chega a 70mb constante em > > horarios de pico, em horarios normais fica a 60mb. > > O load da maquina fica em 0.2 com 90% livre de processamento e 24MB de > > memoria ATIVA. > > > > > > Já recompilei kernel com alguns parametros trocados > > maxusers 4096 > > options PMAP_SHPGPERPROC=2048 > > options HZ=1000 > > Ja usei o sysctl > > kern.ipc.somaxconn=8192 > > net.inet.ip.portrange.first=1025 > > net.inet.tcp.recvspace=4096 > > E mesmo assim num rola... > > > > > > Vou continuar tentando por aqui. > > Mas se alguer poder dar uma forcinha eu agradeço.. > > Até + pessoal. > > > > > > > > > > > > > > > > _________________________________________________________________ > > Receba GRÁTIS as mensagens do Messenger no seu celular quando você estiver > > offline. Conheça o MSN Mobile! > > http://mobile.live.com/signup/signup2.aspx?lc=pt-br > > ------------------------- > > Histórico: http://www.fug.com.br/historico/html/freebsd/ > > Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd > > > > ------------------------- Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd