#!/bin/bash # # This file is part of htb-gen, and is subject to the license terms in the # LICENSE file, found in the top level directory of this distribution. # If you did not receive the LICENSE file with this file, you may obtain it # from the htb-gen source package distributed by the htb-gen Project at # http://www.praga.org.ar/wacko/DevPraga/htbgen/LICENSE. # No part of Htb-gen, including this file, may be copied, modified, # propagated, or distributed except according to the terms described in the # LICENSE file. # #--Basic Configuration---: configure only this vars to get all up & running #htb-gen rates conf file htb_gen_rates_conf="/etc/htb-gen/htb-gen-rates.conf" # Example: # inet interface: eth0 # 4096/1024 Down/Up DSL-Link #array of ifaces to control ifaces=(eth0 eth1) #out rate of each iface (same order as ifaces array) # remeber that linux shapes on output traffic total_rate=(1024 4096) #alias name for each iface (for web frontend) ifaces_name=(inet clients) #---Advanced Configuration--: configure this if you have special needs- #default_tcp_prio_ports: more doc on htb-gen-rates.conf # you can redefine it in a per-client bassis, this is default #defaults: ftp-data,ftp,ssh,smtp,www,pop3,imap,https,smtps,imaps,pops,msn,msn,squid,rdp default_tcp_prio_ports=20,21,22,25,80,110,143,443,465,993,995,1863,1864,3128,3389 #default_udp_prio_ports: more doc on htb-gen-rates.conf # you can redefine it in a per-client bassis, this is default #defaults: 0(none), by setting this to 0 you can put udp in prio_protos default_udp_prio_ports=0 #default_prio_protos: more doc on htb-gen-rates.conf # you can redefine it in a per-client bassis, this is default #defaults: upd icmp and vpn protocols default_prio_protos=udp,icmp,igmp,esp,ah,gre #default_prio_helpers: more doc on htb-gen-rates.conf # you can redefine it in a per-client bassis, this is default #you can redefine it in a per client bassis, if not this is taken as default #defaults: ftp default_prio_helpers=ftp #default_ceil_dfl_percent: more doc on htb-gen-rates.conf # you can redefine it in a per-client bassis, this is default #defaults: 100% of host's ceil assigned to dfl class(junk traffic) default_ceil_dfl_percent=100 # this will determine min(rate) and max(ceil) values for junk traffic rate_dfl_percent=10 #percent of host's rate assigned to dfl class(junk traffic) mtu=1500 # link Max Transfer Unit r2q=10 # quantum=rate*1024/8/r2q #--Really Advanced Configuration--: TOUCH THIS IF YOU REALLY KNOW WHAT ARE DOING #'class_start' htb-gen will use consecutive class numbers above this one class_start="1" #'rate_granted' this value matters only if you are using automatic rate (a 0 in #rates columns) this is to grant that low_rate classes have at least a minimun bw, #this have a high impact in low_rate classes and low impact in high rate classes #Increment this value if you are getting rates per host class under the 6~10kbps rate_granted=3 #path adaptation iptables_command="/sbin/iptables" iptables_save_command="/sbin/iptables-save" iptables_restore_command="/sbin/iptables-restore" tc_command="/sbin/tc"