SHOREWALL-INIT(8)
π 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:
- 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. π«π₯
- It can interface with your distribution's
ifup/ifdownscripts 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 firewallfrom the firewall's configuration directory. - Shorewall6-lite β on the administrative system, enter the command
shorewall6 export firewallfrom 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/productfor each product listed in thePRODUCTSsetting and setstartup=0. - On other systems, use the distribution's service control tool (
insserv,chkconfig, etc.) to disable startup of the products listed in thePRODUCTSsetting.
π«Ά 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 π
π NOTES π
shorewall.confhttps://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 ππΈβ¨
π¦ where this page comes from
- alpine 3.22: shorewall-doc 5.2.8-r1 Β· GPL-2.0-or-later
- alpine 3.23: shorewall-doc 5.2.8-r1 Β· GPL-2.0-or-later
- alpine 3.24: shorewall-doc 5.2.8-r1 Β· GPL-2.0-or-later
- debian bookworm: shorewall 5.2.8-2 Β· GPL-2.0-or-later
- debian trixie: shorewall 5.2.8-6 Β· GPL-2.0-or-later
- fedora 43: shorewall-init 5.2.8-17.fc43 Β· GPL-2.0-or-later
- fedora 44: shorewall-init 5.2.8-18.fc44 Β· GPL-2.0-or-later
- nixos 26.05: shorewall 5.2.8
- nixpkgs unstable: shorewall 5.2.8
- ubuntu noble: shorewall 5.2.8-5 Β· GPL-2.0-or-later
- ubuntu questing: shorewall 5.2.8-6
- ubuntu resolute: shorewall 5.2.8-6build1 Β· GPL-2.0-or-later
- ubuntu stonking: shorewall 5.2.8-6build1 Β· 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