🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.os.bsd
Article #172

pf+altq, nie dziala borrow, 5.1 R

#172
From: klikacz
Date: Mon, 22 Mar 2004 01:28
80 lines
3820 bytes
Witam, mam taka prosbe, czy moglby ktos zerknac na konfiga pf i powiedziec
dlaczego nie dziala mi borrow dla klienta TEST,
po zdjeciu klasy na "lokalny ruch" dziala, ale to nie jest rozwiazanie bo
wtedy przycina mi caly interfejs wewnetrzny do 512Kb,

Bylbym wdzieczny za pomoc !

(pf.conf jest prawie w calosci skopiowany z przykladu z faq'a)

ext_if="rl1"
int_if="rl0"

tcp_services = "{ 20, 21, 22, 113, 80 > 30000, < 32000 }"
set block-policy return
set loginterface $ext_if
scrub in all

altq on $ext_if priq bandwidth 120Kb queue { std_out, ssh_im_out, dns_out, \
 tcp_ack_out }

queue std_out priq(default)
queue ssh_im_out priority 4 priq(red)
queue dns_out priority 5
queue tcp_ack_out priority 7
#---------------------------------------------------------------------------
-------
altq on $int_if cbq bandwidth 100Mb queue { net_int, local  }

queue net_int bandwidth 100Mb cbq

queue local bandwidth 512Kb cbq { std_in, ssh_im_in, dns_in, TEST_IN }
     queue std_in cbq(default)
         queue TEST_IN bandwidth 50Kb cbq(borrow)
     queue ssh_im_in priority 4 ^^^^^^^^^^^^^^^^
     queue dns_in priority 5

#---------------------------------------------------------------------------
-------
TEST = "192.168.1.2"
local_net = "192.168.1.0/24"
ssh_ports = "{ 22 2022 }"
im_ports = "{ 1863 5190 5222 }"
nat on rl1 from rl0/24 to any -> rl1

# regu�y filtruj?ce dla przychodz?cego ruchu na ext_if
block in on $ext_if all
pass in on $ext_if inet proto { tcp, udp } from any to ($ext_if) \
   port $tcp_services flags S/SA keep state


# regu�y filtruj?ce dla wychodz?cego ruchu na ext_if
block out on $ext_if all
pass out on $ext_if inet proto tcp from ($ext_if) to any flags S/SA \
 keep state queue(std_out, tcp_ack_out)
pass out on $ext_if inet proto { udp icmp } from ($ext_if) to any keep state
pass out on $ext_if inet proto { tcp udp } from ($ext_if) to any port domain
\
 keep state queue dns_out
pass out on $ext_if inet proto tcp from ($ext_if) to any port $ssh_ports \
 flags S/SA keep state queue(std_out, ssh_im_out)
pass out on $ext_if inet proto tcp from ($ext_if) to any port $im_ports \
 flags S/SA keep state queue(ssh_im_out, tcp_ack_out)

# regu�y filtruj?ce dla przychodz?cego ruchu na int_if
block in on $int_if all
pass in on $int_if from $local_net

# regu�y filtruj?ce dla wychodz?cego ruchu na int_if
block out on $int_if all
pass out on $int_if from any to $local_net
pass out on $int_if proto { tcp udp } from any port domain to $local_net \
 queue dns_in
pass out on $int_if proto tcp from any port $ssh_ports to $local_net \
 queue(std_in, ssh_im_in)
pass out on $int_if proto tcp from any port $im_ports to $local_net \
 queue ssh_im_in
pass out on $int_if from any to $TEST queue TEST_IN
pass out on $int_if inet proto { tcp, udp } from $int_if port { 20, 21, 22,
80, > 1000, < 49000 } to $local_net \
  queue net_int
Technical Details
Message-ID: <c3lfk3$3ri$1@nemesis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!teleglobe.net!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!teleglobe.net!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: "klikacz" <ze...@go2.pl>
Newsgroups: pl.comp.os.bsd
Subject: pf+altq, nie dziala borrow, 5.1 R
Date: Mon, 22 Mar 2004 02:28:56 +0100
Organization: tp.internet - http://www.tpi.pl/
Lines: 82
Message-ID: <c3lfk3$3ri$1@nemesis.news.tpi.pl>
NNTP-Posting-Host: zi166.internetdsl.tpnet.pl
X-Trace: nemesis.news.tpi.pl 1079919044 3954 80.53.140.166 (22 Mar 2004 01:30:44 GMT)
X-Complaints-To: use...@tpi.pl
NNTP-Posting-Date: Mon, 22 Mar 2004 01:30:44 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit