freebsd
[Início] [Todas as Listas]

[FUG-BR] PF e ALTQ

From: "Welkson Renny de Medeiros" <welkson@xxxxxxxxxxxxxxxxxxxxx>
To: <freebsd@xxxxxxxxxx>
Subject: [FUG-BR] PF e ALTQ
Date: Wed, 13 Sep 2006 13:14:17 -0300
Senhores, achei alguma coisa na internet sobre priorização de pacotes com ALTQ e PF, incluí no meu pf.conf e estou testando agora... gostaria de compartilhar as regras e saber a opinião de vocês, se dar pra melhorar alguma coisa.

Estou analisando usando o seguinte comando:
pfctl -vv -sq

A idéia é dar prioridade a um determinado ip da rede (voip 192.168.0.252).

# macros
int_if = "rl0"
ext_if = "sis0"
voip_gw = "{ 192.168.0.252 }" # ip do voip linksys 2102

# this is a recommended setting for SIP
set timeout { udp.first 300, udp.single 150, udp.multiple 900 }

# priorização dos pacotes
altq on $ext_if cbq bandwidth 1Mb queue { normal, voip }
queue normal bandwidth 800Kb priority 1 cbq(borrow,default)
queue voip bandwidth 200Kb priority 7 cbq(borrow)

# nat
nat on $ext_if from !($ext_if) -> ($ext_if:0)

# Generic NAT rule for all internal network devices
nat on $ext_if from $int_net to any -> ($ext_if)

# proxy transparent (dansguardian-squid)
rdr on $int_if inet proto tcp from $int_if:network \
 to !$int_if:network port www -> 127.0.0.1 port 8080

# Allow external SIP control traffic
pass in  quick on $ext_if proto udp from any to any port 5060 keep state

# Allow udp from VoIP provider
pass out on $ext_if inet proto udp from $voip_gw to any queue voip
pass in on $int_if inet proto udp from $voip_gw to any queue voip

# outros
pass out quick on $ext_if proto { tcp, udp, icmp, gre } all keep state
pass in quick on $ext_if proto { tcp, udp, icmp, gre } all keep state
pass out log quick proto gre all keep state

Abraço,


--
Welkson Renny de Medeiros
Focus Automação Comercial
Desenvolvimento / Gerência de Redes
welkson@xxxxxxxxxxxxxxxxxxxxx












<Anterior na Thread] Thread Atual [Próximo na Thread>