firehol-tos(5)

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

πŸ’– firehol-tos β€” setting the Type of Service (TOS) of packets πŸ’–

okay bestie, welcome to firehol-tos from the FireHOL manual pages (that's manual section 5, file-config territory, iykyk). this one's all about stamping a lil TOS label onto your packets. let's get into it πŸŽ€


✨ SYNOPSIS ✨

tos value chain [rule-params]

that's the whole vibe. three-ish things and you're done 🫢


🌸 DESCRIPTION 🌸

so the tos helper command sets the Type of Service (TOS) field in packet headers. that's it, that's the job. iconic behaviour, no notes πŸ’…

note note note: there's also a tos parameter that lets you match TOS values inside individual rules β€” that one lives over in firehol-params(5). different thing, same name, don't get it twisted πŸ™ˆ

the value can be:

  • an integer number β€” decimal or hexadecimal, either is fine
  • or one of the descriptive values that iptables(8) accepts

and if you need the list of those descriptive values? run this, bestie:

iptables -j TOS --help

the chain is how you tell FireHOL where to go looking for the traffic you wanna mark. it can be any of the iptables(8) built-in chains that belong to the mangle table. the chain names are:

  • INPUT
  • FORWARD
  • OUTPUT
  • PREROUTING
  • POSTROUTING
these names are case-sensitive. input is not INPUT, and the firewall will simply not be having it 😭

the rule-params define a set of rule parameters that match the traffic to be marked, within whichever chain you picked. more on that in firehol-params(5) ✨

and now the big one, the part you cannot skip:

any tos commands will affect ALL traffic matched. and they must be declared before the first router or interface. periodt. no exceptions, no "but I put it at the bottom", no ma'am πŸ‘‘

πŸ”₯ EXAMPLES πŸ”₯

# set TOS to 16, packets sent by the local machine
tos 16 OUTPUT

# set TOS to 0x10 (16), packets routed by the local machine
tos 0x10 FORWARD

# set TOS to Maximize-Throughput (8), packets routed by the local
#              machine, destined for port TCP/25 of 198.51.100.1
tos Maximize-Throughput FORWARD proto tcp dport 25 dst 198.51.100.1

look at that hex flex in the second one, 0x10 is literally just 16 wearing a costume 🧚 and the third one is the full main-character treatment: descriptive value, chain, proto, dport, dst. ate and left no crumbs πŸ“


πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’œ AUTHORS πŸ’œ

FireHOL Team. (the collective slay, fr fr 🫢)


and that's the page, bestie!! this was FireHOL Reference, version 3.1.8, built 13 Apr 2025. go forth and mark your packets, but remember: before the first router or interface, or it's over for you πŸ’€βœ¨

πŸ“¦ where this page comes from