SHOREWALL-PARAMS(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 (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

🌸 NAME 🌸

okay so this is the manual page for params β€” the Shorewall parameters file, bestie. it's SHOREWALL-PARAMS(5) if you're keeping track, and it's genuinely the most low-key powerful file in your whole firewall setup πŸ’–


✨ SYNOPSIS ✨

/etc/shorewall[6]/params

πŸŽ€ DESCRIPTION πŸŽ€

okay so the whole vibe of this file is: assign any shell variables you need in here. that's it, that's the job. and because the file is always processed by /bin/sh, you get the full range of shell capabilities β€” loops, conditionals, command substitution, all of it. the whole toolbox. slay ✨

one lil tip though (a suggestion, not a rule, don't come for me): it's suggested that you start your variable names with an upper case letter. why? so they don't get confused with the variables Shorewall's own programs use internally. keep your stuff visually separate from their stuff. it's giving boundaries, and we love that 🫢


🚫 variable names you MUST avoid 🚫

ngl this is the important part. these names are off-limits:

  • the ones printed in bold are banned in all Shorewall versions, periodt.
  • the ones in regular font are only a problem in versions prior to 4.4.8.
fr fr, do not name your variables any of these. the shell doesn't care about your feelings, and neither does a collision πŸ’€

here's the list:

  • Any option from shorewall.conf(5)
  • COMMAND
  • CONFDIR
  • DEBUG
  • ECHO_E
  • ECHO_N
  • EXPORT
  • FAST
  • FILEMODE
  • HOSTNAME
  • IPT_OPTIONS
  • NOROUTES
  • PREVIEW
  • PRODUCT
  • PROFILE
  • PURGE
  • RECOVERING
  • RESTOREPATH
  • RING_BELL
  • SHAREDIR
  • Any name beginning with SHOREWALL_ or SW_
  • STOPPING
  • TEST
  • TIMESTAMP
  • USE_VERBOSITY
  • VARDIR
  • VERBOSE
  • VERBOSE_OFFSET
  • VERSION

🌈 example params file 🌈

so this is what a params file can look like:

NET_IF=eth0
NET_BCAST=130.252.100.255
NET_OPTIONS=routefilter

and here's an example shorewall-interfaces(5) file that uses those variables:

ZONE    INTERFACE       BROADCAST       OPTIONS
net     $NET_IF         $NET_BCAST      $NET_OPTIONS

and this is exactly the same thing as if the interfaces file had just said:

ZONE    INTERFACE       BROADCAST       OPTIONS
net     eth0            130.252.100.255 routefilter

see?? the variables just get swapped in. iconic behaviour, no notes πŸ‘‘


πŸ“ FILES πŸ“

  • /etc/shorewall/params
  • /etc/shorewall6/params

πŸ‘€ SEE ALSO πŸ‘€


πŸ“ NOTES πŸ“

  1. shorewall.conf https://shorewall.org/manpages/shorewall.conf.html
  2. shorewall-interfaces https://shorewall.org/manpages/shorewall-interfaces.html
  3. https://shorewall.org/configuration_file_basics.htm#Variables https://shorewall.org/configuration_file_basics.htm#Variables

and that's the whole page, bestie πŸ¦‹ this one lives in Configuration Files, it's version SHOREWALL-PARAMS(5), and it was dated 09/24/2020. go forth and name your variables something that isn't on that list πŸ’…βœ¨