fubu
August 24th, 2004, 10:57
hello , i have compiled my kernel with this options :
options ALTQ
options ALTQ_CBQ # Class Bases Queueing
options ALTQ_RED # Random Early Drop
options ALTQ_RIO # RED In/Out
options ALTQ_HFSC # Hierarchical Packet Scheduler
options ALTQ_CDNR # Traffic conditioner
options ALTQ_PRIQ # Prioirity Queueing
options ALTQ_NOPCC # Required for SMP build
device pf
device pflog
device pfsync
have patched if_xl.c dans if_vr.c with this patchs
http://people.freebsd.org/~mlaier/ALTQ_driver/ and i have put this rules
in my pf.conf :
int_if = "xl0"
altq on $int_if cbq bandwidth 1024Kb queue { std }
And when i run pf i have this message :
altq not defined on xl0
pfctl: Syntax error in config file: pf rules not loaded
I don't hav /dev/altq in my freebsd too.
Anyone have an idea for this problem ?
elmore
August 24th, 2004, 14:16
Hi fubu,
Anyways we can get you to post your entire pf.conf?
fubu
August 24th, 2004, 14:43
http://62.212.121.38/pf.conf
soup4you2
August 24th, 2004, 19:30
have patched if_xl.c dans if_vr.c with this patchs
http://people.freebsd.org/~mlaier/ALTQ_driver/ and i have put this rules
you dont need to patch anymore for ALTQ on -CURRENT you just need
device pf
device pflog
device pfsync
#options RANDOM_IP_ID # Now a sysctl varable
options ALTQ
options ALTQ_CBQ # Class Bases Queueing
options ALTQ_RED # Random Early Drop
options ALTQ_RIO # RED In/Out
options ALTQ_HFSC # Hierarchical Packet Scheduler
options ALTQ_CDNR # Traffic conditioner
options ALTQ_PRIQ # Prioirity Queueing
options ALTQ_NOPCC # Required for SMP build
compiled in the kernel. also if your following -CURRENt it's not 5.2-CURRENT anymore it's 6.0-CURRENT :)
fubu
August 27th, 2004, 06:22
hello , i have find a solution for my probleme.I'm now in freebsd -5.3-beta1 and altq works but i have a problem with rules altq , i don't find how control my upload but i have found how control my download.My rules is here :
http://62.212.121.38/pf
elmore
August 27th, 2004, 12:40
I went to the link provided but I got a connection refused. Anyway I could get you to just cut and paste your ruleset here?
fubu
August 27th, 2004, 15:54
My httpd server is active now.My altq rules are effetive when i delete a rules in my pf.conf :
nat on $ext from $local_net to any -> $ext
and i don't understand why.
http://62.212.121.38/pf
Have you an idea for that ?
molotov
August 27th, 2004, 15:59
## MACROS
ext = "tun0"
int = "xl0"
gw="192.168.1.1"
bsd2 = "192.168.1.2"
danielle = "192.168.1.3"
fubuff= "192.168.1.4"
xbox = "192.168.1.5"
gamecube = "192.168.1.6"
xboxmod = "192.168.1.7"
local_net= "192.168.1.0/24"
ks = "keep state"
tcp_ports = "{ 22,25,80,113,143,6667,7000,44999 >< 49001 }"
## OPTIONS
# add later
## TABLES
# add later
## NORMALIZATION
scrub out all
scrub in all
## QUEUES
# enable queueing on the external interface to control traffic going to
# the Internet.
altq on $ext cbq bandwidth 256Kb queue { std_out }
queue std_out bandwidth 256Kb cbq(default) { gw_out , bsd2_out , danielle_out , fubuff_out }
queue gw_out bandwidth 210Kb cbq
queue bsd2_out bandwidth 20Kb cbq
queue danielle_out bandwidth 13Kb cbq
queue fubuff_out bandwidth 13Kb cbq
# enable queueing on the internal interface to control traffic coming in
# from the Internet.
altq on $int cbq bandwidth 2048Kb queue { std_in }
queue std_in bandwidth 2048Kb cbq(default) { gw_in , bsd2_in , danielle_in , fubuff_in }
queue gw_in bandwidth 1024Kb cbq
queue bsd2_in bandwidth 512Kb cbq
queue danielle_in bandwidth 256Kb cbq
queue fubuff_in bandwidth 256Kb cbq
## TRANSLATIONS
nat on $ext from $local_net to any -> $ext
rdr on $ext proto tcp from any to $ext port 24 -> $bsd2 port 24
rdr on $ext proto tcp from any to $ext port 88 -> $bsd2 port 88
rdr on $ext proto { udp, tcp } from any to $ext port 5800 -> $fubuff port 5800
rdr on $ext proto { udp, tcp } from any to $ext port 5900 -> $fubuff port 5900
rdr on $ext proto tcp from any to $ext port 39999:44001 -> $bsd2 port 39999:44001
## FILTER
# filter rules for lo0
pass quick on lo0
block on { xl0, tun0 } all
# filter rules for $ext inbound
pass in on $ext inet proto tcp from any to $ext port $tcp_ports flags S/SA $ks
pass in on $ext proto tcp from any to $bsd2 port 24 $ks
pass in on $ext proto tcp from any to $bsd2 port = 88 $ks
pass in on $ext proto udp from any to $ext port 5000 $ks
pass in on $ext proto { udp, tcp } from any to $fubuff port 5800 $ks
pass in on $ext proto { udp, tcp } from any to $fubuff port 5900 $ks
pass in on $ext proto udp from any to $ext port 33433 >< 33691 $ks
pass in on $ext proto tcp from any to $bsd2 port 39999 >< 44001 $ks
# filter rules for $ext outbound
pass out on $ext from $local_net to any $ks
pass out on $ext $ks queue (std_out)
pass out on $ext from $gw to any $ks queue (gw_out)
pass out on $ext from $bsd2 to any $ks queue (bsd2_out)
pass out on $ext from $danielle to any $ks queue (danielle_out)
pass out on $ext from $fubuff to any $ks queue (fubuff_out)
# filter rules for $int inbound
pass in on $int from $local_net $ks
# filter rules for $int outbound
pass out on $int from $local_net to any $ks
pass out on $int $ks queue (std_in)
pass out on $int from any to $gw $ks queue (gw_in)
pass out on $int from any to $bsd2 $ks queue (bsd2_in)
pass out on $int from any to $danielle $ks queue (danielle_in)
pass out on $int from any to $fubuff $ks queue (fubuff_in)
# IPV6
pass in inet6 all
pass out quick from 2001:7a8:3d26::1 to any $ks
pass out quick inet6 all
block in log quick on tun0 from 2001:7a8:3d26::/48 to any
pass in quick proto ipv6-icmp from any to 2001:7a8:3d26::1
pass in quick proto tcp from any to 2001:7a8:3d26::1 port $tcp_ports
block in quick from any to 2001:7a8:3d26::1
Hey, I could be a /. karma whore :-). just in case your webserver gets stopped again.