SHOREWALL-INIT(8)

πŸ“¦
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-INIT β€” the companion package πŸ’–

okay bestie, so this is shorewall-init, and it lives in section 8 of the manual (Administrative Commands, if you're keeping score πŸŽ€). It's the lil sidekick package that hangs out with the big kids. Let's get into it ✨


🌸 NAME 🌸

shorewall-init β€” the companion package. that's it, that's the name, and honestly? iconic. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

shorewall-init [start|stop]

that's the whole vibe. you either start it or you stop it. pick your fighter πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

okay so shorewall-init is an optional package β€” it's been around since Shorewall 4.4.10 β€” and you can install it alongside Shorewall, Shorewall6, Shorewall-lite and/or Shorewall6-lite. no cap.

It gives you two key features:

  1. It can close (stop) the firewall during boot, before the network starts. The way this matters?? it can prevent unwanted connections from being accepted in that cursed little window after the network comes up but before the firewall is started. like, the gap era. we don't do that anymore. 🚫πŸ”₯
  2. It can interface with your distribution's ifup/ifdown scripts and/or NetworkManager so the firewall can do its little actions when an interface starts or stops. so coordinated. so demure. 🧚

Both of these capabilities can be enabled separately. you do you, boo.

After you install the shorewall-init package, you activate it by editing the Shorewall-init configuration file:

  • On Debian-based systems, that file is /etc/default/shorewall-init.
  • On other systems, that file is /etc/sysconfig/shorewall-init.

⭐ Activating the safe boot feature ⭐

To turn on the safe boot feature, edit that config file and set PRODUCTS to a space-separated list of Shorewall products you want to be closed before networking starts.

Example, bestie:

PRODUCTS="shorewall shorewall6"

You also must make sure that the compiled scripts for the listed products are compiled using Shorewall 4.4.10 or later. no skipping this, fr fr.

  • Shorewall β€” run:
shorewall compile
  • Shorewall6 β€” run:
shorewall6 compile
  • Shorewall-lite β€” on the administrative system, enter the command shorewall export firewall from the firewall's configuration directory.
  • Shorewall6-lite β€” on the administrative system, enter the command shorewall6 export firewall from the firewall's configuration directory.

🌈 Activating the ifup/ifdown + NetworkManager thing 🌈

The second feature (the ifup/ifdown and NetworkManager integration) should only be activated on systems that do not use a link status monitor line swping or LSM. read that again. only. okay periodt.

  • Edit the configuration file and set IFUPDOWN=1.

For NetworkManager integration, you're gonna want to disable firewall startup at boot and delay it to when your interface comes up. For this to work correctly, you must set the required or the optional option on at least one interface, and then:

  • On Debian-based systems, edit /etc/default/product for each product listed in the PRODUCTS setting and set startup=0.
  • On other systems, use the distribution's service control tool (insserv, chkconfig, etc.) to disable startup of the products listed in the PRODUCTS setting.

🫢 the laptop situation 🫢

On a laptop with both Ethernet and wireless interfaces, you'll want to make both interfaces optional and set the REQUIRE_INTERFACE option to Yes in shorewall.conf[1](5) or shorewall6.conf[1] (5). This causes the firewall to remain stopped until at least one of the interfaces comes up. main character energy: it waits for its moment. πŸ’…βœ¨


πŸŽ€ FILES πŸŽ€

/etc/default/shorewall-init (Debian-based systems) or /etc/sysconfig/shorewall-init (other distributions)


πŸ‘‘ SEE ALSO πŸ‘‘

shorewall(8)


πŸ’€ NOTES πŸ’€

  1. shorewall.conf https://shorewall.org/manpages/shorewall.conf.html

and that's the page, bestie!! πŸ¦‹ go forth and firewall responsibly. this was Administrative Commands, dated 09/24/2020, and yes the header/footer said SHOREWALL-INIT(8) the whole time β€” we just said it cuter. mwah πŸ’–πŸŒΈβœ¨