SHOREWALL-TCINTERFA(5)

πŸ“¦
version 5.2.8 Β· 2 versions
  • 5.2.8 Β· alpine 3.22, alpine 3.23, alpine 3.24, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 5.2.3.4 Β· ubuntu jammy
, in alpine 3.22, alpine 3.23, alpine 3.24, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ SHOREWALL-TCINTERFA(5) ✨

okay bestie, this is the tcinterfaces page from the Shorewall manual β€” like, the actual config-files one, and honestly it's giving "short but mighty" πŸ’…


🌸 NAME 🌸

tcinterfaces β€” a Shorewall file. that's it, that's the name 🫢


πŸŽ€ SYNOPSIS πŸŽ€

/etc/shorewall[6]/tcinterfaces

πŸ¦‹ DESCRIPTION πŸ¦‹

So this file is literally just a list of the interfaces that get simple traffic shaping. And when do you get simple traffic shaping, you ask? Only when you set TC_ENABLED=Simple in shorewall.conf[1](5). that's the whole vibe check right there, no cap.


πŸ“ a lil note on the bandwidth definition, bestie

the bandwidth numbers in this file have RULES, and we respect them:

  • don't use a space between the integer value and the unit: 30kbit is valid while 30 kbit is not. the space is a crime, do not commit it πŸ™ˆ
  • you can use one of the following units:
    • kbps β€” Kilobytes per second.
    • mbps β€” Megabytes per second.
    • kbit β€” Kilobits per second.
    • mbit β€” Megabits per second.
    • bps or number β€” Bytes per second.
    • k or kb β€” Kilo bytes.
    • m or mb β€” Megabytes.
  • Only whole integers are allowed. no 3.5mbit shenanigans, we're not doing decimals here πŸ’€

🧚 the columns, in order

(where the column name is followed by a different name in parentheses, that different name is what gets used in the alternate specification syntax β€” iykyk)

INTERFACE

The logical name of an interface. and listen β€” if you run both IPv4 and IPv6 Shorewall firewalls, a given interface should only be listed in one of the two configurations. pick a lane, babe 🌈

TYPE - [external|internal]

Optional. If you give it, it says whether the interface is external (facing toward the Internet) or internal (facing toward a local network), and it enables SFQ flow classification. cute AND functional ✨

IN-BANDWIDTH (in_bandwidth) - {-|bandwidth[:burst]|~bandwidth[:interval:decay_interval]}

The incoming bandwidth of that interface. and now the important part, bestie, read this twice: you are not able to do traffic shaping on incoming traffic, because the traffic is already received before you could do so. periodt. but what this does let you do is define the maximum traffic allowed for this interface in total β€” if the rate is exceeded, the packets are dropped. you mainly want this if you have a DSL or Cable connection, to avoid queuing at your provider's side. it's giving "protect your own queue" energy 🫢

If you don't want any traffic to be dropped, set this to a value of zero, in which case Shorewall will not create an ingress qdisc. Must be set to zero if the REDIRECTED INTERFACES column is non-empty. not optional, fr fr.

The optional burst option was added in Shorewall 4.4.18. The default burst is 10kb. A larger burst can help make the bandwidth more accurate; often for fast lines, the enforced rate is well below the specified bandwidth. lowkey fascinating, highkey useful.

What is described above creates a rate/burst policing filter. Beginning with Shorewall 4.4.25, a rate-estimated policing filter may be configured instead. Rate-estimated filters should be used with Ethernet adapters that have Generic Receive Offload enabled by default. See Shorewall FAQ 97a[2]. πŸ‘‘

To create a rate-estimated filter, precede the bandwidth with a tilde (~). The optional interval and decay_interval determine how often the rate is estimated and how many samples are retained for estimating. Please see http://ace-host.stuart.id.au/russell/files/tc/doc/estimators.txt for details. If not specified, the default interval is 250ms and the default decay_interval is 4sec. the defaults are doing the work so you don't have to πŸ’…

OUT-BANDWIDTH (out_bandwidth) - [rate[:[burst][:[latency][:[peek][:[minburst]]]]]]

Added in Shorewall 4.4.13. The terms are defined in tc-tbf(8). go read that one if you want the lore πŸ“–

Shorewall provides defaults as follows:

  • burst - 10kb
  • latency - 200ms

The remaining options are defaulted by tc(8). so chill, they got you 🌸


πŸ“ FILES πŸ“

  • /etc/shorewall/tcinterfaces
  • /etc/shorewall6/tcinterfaces

πŸ’œ SEE ALSO πŸ’œ


⭐ NOTES ⭐

  1. shorewall.conf https://shorewall.org/manpages/shorewall.conf.html
  2. Shorewall FAQ 97a https://shorewall.org/FAQ.htm#faq97a

and that's the whole page, bestie!! πŸ’– this one came from the Configuration Files manual, dated 09/24/2020, and it's filed under SHOREWALL-TCINTERFA(5). go forth and shape that traffic, you absolute icon πŸ‘‘βœ¨