fireqos.conf(5)

πŸ“¦
version 3.1.8 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

✨ fireqos.conf β€” the manual page, bestie edition ✨

okay so we're talking about fireqos.conf, the 5 in the man section, and it's the configuration file for all the traffic shaping magic that fireqos(1) is gonna apply. yes. this is the glow-up document. πŸ’…


🌸 NAME 🌸

fireqos.conf β€” the FireQOS configuration file. that's it, that's the name, she's simple, she's iconic. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so this file? this file is where you define the traffic shaping that's going to get applied by fireqos(1). the whole personality of your network lives here.

the default configuration file is /etc/firehol/fireqos.conf. you can override it from the command line if you're feeling rebellious (and honestly, live your truth).

a configuration is made up of a bunch of input and output interface definitions (peep fireqos-interface(5) for the deets on those). and each interface can define literally any number of classes β€” optionally nested, she contains multitudes β€” (that's fireqos-class(5)) which shape the traffic that they match (and matching is a whole thing, see fireqos-match(5)).


πŸ’– SPEED UNITS πŸ’–

in FireQOS, speeds can be expressed in the following units. pick your fighter:

  • #bps β€” # bytes per second
  • #kbps; #Kbps β€” # kilobytes per second
  • #mbps; #Mbps β€” # megabytes per second
  • #gbps; #Gbps β€” # gigabytes per second
  • #bit β€” # bits per second
  • #kbit; #Kbit; # β€” # kilobits per second (this is the default, bestie)
  • #mbit; #Mbit β€” # megabits per second
  • #gbit; #Gbit β€” # gigabits per second
  • #% β€” in a class, uses this percentage of the enclosing rate

πŸŽ€ Note πŸŽ€

the default, kbit, is different to tc(8) which assumes bytes per second when no unit is specified. so like… do not assume they're the same thing. they are not. πŸ™ˆ

🌈 EXAMPLE 🌈

this first example uses match statements. obsessed. ✨

        # incoming traffic from my ADSL router
        interface eth2 adsl-in input rate 10500kbit adsl remote pppoe-llc
          class voip commit 100kbit pfifo
            match udp ports 5060,10000:10100 # asterisk sip and rtp
            match udp ports 16393:16402 # apple facetime

          class realtime commit 10%
            match tcp port 22,1195:1198,1753 # ssh, openvpn, pptp
            match udp port 53 # dns
            match proto GRE
            match icmp
            match tcp syn
            match tcp ack

          class clients commit 10%
            match tcp port 20,21,25,80,143,443,465,873,993 # mail, web, ftp, etc

        # unmatched traffic goes here ('default' is a special name)
          class default max 90%

        # I define torrents beneath the default class, so they slow
        # down when the default class is willing to get bandwidth
          class torrents max 90%
            match port 51414 # my torrent client

        # outgoing traffic to my ADSL router
        interface eth2 adsl-out output rate 800kbit adsl remote pppoe-llc
          class voip commit 100kbit pfifo
            match udp ports 5060,10000:10100 # asterisk sip and rtp
            match udp ports 16393:16402 # apple facetime

          class realtime commit 10%
            match tcp port 22,1195:1198,1753 # ssh, openvpn, pptp
            match udp port 53 # dns
            match proto GRE
            match icmp
            match tcp syn
            match tcp ack

          class clients commit 10%
            match tcp port 20,21,25,80,143,443,465,873,993 # mail, web, ftp, etc

        # unmatched traffic goes here ('default' is a special name)
          class default max 90%

        # I define torrents beneath the default class, so they slow
        # down when the default class is willing to get bandwidth
          class torrents max 90%
            match port 51414 # my torrent client

and this next one uses server/client statements in a bidirectional interface. and of course match statements can also be specified, you can have both, we're not gatekeeping. FireQOS will create 2 interfaces out of this: world-in and world-out. it's giving main character energy fr fr 🫢

         DEVICE=dsl0
         INPUT_SPEED="12000kbit"
         OUTPUT_SPEED="800kbit"
         LINKTYPE="adsl local pppoe-llc"

         # a few service definitions
         # all the rest that are used in this example
         # are defined by FireQOS
         server_netdata_ports="tcp/19999"
         server_rtp_ports="udp/10000:10100"
         server_openvpn_ports="any/1195:1198"
         server_mytorrent_ports="any/60000"
         server_mytorrenttransfers_ports="any/60001:64999"
         server_myssh_ports="tcp/2222"

         # League Of Legends game (yes! I have kids)
         server_lol_ports="udp/5000:5500 tcp/8393:8400,2099,5223,5222,8088"

         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 limit 50%

             server dns
             client dns

             server ssh
             client ssh

             server myssh
             client myssh

             client teamviewer
             client lol

           class chat input commit 1000kbit output commit 30%
             client facetime

             server hangouts
             client hangouts

             client gtalk
             client jabber

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

           class servers
             server netdata
             server http

           # a class group to favor tcp handshake over transfers
           class group surfing prio keep commit 5%
             client surfing
             client rsync

             class synacks
               match tcp syn
               match tcp ack

           class group end

           class synacks commit 5%
             match tcp syn
             match tcp ack

           class default

           class background commit 4%
             client torrents
             server mytorrent
             server mytorrenttransfers

πŸ’œ SEE ALSO πŸ’œ


πŸ‘‘ AUTHORS πŸ‘‘

FireHOL Team. that's the squad, periodt. πŸ’–


and that's the whole page bestie!! this is the FireQOS Reference, built 13 Apr 2025, and we're running on version 3.1.8 β€” same manual name, same date, same energy, no cap. go shape some traffic, you absolute icon. πŸŒŸπŸ¦‹πŸ’…

πŸ“¦ where this page comes from