firehol-connmark(5)
π firehol-connmark β bestie edition β¨
okay so this is the firehol-connmark page from the FireHOL Reference manual, and it's literally about setting a stateful mark from the connmark group. yes queen, we're doing marks today π
β¨ NAME β¨
firehol-connmark β set a stateful mark from the connmark group. that's it, that's the whole vibe π«Ά
πΈ SYNOPSIS πΈ
{ connmark | connmark46 } value chain rule-params
connmark4 value chain rule-params
connmark6 value chain rule-params
three flavors, same energy, pick your fighter π
π¦ DESCRIPTION π¦
so like. marks on packets? they can be matched by traffic shaping, routing, and firewall rules for controlling traffic. yeah. the whole point is controlling traffic. iconic.
β οΈ Note β Behaviour changed significantly in FireHOL v3 compared to earlier versions. not a drill, bestie, don't copy-paste your old config and assume it still slaps.
FireHOL uses iptables masks to break the single 32-bit integer mark value into smaller groups and allows you to set and match them independently. The markdef group definitions to set this up are found in firehol-defaults.conf π
The connmark helper command sets values within the connmark group. You can set value between 0 (no mark) and size-1. The default size for connmark is 64, so 63 is highest value possible. The default connmark types are stateful+permanent, meaning the initial match will only be done on NEW packets and the mark will be restored to all packets in the connection. she's persistent, we love that for her π
The chain will be used to find traffic to mark. It can be any of the iptables(8) built in chains belonging to the mangle table. The chain names are: INPUT, FORWARD, OUTPUT, PREROUTING and POSTROUTING. The names are case-sensitive β input is not INPUT, don't do that to yourself π
The rule-params define a set of rule parameters to match the traffic that is to be marked within the chosen chain. See firehol-params(5) for more details.
Any connmark commands must be declared before the first router or interface. no exceptions, she's strict π
β οΈ Note If you want to do policy based routing based oniptables(8)marks, you will need to disable the Root Path Filtering on the interfaces involved (rp_filterinsysctl). fr fr, don't skip this one. FireQOS will read the FireHOL mark definitions and set up suitable offsets and marks for the various groups. If you are using a different tool, you should look at the emitted firewall to determine the final masks and values to use. iykyk π₯
π EXAMPLES π
the moment you've all been waiting for, actual examples, periodt β¨
# mark with 1, packets sent by the local machine
connmark 1 OUTPUT
# mark with 2, packets routed by the local machine
connmark 2 FORWARD
# mark with 3, packets routed by the local machine, sent from
# 192.0.2.2 destined for port TCP/25 of 198.51.100.1
connmark 3 FORWARD proto tcp dport 25 dst 198.51.100.1 src 192.0.2.2
look at her go π so clean, so specific, so main character π
π SEE ALSO π
go read these too, bestie, they're all bangers:
firehol(1)β FireHOL programfirehol.conf(5)β FireHOL configurationfirehol-params(5)β optional rule parameters[firehol-mark(5)][keyword-firehol-mark]β set a stateful mark from the usermark groupiptables(8)β administration tool for IPv4 firewallsip6tables(8)β administration tool for IPv6 firewallsip(8)β show / manipulate routing, devices, policy routing and tunnels- FireHOL Website
- Working With Marks Wiki Page
- FireHOL Online PDF Manual
- FireHOL Online Documentation
- Linux Advanced Routing & Traffic Control HOWTO
π AUTHORS π
FireHOL Team. (the collective, the icon, the moment π«Ά)
alright bestie that's the whole page β this was built 13 Apr 2025 as part of the FireHOL Reference, version 3.1.8, and honestly? it ate. go mark some packets, you've got this π β¨
π¦ where this page comes from
- debian trixie: firehol-doc 3.1.8+ds-1 Β· GPL-2.0-or-later
- ubuntu resolute: firehol-doc 3.1.8+ds-1 Β· GPL-2.0-or-later
- ubuntu stonking: firehol-doc 3.1.8+ds-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms