[Firehol-support] FireQOS... I think I did it!

Tsaousis, Costa costa at tsaousis.gr
Sat Mar 15 15:16:10 GMT 2014


The config I posted had a few typos.
Here is the right one:

--- /etc/firehol/fireqos.conf BEGIN

DEVICE=dsl0
INPUT_SPEED="$((12200 * 85 / 100))kbit"
OUTPUT_SPEED="$((890  * 95 / 100))kbit"
LINKTYPE="adsl local pppoe-llc"

# ------------- COPY & PASTE BELLOW THIS POINT -------------

server_rtp_ports="udp/10000:10100"
server_lol_ports="udp/5000:5500 tcp/8393:8400,2099,5223,5222,8088"
server_openvpn_ports="any/1195:1198"
server_mytorrent_ports="any/51414"

interface $DEVICE world bidirectional $LINKTYPE input rate $INPUT_SPEED
output rate $OUTPUT_SPEED

        class voip commit 100kbit pfifo
                server sip
                client sip
                server rtp
                client stun

        class interactive input commit 20% output commit 10%
                server icmp

                server dns
                client dns

                server ssh
                client ssh

                client teamviewer
                client lol

        class chat input commit 1000kbit output commit 440kbit
                client facetime

                server hangouts
                client hangouts

                client gtalk
                client jabber

        class vpns input commit 20% output commit 10%
                server pptp
                server GRE
                server openvpn

        class servers
                server http

        class surfing prio keep commit 10%
                client surfing
                client rsync

        class synacks
                match tcp syn
                match tcp ack

        class default

        class torrents
                client torrents
                server mytorrent prio 1
                match sports 16384:65535 dports 16384:65535

--- /etc/firehol/fireqos.conf END

A few more notes:

4. input and output can also be given to 'match' statements. FireQOS will
automatically revert the rule (src<->dst, sports<->dports) if the match
statement is input and interface is output and vice versa.

5. when definining bidirectional interfaces, '-in' or '-out' is appended to
the interface name. Thus to get status of interface 'world' input, you have
to write 'fireqos status world-in'.

Costa




On Sat, Mar 15, 2014 at 4:26 PM, Tsaousis, Costa <costa at tsaousis.gr> wrote:

> Hi all,
>
> I think I did it!
>
> FireQOS can now be exactly like FireHOL. server/client statements and full
> bi-directional interfaces.
>
> Check this config:
>
> --- /etc/firehol/fireqos.conf BEGIN
>
> DEVICE=dsl0
> INPUT_SPEED="$((12200 * 85 / 100))kbit"
> OUTPUT_SPEED="$((890  * 95 / 100))kbit"
> LINKTYPE="adsl local pppoe-llc"
>
> server_rtp_ports="udp/10000:10100"
> server_lol_ports="udp/5000:5500 tcp/8393:8400,2099,5223,5222,8088"
> server_openvpn_ports="any/1195:1198"
> server_mytorrent_ports="any/51414"
>
> interface $DEVICE world-in bidirectional $LINKTYPE input rate $INPUT_SPEED
> output rate $OUTPUT_SPEED
>
>         class voip commit 100kbit pfifo
>                 server sip
>                 client sip
>                 server rtp
>                 client stun
>
>         class interactive input commit 20% output commit 10%
>                 server icmp
>
>                 server dns
>                 client dns
>
>                 server ssh
>                 client ssh
>
>                 client teamviewer
>                 client lol
>
>         class chat input commit 1000kbit output commit 440kbit
>                 client facetime
>
>                 server hangouts
>                 client hangouts
>
>                 client gtalk
>                 client jabber
>
>         class vpns input commit 20% output commit 10%
>                 server pptp
>                 server GRE
>                 server openvpn
>
>         class servers
>                 server http
>
>         class surfing prio keep commit 10%
>                 client surfing
>                 client rsync
>
>         class synacks
>                 match tcp syn
>                 match tcp ack
>
>         class default
>
>         class torrents
>                 client torrents
>                 server mytorrent prio 1
>                 match ports 16384:65535
>
> --- /etc/firehol/fireqos.conf END
>
> Notes:
>
> 1. server and client should be given with the INPUT interface in mind.
> FireQOS will automatically invert it for the output interface.
>
> 2. services can be defined much like FireHOL. client ports are not needed
> though. Only server ports are used by FireQOS.
>
> 3. there are two special keywords in interfaces and classes: input and
> output. These are used to specify interface and class rates (commit, max,
> etc) for each direction. If no input or output is given the rates are
> applied in both directions.
>
> I just committed it to github.
>
> At last... a traffic shaper for humans!
>
> Enjoy...
>
> Costa
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.firehol.org/pipermail/firehol-support/attachments/20140315/81d566f5/attachment-0003.html>


More information about the Firehol-support mailing list