Спасибо заранее..
Код: Выделить всё
ext_if="rl0"
int_if="re0"
tcp_services="{ 113 }"
icmp_types="echoreq"
vserver="192.168.1.3"
desktop="192.168.1.5"
spa3000="192.168.1.6"
# VoIP traffic ports (SIP and RTP).
voipports = "{ 5060, 5061, 16384:16482 }"
set block-policy return
set loginterface $ext_if
set skip on lo
scrub in
# Fire up ALTQ. We'll prioritize empty TCP ACK traffic; VoIP traffic
# next; and then everything else.
#
altq on $ext_if priq bandwidth 512Kb queue { std, voip, tcpack }
queue std priq(red default)
queue voip priority 10 priq(red)
queue tcpack priority 15 priq(red)
nat on $ext_if from !($ext_if) -> ($ext_if:0)
nat on $int_if from $vserver to any -> ($ext_if)
rdr on $ext_if proto tcp from any to any port 33333 -> $desktop
rdr on $ext_if proto udp from any to any port 33333 -> $desktop
block in
pass out keep state
pass in on $int_if from $int_if:network to any keep state
pass in quick on $int_if proto udp from $int_if:network to any \
port $voipports tag VOIP_OUT keep state
pass out on $int_if from any to $int_if:network keep state
pass out on $ext_if inet proto tcp all modulate state flags S/SA \
queue(std, tcpack)
pass out on $ext_if inet proto { udp, icmp, gre } all keep state
pass out on $ext_if tagged VOIP_OUT keep state queue(voip, tcpack)
antispoof quick for { lo $int_if }
pass in on $ext_if inet proto tcp from any to ($ext_if) \
port $tcp_services flags S/SA keep state
pass in on $ext_if inet proto tcp from any to $desktop port 33333 \
flags S/SA synproxy state
pass in on $ext_if inet proto udp from any to $desktop port 33333
pass in inet proto icmp all icmp-type $icmp_types keep state
pass in quick on $int_if
Код: Выделить всё
pfTop: Up Queue 1-3/3, View: queue, Cache: 10000 20:24:03
QUEUE BW SCH PRIO PKTS BYTES DROP_P DROP_B QLEN BORROW SUSPEN P/S B/S
std priq 17502 7092403 3437 1282314 32 142 42742
voip priq 10 0 0 0 0 0 0 0
tcpack priq 15 56 3096 0 0 0 0 0