[FUG-BR] Tirar ips do Cache - FreeBsd

Danilo G. Baio dbaio em bsd.com.br
Terça Dezembro 14 08:52:49 BRST 2010


Em 13/12/2010 23:01, Ronildo Marques escreveu:
> Prezados,
>
> Estou com uns problemas para acesso à alguns serviços por conta de
> um cache que tenho na minha rede, então gostaria de uma regra que
> pudesse dizer que os ips 66.178.0.0/16 não passe pelo cache, abaixo
> minhas regras atuais:
>
> ####################################################################
> dns-nvmh# cat /etc/rc.ipfw
> #!/bin/sh
> fw="/sbin/ipfw"
> rede_interna="{ 187.yy.44.0/24 or 187.yy.230.0/29 or 187.yy.231.0/24 or
> 187.yy.232.0/24 }" # Rede Cliente
> ifi="vr1" # Interface Interna de Rede
> ife="vr0" #interface externa
>
> $fw -f flush
> $fw add fwd 187.xx.254.2,3123 tcp from $rede_interna to any 80 in via
> $ifi
> $fw add fwd 187.xx.254.2 tcp from any 80 to $rede_interna in via $ife
>
>
> dns-nvmh# ipfw show
> 00100 10236988 1351360889 fwd 187.xx.254.2,3123 tcp from
> { 187.yy.44.0/24 or 187.yy.230.0/29 or 187.yy.231.0/24 or
> 187.yy.232.0/24 } to any dst-port 80 in via vr1
> 00200 16097 2402411 fwd 187.xx.254.2 tcp from any 80 to
> { 187.yy.44.0/24 or dst-ip 187.yy.230.0/29 or dst-ip 187.yy.231.0/24 or
> dst-ip 187.yy.232.0/24 } in via vr0
> 65535 127329101 62271555896 allow ip from any to any
> dns-nvmh#
> ####################################################################
>

Bom dia,
faça uma regra de skip para pular estes forwards...

Aqui tem uns exemplos:
http://www.freebsd.org/doc/handbook/firewalls-ipfw.html

Abraço.

--
Danilo G. Baio (dbaio)



Mais detalhes sobre a lista de discussão freebsd