SHOREWALL.CONF(5)
โจ NAME โจ
shorewall.conf โ Shorewall global configuration file
okay bestie, this is the SHOREWALL.CONF(5) page from the Configuration Files section, and we're about to make your firewall config make sense. ๐
๐ SYNOPSIS ๐
/etc/shorewall/shorewall.conf
/etc/shorewall6/shorewall6.conf
๐ธ DESCRIPTION ๐ธ
The IPv4 and IPv6 environments each have their own configuration. The IPv4 configuration resides in /etc/shorewall/ while the IPv6 configuration resides in /etc/shorewall6/.
The .conf files set options that apply to Shorewall and Shorewall6 as a whole.
The .conf files consist of Shell comments (lines beginning with #), blank lines and assignment statements (variable=value). If the value contains shell meta characters or white-space, then it must be enclosed in quotes. Example: MACLIST_LOG_LEVEL="NFLOG(1,0,1)".
๐ OPTIONS ๐
Many options have as their value a log-level. Log levels are a method of describing to syslog (8) the importance of a message and a number of parameters in this file have log levels as their value.
These levels are defined by syslog and are used to determine the destination of the messages through entries in /etc/syslog.conf (5). The syslog documentation refers to these as "priorities"; Netfilter calls them "levels" and Shorewall also uses that term.
Valid levels are:
7 debug
6 info
5 notice
4 warning
3 err
2 crit
1 alert
0 emerg
For most Shorewall logging, a level of 6 (info) is appropriate. Shorewall log messages are generated by NetFilter and are logged using facility 'kern' and the level that you specify. If you are unsure of the level to choose, 6 (info) is a safe bet. You may specify levels by name or by number.
If you have built your kernel with ULOG (IPv4 only) and/or NFLOG target support, you may also specify a log level of ULOG and/or NFLOG (must be all caps). Rather than log its messages to syslogd, Shorewall will direct netfilter to log the messages via the ULOG or NFLOG target which will send them to a process called 'ulogd'. ulogd is available with most Linux distributions (although it probably isn't installed by default).
Note If you want to specify parameters toULOGorNFLOG(e.g.,NFLOG(1,0,1)), then you must quote the setting. Example:LOG_LEVEL="NFLOG(1,0,1)"
Beginning with Shorewall 5.0.0, the log level may be followed by a colon (":") and a log tag. The log tag normally follows the packet disposition in Shorewall-generated Netfilter log messages, separated from the disposition by a colon (e.g, "DROP:mytag"). See LOGTAGONLY below for additional information.
Beginning with Shorewall 4.4.22, LOGMARK is also a valid level which logs the packet's mark value along with the other usual information. The syntax is:
LOGMARK[(priority)]
where priority is one of the levels listed in the list above. If omitted, the default is info (6).
The following options may be set in shorewall.conf.
ACCEPT_DEFAULT={action[(parameters)][:level][,...]|none}BLACKLIST_DEFAULT={action[(parameters)][:level][,...]|none}DROP_DEFAULT={action[(parameters)][:level][,...]|none}NFQUEUE_DEFAULT={action[(parameters)][:level][,...]|none}QUEUE_DEFAULT={action[(parameters)][:level][,...]|none}REJECT_DEFAULT={action[(parameters)][:level][,...]|none}
Okay so those six? They share one big glow-up story. In earlier Shorewall versions, a "default action" for DROP and REJECT policies was specified in the file /usr/share/shorewall/actions.std.
In Shorewall 4.4.0, the DROP_DEFAULT, REJECT_DEFAULT, ACCEPT_DEFAULT, QUEUE_DEFAULT and NFQUEUE_DEFAULT options were added.
DROP_DEFAULT describes the rules to be applied before a connection request is dropped by a DROP policy; REJECT_DEFAULT describes the rules to be applied if a connection request is rejected by a REJECT policy. The other three are similar for ACCEPT, QUEUE and NFQUEUE policies.
The value applied to these may be:
- a) The name of an action. The name may optionally be followed by a comma-separated list of parameters enclosed in parentheses if the specified action accepts parameters (e.g.,
'Drop(audit)'). - c) None or none
Prior to Shorewall 5.1.2, the default values are:
DROP_DEFAULT="Drop"
REJECT_DEFAULT="Reject"
BLACKLIST_DEFAULT="Drop" (added in Shorewall 5.1.1)
ACCEPT_DEFAULT="none"
QUEUE_DEFAULT="none"
NFQUEUE_DEFAULT="none"
Beginning with Shorewall 5.1.2, the default value is 'none' for all of these. Note that the sample configuration files do, however, provide settings for DROP_DEFAULT, BLACKLIST_DEFAULT and REJECT_DEFAULT.
If you set the value of either option to "None" then no default action will be used and the default action or macro must be specified in shorewall-policy[1](5).
You can pass parameters to the specified action (e.g., myaction(audit,DROP)).
Beginning with Shorewall 4.5.10, the action name can be followed optionally by a colon and a log level. The level will be applied to each rule in the action or body that does not already have a log level.
Beginning with Shorewall 5.1.2, multiple action[(parameters)][:level] specifications may be listed, separated by commas.
ACCOUNTING=[Yes|No]โ Added in Shorewall 4.4.7. If set toYes, Shorewall accounting is enabled (seeshorewall-accounting[2](5)). If not specified or set to the empty value,ACCOUNTING=Yesis assumed.ACCOUNTING_TABLE=[filter|mangle]โ Added in Shorewall 4.4.20. This setting determines which Netfilter table the accounting rules are added in. By default,ACCOUNTING_TABLE=filteris assumed. See alsoshorewall-accounting[2](5).ADD_IP_ALIASES=[Yes|No]โ This parameter determines whether Shorewall automatically adds the external address(es) inshorewall-nat[3](5), and is only available in IPv4 configurations. If the variable is set toYesoryesthen Shorewall automatically adds these aliases. If it is set toNoorno, you must add these aliases yourself using your distribution's network configuration tools. If this variable is not set or is given an empty value (ADD_IP_ALIASES="") thenADD_IP_ALIASES=Yesis assumed.
Warning Addresses added byADD_IP_ALIASES=Yesare deleted and re-added duringshorewall reloadandshorewall restart. As a consequence, connections using those addresses may be severed.
ADD_SNAT_ALIASES=[Yes|No]โ This parameter determines whether Shorewall automatically adds the SNAT ADDRESS inshorewall-masq[4](5), and is only available in IPv4 configurations. If the variable is set toYesoryesthen Shorewall automatically adds these addresses. If it is set toNoorno, you must add these addresses yourself using your distribution's network configuration tools. If this variable is not set or is given an empty value (ADD_SNAT_ALIASES="") thenADD_SNAT_ALIASES=Nois assumed.
Warning Addresses added byADD_SNAT_ALIASES=Yesare deleted and re-added duringshorewall reloadandshorewall restart. As a consequence, connections using those addresses may be severed.
ADMINISABSENTMINDED=[Yes|No]โ The value of this variable affects Shorewall's stopped state. The behavior differs depending on whethershorewall-routestopped[5](5)orshorewall-stoppedrules[6](5)is used:
routestopped
When ADMINISABSENTMINDED=No, only traffic to/from those addresses listed in routestopped is accepted when Shorewall is stopped. When ADMINISABSENTMINDED=Yes, in addition to traffic to/from addresses in routestopped, connections that were active when Shorewall stopped continue to work and all new connections from the firewall system itself are allowed.
Note that the routestopped file is not supported in Shorewall 5.0 and later versions.
stoppedrules
All existing connections continue to work. To sever all existing connections when the firewall is stopped, install the conntrack utility and place the command conntrack -F in the stopped user exit (/etc/shorewall/stopped).
If ADMINISABSENTMINDED=No, only new connections matching entries in stoppedrules are accepted when Shorewall is stopped. Response packets and related connections are automatically accepted.
If ADMINISABSENTMINDED=Yes, in addition to connections matching entries in stoppedrules, all new connections from the firewall system itself are allowed when the firewall is stopped. Response packets and related connections are automatically accepted.
If this variable is not set or is given the empty value then ADMINISABSENTMINDED=No is assumed.
ARPTABLES=[pathname]โ Added in Shorewall 4.5.12 and available in IPv4 only. This parameter names thearptablesexecutable to be used by Shorewall. If not specified or if specified as a null value, then thearptablesexecutable located using thePATHoption is used. Regardless of how thearptablesutility is located (specified viaarptables=or located viaPATH), Shorewall uses thearptables-restoreandarptables-saveutilities from that same directory.AUTOCOMMENT=[Yes|No]โ Formerly namedAUTO_COMMENT. If set, if there is not a current comment when a macro is invoked, the behavior is as if the first line of the macro file wasCOMMENT <macro name>. If not specified, theAUTO_COMMENToption has a default value of'Yes'.AUTOHELPERS=[Yes|No]โ Added in Shorewall 4.5.7. When set toYes(the default), the generated ruleset will automatically associate helpers with applications that require them (FTP, IRC, etc.). When configuring your firewall on systems running kernel 3.5 or later, it is recommended that you:- Set
AUTOHELPERS=No. - Modify the
HELPERSsetting (see below) to list the helpers that you need. - Either:
- Modify
shorewall-conntrack[7] (5)to only apply helpers where they are required; or - Specify the appropriate helper in the
HELPERcolumn inshorewall-rules[8] (5).
- Modify
- Set
Note The macros for those applications requiring a helper automatically specify the appropriate HELPER where required.
AUTOMAKE=[Yes|No|recursive|depth] ๐
okay bestie, this one is a whole mood. Set it and the vibes of your start, reload and restart commands literally change โจ โ because if no files in CONFIG_PATH (peep below ๐) have been changed since the last successful start, reload or restart, then the compilation step gets skipped entirely and Shorewall just reuses the compiled script that ran the last start, reload or restart. Efficiency queen. ๐
If you don't specify it, the default is AUTOMAKE=No.
Lowkey important: the whole AUTOMAKE setting gets ignored if your start, reload or restart command includes a directory name (like shorewall restart /etc/shorewall.new). It's giving "read the room, I said a directory." ๐ญ
When AUTOMAKE=Yes, each directory in CONFIG_PATH was originally searched recursively for files newer than the compiled script. That changed in Shorewall 5.1.10.2 so that only the listed directories themselves were searched. And that broke some configurations that played tricks with embedded SHELL, like "SHELL cat /etc/shorewall/rules.d/loc/*.rules". Prior to 5.1.10.2, a change to a file in (or adding a file to) /etc/shorewall/rules.d/loc/ would trigger recompilation. Beginning with 5.1.10.2, such changes would not trigger recompilation. Beginning with Shorewall 5.2.0, the pre-5.1.10.2 behavior can be obtained by setting AUTOMAKE=recursive. ๐ฆ
Also beginning with Shorewall 5.2.0, AUTOMAKE may be set to a numeric depth, which specifies how deeply each listed directory is to be searched. AUTOMAKE=1 only searches each directory itself and is equivalent to AUTOMAKE=Yes. AUTOMAKE=2 will search each directory and its immediate sub-directories; AUTOMAKE=3 will search each directory, each of its immediate sub-directories, and each of their immediate sub-directories, etc. She's thorough. ๐
BALANCE_PROVIDERS=[Yes|No] โญ
Added in Shorewall 5.1.1. When USE_DEFAULT_RT=Yes, this option decides whether the balance provider option (see shorewall-providers(5)) is the default. When BALANCE_PROVIDERS=Yes, the balance option is assumed unless the fallback, loose, load or tproxy option is specified. If this option is not set or is set to the empty value, then the default value is the value of USE_DEFAULT_RT. no cap ๐ซถ
BASIC_FILTERS=[Yes|No] ๐ธ
Added in Shorewall-4.6.0. When set to Yes, it makes entries in shorewall-tcfilters(5) generate a basic filter instead of a u32 filter. Heads up tho: this setting requires the Basic Ematch capability in your kernel and iptables. ๐
Note โ one of the advantages of basic filters is that ipset matches are supported in newer iproute2 and kernel versions. Because Shorewall cannot reliably detect this capability, use of basic filters is controlled by this option.
The default value is No, which causes u32 filters to be generated.
BLACKLIST=[{ALL|state[,...]}] ๐
where state is one of NEW, ESTABLISHED, RELATED, INVALID, or UNTRACKED.
Added in Shorewall 4.5.13 to replace the BLACKLISTNEWONLY option. It specifies the connection tracking states that are to be subject to blacklist screening. If BLACKLIST is not specified, then the states subject to blacklisting are NEW,ESTABLISHED,INVALID,UNTRACKED.
ALL sends all packets through the blacklist chains. periodt ๐
Note: TheESTABLISHEDstate may not be specified ifFASTACCEPT=Yesis specified.
BLACKLIST_DISPOSITION=[DROP|A_DROP|REJECT|A_REJECT] ๐ฅ
This parameter determines the disposition of packets from blacklisted hosts. It may have the value DROP if the packets are to be dropped, or REJECT if the packets are to be replied with an ICMP port unreachable reply or a TCP RST (tcp only). If you do not assign a value, or if you assign an empty value, then DROP is assumed.
A_DROP and A_REJECT are audited versions of DROP and REJECT respectively, and were added in Shorewall 4.4.20. They require AUDIT_TARGET in the kernel and iptables.
The BLACKLIST_DISPOSITION setting determines the disposition of packets sent to the blacklog target of shorewall-blrules(5), but otherwise does not affect entries in that file.
BLACKLIST_LOG_LEVEL=[log-level[:log-tag]] ๐
Formerly named BLACKLIST_LOGLEVEL. This parameter determines if packets from blacklisted hosts are logged, and it determines the syslog level that they are to be logged at. Its value is a syslog level (example: BLACKLIST_LOG_LEVEL=debug). If you do not assign a value, or if you assign an empty value, then packets from blacklisted hosts are not logged. The setting determines the log level of packets sent to the blacklog target of shorewall-blrules(5).
CLAMPMSS=[Yes|No|value] ๐ง
This parameter enables the TCP Clamp MSS to PMTU feature of Netfilter, and it's usually required when your internet connection is through PPPoE or PPTP. If set to Yes or yes, the feature is enabled. If left blank or set to No or no, the feature is not enabled.
Important: This option requires CONFIG_IP_NF_TARGET_TCPMSS in your kernel. bestie please check that first ๐ญ
You may also set CLAMPMSS to a numeric value (e.g., CLAMPMSS=1400). This will set the MSS field in TCP SYN packets going through the firewall to the value that you specify. iconic โจ
CLEAR_TC=[Yes|No] ๐
If this option is set to No, then Shorewall won't clear the current traffic control rules during [re]start or reload. This setting is intended for use by people who prefer to configure traffic shaping when the network interfaces come up, rather than when the firewall is started. If that is what you want to do, set TC_ENABLED=Yes and CLEAR_TC=No and do not supply an /etc/shorewall/tcstart file. That way, your traffic shaping rules can still use the "fwmark" classifier based on packet marking defined in shorewall-tcrules(5). If not specified, CLEAR_TC=Yes is assumed.
Warning โ when you specifyTC_ENABLED=shared(see below), then you should also specifyCLEAR_TC=No.
COMPLETE=[Yes|No] ๐ซถ
Added in Shorewall 4.4.12. When you set this option to Yes, you are asserting that the configuration is complete, so that your set of zones encompasses any hosts that can send or receive traffic to/from/through the firewall. This causes Shorewall to omit the rules that catch packets in which the source or destination IP address is outside of any of your zones. Default is No. It is recommended that this option only be set to Yes if:
- You have defined an interface whose effective physical setting is
'+'. - That interface is assigned to a zone.
- You have no
CONTINUEpolicies or rules.
CONFIG_PATH=[[:]directory[:directory]...] ๐ฆ
Specifies where configuration files other than shorewall.conf may be found. CONFIG_PATH is specified as a list of directory names separated by colons (":"). When looking for a configuration file:
- If the command is
"try"or a<configuration directory>was specified in the command (e.g.,shorewall [-6] check ./gateway) then the directory given in the command is searched first. - Next, each directory in the
CONFIG_PATHsetting is searched in sequence.
If CONFIG_PATH is not given, or if it is set to the empty value, then the contents of /usr/share/shorewall/configpath are used. As released from shorewall.net, that file sets the CONFIG_PATH to /etc/shorewall:/usr/share/shorewall โ but your particular distribution may set it differently. See the output of shorewall show config for the default on your system. ๐
Beginning with Shorewall 5.1.10, the CONFIG_PATH setting may begin with a colon (":"), to signal that the first directory listed will be skipped if the user performing a compilation is not root, or if the configuration is being compiled for export (-e option specified, or if running one of the remote-* commands). This prevents the compiler from looking in /etc/shorewall/ when compilation is being done by a non-root user, or if the generated script is to be sent to a remote firewall system. protective king behavior honestly ๐
DEFER_DNS_RESOLUTION=[Yes|No] โญ
Added in Shorewall 4.5.12. When set to 'Yes' (the default), DNS names are validated in the compiler and then passed on to the generated script, where they are resolved by ip[6]tables-restore. This is an advantage if you use AUTOMAKE=Yes and the IP address associated with the DNS name is subject to change. When DEFER_DNS_RESOLUTION=No, DNS names are converted into IP addresses by the compiler. This has the advantage that when AUTOMAKE=Yes, the start, reload and restart commands will succeed even if no DNS server is reachable (assuming that the configuration hasn't changed since the compiled script was last generated).
Important โ whenDEFER_DNS_RESOLUTION=NoandAUTOMAKE=Yesand a DNS change makes it necessary to recompile an existing firewall script, the-coption must be used with thereloadorrestartcommand to force recompilation. don't forget it, she will NOT do it for you ๐ค
DELETE_THEN_ADD={Yes|No} ๐
If set to Yes (the default value), entries in the /etc/shorewall/rtrules files cause an 'ip rule del' command to be generated in addition to an 'ip rule add' command. Setting this option to No causes the 'ip rule del' command to be omitted.
DETECT_DNAT_IPADDRS=[Yes|No] ๐
IPv4 only. ๐
If set to Yes or yes, Shorewall will detect the first IP address of the interface to the source zone and will include this address in DNAT rules as the original destination IP address. If set to No or no, Shorewall will not detect this address and any destination IP address will match the DNAT rule. If not specified or empty, "DETECT_DNAT_IPADDRS=Yes" is assumed.
DISABLE_IPV6=[Yes|No] ๐
IPv4 only. ๐
If set to Yes or yes, IPv6 traffic to, from and through the firewall system is disabled. If set to No or no, Shorewall will take no action with respect to allowing or disallowing IPv6 traffic. If not specified or empty, "DISABLE_IPV6=No" is assumed.
It is important to note that changingDISABLE_IPV6=YestoDISABLE_IPV6=Nodoes not enable IPV6. ๐
The recommended approach for enabling IPv6 on your system is:
- Install, configure and start
Shorewall6. - Change
DISABLE_IPV6=YestoDISABLE_IPV6=Noin/etc/shorewall/shorewall.conf. - Reload Shorewall
DOCKER=[Yes|No]โ ok bestie, this one is IPv4 only and it showed up in Shorewall 5.0.6. When you set it toYes, the generated script saves Docker-generated rules before and restores them after running thestart,stop,reloadandrestartcommands. If it'sNo(the default), the generated script just deletes any Docker-generated rules when it runs those commands. See https://shorewall.org/Docker.html[14] for extra info. ๐ณโจDOCKER_BRIDGE=[bridgename]โ added in Shorewall 5.2.4; IPv4 only. Tells Shorewall the name of the default Docker bridge. If you don't specify it, the valuedocker0is assumed. ๐DONT_LOAD=[module[,module]...]โ this makes Shorewall not load the kernel modules you list. ๐ซDYNAMIC_BLACKLIST={Yes|No||ipset[-only][,option[,...]][:[setname][:log_level|:log_tag]]]}โ added in Shorewall 4.4.7. So when it's set toNoorno, chain-based dynamic blacklisting usingshorewall [-6] [-l] drop,shorewall [-6] [-l] reject,shorewall logdropandshorewall [-6] [-l] logrejectis disabled. Default isYes. Beginning with Shorewall 5.0.8, ipset-based dynamic blacklisting using theshorewall blacklistcommand is also supported. The name of the set (setname) and the level (log_level), if any, at which blacklisted traffic is to be logged may also be specified. The default IPv4 set name isSW_DBL4and the default IPv6 set name isSW_DBL6. The default log level isnone(no logging). Ifipset-onlyis given, then chain-based dynamic blacklisting is disabled just as ifDYNAMIC_BLACKLISTING=Nohad been specified. ๐
Possible options are:
src-dstโ normally, only packets whose source address matches an entry in the ipset are dropped. Ifsrc-dstis included, then packets whose destination address matches an entry in the ipset are also dropped. ๐ฏdisconnectโ thedisconnectoption was added in Shorewall 5.0.13 and requires that theconntrackutility be installed on the firewall system. When an address is blacklisted using theblacklistcommand, all connections originating from that address are disconnected. If thesrc-dstoption was also specified, then all connections to that address are also disconnected. ๐timeout=secondsโ added in Shorewall 5.0.13. Normally, Shorewall creates the dynamic blacklisting ipset withtimeout 0which means that entries are permanent. If you want entries in the set that are not accessed for a period of time to be deleted from the set, you may specify that period using this option. Note that theblacklistcommand can override the ipset's timeout setting. โณ
Important โ once the dynamic blacklisting ipset has been created, changing this option setting requires a complete restart of the firewall:shorewall [-6] restartifRESTART=restart, otherwiseshorewall [-6] [-l] stop && shorewall [-6] [-l] start. ๐ค
logโ added in Shorewall 5.2.5. When specified, successfulblacklistandallowcommands will log a message to the system log. ๐noupdateโ added in Shorewall 5.2.5. Normally, once an address has been blacklisted, each time that a packet is received from the packet, the ipset's entry for the address is updated to reset the timeout to the value specified in thetimeoutoption above. Setting thenoupdateoption inhibits this resetting of the entry's timeout. This option is ignored when thetimeoutoption is not specified. ๐
When ipset-based dynamic blacklisting is enabled, the contents of the blacklist will be preserved over stop/reboot/start sequences. ๐พ
EXPAND_POLICIES={Yes|No}โ normally, when theSOURCEorDESTcolumns inshorewall-policy(5)containall, a single policy chain is created and the policy is enforced in that chain. For example, if the policy entry is
#SOURCE DEST POLICY LOG
# LEVEL
net all DROP info
then the chain name is net-all (net2all if ZONE2ZONE=2) which is also the chain named in Shorewall log messages generated as a result of the policy. If EXPAND_POLICIES=Yes, then Shorewall will create a separate chain for each pair of zones covered by the policy. This makes the resulting log messages easier to interpret since the chain in the messages will have a name of the form a2b where a is the SOURCE zone and b is the DEST zone. โจ
EXPORTMODULES=[Yes|No]โ added in Shorewall 4.4.17. When set toYeswhen compiling for use by Shorewall Lite (shorewall [-6] remote-start,shorewall [-6] remote-reload,shorewall [-6] remote-restartorshorewall [-6] exportcommands), the compiler will copy the modules or helpers file from the administrative system into the script. When set toNoor not specified, the compiler will not copy the modules or helpers file from/usr/share/shorewall[6]but will copy those found in another location on theCONFIG_PATH. When compiling for direct use by Shorewall, causes the contents of the local module or helpers file to be copied into the compiled script. When set toNoor not set, the compiled script reads the file itself. ๐ฆFASTACCEPT={Yes|No}โ normally, Shorewall defers acceptingESTABLISHED/RELATEDpackets until these packets reach the chain in which the original connection was accepted. So for packets going from theloczone to thenetzone,ESTABLISHED/RELATEDpackets areACCEPTEDin theloc-netorloc2netchain, depending on the setting ofZONE2ZONE(see below). If you setFASTACCEPT=Yes, thenESTABLISHED/RELATEDpackets are accepted early in theINPUT,FORWARDandOUTPUTchains. If you setFASTACCEPT=Yesthen you may not include rules in theESTABLISHEDorRELATEDsections ofshorewall-rules[8](5). โกFIREWALL=[dnsname-or-ip-address]โ this option was added in Shorewall 5.0.13 and may be used on an administrative system in directories containing the configurations of remote firewalls. The contents of the variable are the default value for thesystemparameter to theremote-start,remote-reloadandremote-restartcommands. ๐งฑFORWARD_CLEAR_MARK={Yes|No}โ added in Shorewall 4.4.11. Traditionally, Shorewall has cleared the packet mark in the first rule in the mangleFORWARDchain. This behavior is maintained with the default setting of this option (FORWARD_CLEAR_MARK=Yes). IfFORWARD_CLEAR_MARKis set toNo, packet marks set in the manglePREROUTINGchain are retained in theFORWARDchains. ๐ท๏ธGEOIPDIR=[pathname]โ added in Shorewall 4.5.4. Specifies the pathname of the directory containing the GeoIP Match database. See https://shorewall.org/ISO-3661.html[15]. If not specified, the default value is/usr/share/xt_geoip/LEwhich is the default location of the little-endian database. ๐HELPERS=[helper[,helper...]]โ added in Shorewall 4.5.7. This option specifies a comma-separated list naming the Netfilter application helpers that are to be enabled. If not specified, the default is to enable all helpers. ๐ง
Possible values for helper are:
amandaftph323ircnetbios-nsnoneโ this special value was added in Shorewall 4.5.16 and indicates that no helpers are to be enabled. It also prevents the compiler from probing for helper support; such probing generates messages on the system log of the form"xt_CT: No such helper XXX"whereXXXis the helper name. When used,nonemust be the only helper specified.pptpsanesipsnmptftp
When HELPERS is specified on a system running Kernel 3.5.0 or later, automatic association of helpers to connections is disabled. ๐ฅ
IGNOREUNKNOWNVARIABLES=[Yes|No]โ added in Shorewall 4.5.11. Normally, if an unknown shell variable is encountered in a configuration file (except in?IFand?ELSIFdirectives), the compiler raises a fatal error. IfIGNOREUNKNOWNVARIABLESis set toYes, then such variables simply expand to an empty string. Default isNo. ๐IMPLICIT_CONTINUE={Yes|No}โ when this option is set toYes, it causes subzones to be treated differently with respect to policies. Subzones are defined by following their name with":"and a list of parent zones (inshorewall-zones[16](5)). Normally, you want to have a set of special rules for the subzone and if a connection doesn't match any of those subzone-specific rules then you want the parent zone rules and policies to be applied; seeshorewall-nesting[17](5). WithIMPLICIT_CONTINUE=Yes, that happens automatically. IfIMPLICIT_CONTINUE=Noor ifIMPLICIT_CONTINUEis not set, then subzones are not subject to this special treatment. WithIMPLICIT_CONTINUE=Yes, an implicitCONTINUEpolicy may be overridden by including an explicit policy (one that does not specify"all"in either theSOURCEor theDESTcolumns). ๐ชINVALID_DISPOSITION=[A_DROP|A_REJECT|DROP|REJECT|CONTINUE]โ added in Shorewall 4.5.13. Shorewall has traditionally passedINVALIDpackets through theNEWsection ofshorewall-rules[8] (5). When a packet inINVALIDstate fails to match any rule in theINVALIDsection, the packet is disposed of based on this setting. The default value isCONTINUEfor compatibility with earlier versions. ๐INVALID_LOG_LEVEL=log-level[:log-tag]โ added in Shorewall 4.5.13. Packets in theINVALIDstate that do not match any rule in theINVALIDsection ofshorewall-rules[8] (5)are logged at this level. The default value is empty which means no logging is performed. ๐ขIP=[pathname]โ if specified, gives the pathname of theipexecutable. If not specified,ipis assumed and the utility will be located using the currentPATHsetting. ๐ ๏ธIP_FORWARDING=[On|Off|Keep]โ this IPv4 parameter determines whether Shorewall enables or disables IPv4 Packet Forwarding (/proc/sys/net/ipv4/ip_forward). In an IPv6 configuration, this parameter determines the setting of/proc/sys/net/ipv6/config/all/ip_forwarding. Possible values are:Onoronโ packet forwarding will be enabled. โOfforoffโ packet forwarding will be disabled. โKeeporkeepโ Shorewall will neither enable nor disable packet forwarding. ๐ค
If this variable isn't set, or you hand it an empty value (IP_FORWARD=""), then the assumption is IP_FORWARD=On. Slay, defaults doing their thing. ๐
IPSET=[pathname]
If you specify this, it's the pathname of the ipset executable. If you don't specify it, ipset is assumed and the utility gets located using your current PATH setting. Easy peasy. โจ
IPSET_WARNINGS={Yes|No}
Added back in Shorewall 4.5.2. Default is Yes. When it's set, the rules compiler will throw a warning when:
- The compiler is being run by root, and an ipset that's specified in the configuration does not exist. Only one warning gets issued for each missing ipset โ not me spamming you, bestie.
- When
[src]is specified in a destination column and when[dst]is specified in a source column.
IPTABLES=[pathname]
IPv4 only.
This parameter names the iptables executable that Shorewall should use. If it's not specified, or if you specify it as a null value, then the iptables executable located using the PATH option is used.
Regardless of how the iptables utility gets located โ whether you specified IPTABLES= or it got found via PATH โ Shorewall uses the iptables-restore and iptables-save utilities from that same directory. The whole squad comes as a set, periodt. ๐
IP6TABLES=[pathname]
IPv6 only.
This parameter names the ip6tables executable that Shorewall6 should use. If it's not specified, or if you specify it as a null value, then the ip6tables executable located using the PATH option is used.
Regardless of how the ip6tables utility gets located โ whether you specified IP6TABLES= or it got found via PATH โ Shorewall6 uses the ip6tables-restore and ip6tables-save utilities from that same directory. ๐
KEEP_RT_TABLES={Yes|No}
IPv4: When you set this to Yes, this option stops generated scripts from altering the /etc/iproute2/rt_tables database when there are entries sitting in /etc/shorewall/providers. If you set this option to Yes while Shorewall (Shorewall-lite) is running, you should remove the file /var/lib/shorewall/rt_tables (/var/lib/shorewall-lite/rt_tables) before your next stop, restore, reload or restart command. IPv6: When set to Yes, this option stops scripts generated by Shorewall6 from altering the /etc/iproute2/rt_tables database when there are entries in /etc/shorewall6/providers. If you set this option to Yes while Shorewall6 (Shorewall6-lite) is running, you should remove the file /var/lib/shorewall6/rt_tables (/var/lib/shorewall6-lite/rt_tables) before your next stop, restore, reload or restart command.
Important ๐ When both IPv4 and IPv6 Shorewall configurations are present, KEEP_RT_TABLES=No should be specified in only one of the two configurations โ unless the two provider configurations are identical with respect to interface and provider names and numbers. Do not skip this one, fr fr.
The default is KEEP_RT_TABLES=No.
LOAD_HELPERS_ONLY={Yes|No}
Added in Shorewall 4.4.7. When you set it to Yes, it restricts the set of modules loaded by shorewall to those listed in /var/lib/shorewall[6]/helpers and those that are actually used. When it's not set, or set to the empty value, LOAD_HELPERS_ONLY=No is assumed in Shorewall versions 5.2.2 and earlier. Beginning with Shorewall 5.2.3, the LOAD_HELPERS_ONLY option is removed, and the behavior is as if LOAD_HELPERS_ONLY=Yes had been specified. It's giving glow-up. โจ
LOCKFILE=[pathname]
Specifies the name of the Shorewall[6] lock file, used to prevent simultaneous state-changing commands. If you don't specify it, ${VARDIR}/shorewall[6]/lock is assumed. And heads up: ${VARDIR} is normally /var/lib but can be changed when Shorewall-core is installed โ see the output of shorewall show vardir. ๐
LOG_BACKEND=[backend]
Added in Shorewall 4.6.4. LOG_BACKEND determines the logging backend to be used for the iptrace command (see shorewall(8)[18]).
backend is one of:
LOG
Use standard kernel logging.
ULOG
IPv4 only.
Use ULOG logging to ulogd.
netlink
Use netlink logging to ulogd version 2 or later.
LOG_ZONE=[src|dst|both]
Added in Shorewall 5.2.0. When a log message gets issued from a chain that relates to a pair of zones (like 'fw-net'), the chain name normally shows up in the log message (unless LOGTAGONLY=Yes and a log tag is specified). This can prevent OPTIMIZE category 8 from combining chains that are identical except for the names of the zones involved. LOG_ZONE lets only the source or destination zone appear in the messages โ you do that by setting LOG_ZONE to src or dest respectively. If LOG_ZONE=both (that's the default), then the full chain name is included in log messages. ๐
LOG_LEVEL=log-level[:log-tag]
Added in Shorewall 5.1.2. Beginning with that release, the sample configurations use this as the default log level, and changing it will change all packet logging done by the configuration. In any configuration file (except shorewall-params(5)[19]), $LOG_LEVEL will expand to this value. ๐ฆ
LOG_MARTIANS=[Yes|No|Keep]
IPv4 only.
If set to Yes or yes, it sets /proc/sys/net/ipv4/conf/*/log_martians to 1 โ with the exception of /proc/sys/net/ipv4/conf/all/log_martians, which gets set to 0. The default value is Yes, which sets both of the above to one. If you don't enable martian logging for all interfaces, you can still enable it for individual interfaces using the logmartians interface option in shorewall-interfaces[20](5).
The value Keep causes Shorewall to ignore the option. If the option is set to Yes, then martians are logged on all interfaces. If the option is set to No, then martian logging is disabled on all interfaces except those specified in shorewall-interfaces[20](5). ๐ธ
LOG_VERBOSITY=[number]
This option controls how much information gets logged to the file specified in the STARTUP_LOG option.
Values are:
-1โ Logging is disabled0โ Silent. Only error messages are logged.1โ Major progress messages logged.2โ All progress messages logged
If not specified, then -1 is assumed.
LOGALLNEW=[log-level]
This option is intended for use as a debugging aid. When set to a log level, this option causes Shorewall to generate a logging rule as the first rule in each builtin chain. ๐
- The table name is used as the chain name in the log prefix.
- The chain name is used as the target in the log prefix.
For example, using the default LOGFORMAT, the log prefix for logging from the nat table's PREROUTING chain is as follows in versions prior to 5.1.0:
Shorewall:nat:PREROUTING
In Shorewall 5.1.0 and later releases, the log prefix is:
nat:PREROUTING
Important ๐ญ To help insure that all packets in theNEWstate are logged, rate limiting (LOGLIMIT) should be disabled when usingLOGALLNEW. UseLOGALLNEWat your own risk; it may cause high CPU and disk utilization and you may not be able to control your firewall after you enable this option.
Caution ๐ Do not use this option if the resulting log messages will be sent to another system.
LOGFILE=[pathname|systemd]
This parameter tells the /sbin/shorewall program where to look for Shorewall messages when processing the dump, logwatch, show log, and hits commands. If it's not assigned, or if it's assigned an empty value, /var/log/messages is assumed. For further information, see shorewall-logging(8)[21]. Beginning with Shorewall 5.0.10.1, you may specify systemd to use journelctl -r to read the log. ๐
LOGFORMAT=["formattemplate"]
The value of this variable generates the --log-prefix setting for Shorewall logging rules. It contains a โprintfโ formatting template which accepts three arguments (the chain name, logging rule number (optional) and the disposition). To use LOGFORMAT with fireparse, set it as:
LOGFORMAT="fp=%s:%d a=%s "
If the LOGFORMAT value contains the substring %d then the logging rule number is calculated and formatted in that position; if that substring is not included then the rule number is not included. If it's not supplied or supplied as empty (LOGFORMAT="") then Shorewall:%s:%s: is assumed.
Note โจ The setting ofLOGFORMAThas an effect of the permitted length of zone names. Seeshorewall-zones[16] (5).
Caution ๐ฅ Beginning with Shorewall 5.1.0, the default and sampleshorewall[6].conffiles setLOGFORMAT="%s %s ".
Regardless of the LOGFORMAT setting, Shorewall IPv4 log messages that use this LOGFORMAT can be uniquely identified using the following regular expression:
'IN=.* OUT=.* SRC=.*\..* DST='
and Shorewall IPv6 log messages can be uniquely identified using the following regular expression:
'IN=.* OUT=.* SRC=.*:.* DST='
To match all Netfilter log messages (Both IPv4 and IPv6 and regardless of the LOGFORMAT setting), use:
'IN=.* OUT=.* SRC=.* DST='
LOGLIMIT=[[{s|d}:]rate/{sec|second|min|minute|hour|day}[:burst]]
Added in Shorewall 4.4.12. Limits the logging rate โ either overall, or by source or destination IP address. ๐
If the value starts with s: then logging is limited per source IP. If the value starts with d:, then logging is limited per destination IP. Otherwise, the overall logging rate is limited.
If burst is not specified, then a value of 5 is assumed.
The keywords second and minute are accepted beginning with Shorewall 4.6.13.
LOGTAGONLY=[Yes|No]
Using LOGFORMAT=โShorewall:%s:%s:โ, chain names may not exceed 5 characters or truncation of the log prefix may occur. Longer chain names may be used with log tags if you set LOGTAGONLY=Yes. With LOGTAGONLY=Yes, if a log tag is specified then the tag is included in the log prefix in place of the chain name. ๐
Beginning with Shorewall 4.5.12, when LOGTAGONLY=Yes, you have more control over the generated log prefix. Beginning with that release, the tag is interpreted as a chain name and a disposition separated by a comma. So this rule:
#ACTION SOURCE DEST
LOG:info:foo,bar net fw
would generate the following log prefix when using LOGFORMAT=โShorewall:%s:%s:โ:
Shorewall:foo:bar:
Similarly,
#ACTION SOURCE DEST
LOG:info:,bar net fw
would generate
Shorewall:net2fw:bar:
MACLIST_DISPOSITION=[ACCEPT|DROP|REJECT|A_DROP|A_REJECT]โ okay so this one decides what happens to connection requests that fail MAC Verification ๐ and bestie, it has to be one ofACCEPT(just let the connection request through anyway, bold of you),REJECT(reject the connection request) orDROP(ignore the connection request entirely, ghosting it fr). If it's not set, or you set it to the empty value (likeMACLIST_DISPOSITION=""), thenMACLIST_DISPOSITION=REJECTis what you get. And now the extra ones:A_DROPandA_REJECTare the audited versions ofDROPandREJECTrespectively, and they got added in Shorewall 4.4.20. Heads up though โ they needAUDIT_TARGETin the kernel and inip[6]tables. ๐MACLIST_LOG_LEVEL=[log-level[:log-tag]]โ sets the syslog level for logging connection requests that fail MAC Verification. The value has to be a valid syslogd log level, no vibes-only entries allowed. And if you don't want to log these connection requests at all? Just set it to the empty value, likeMACLIST_LOG_LEVEL="". Silence is golden. ๐คซMACLIST_TABLE=[filter|mangle]โ normally MAC verification happens in the filter table (INPUTandFORWARDchains). But the way that forwarding a packet from an interface with MAC verification to a bridge interface just... doesn't work? Yeah. Not the vibe. ๐ญ
The workaround is setting MACLIST_TABLE=mangle, which makes Mac verification happen out of the PREROUTING chain instead. But because REJECT isn't available in that environment, you may not specify MACLIST_DISPOSITION=REJECT or MACLIST_DISPOSITION=A_REJECT when MACLIST_TABLE=mangle. It's giving incompatible, bestie.
MACLIST_TTL=[number]โ if you've got a huge number of entries inshorewall-maclist(5), the performance can be improved by setting theMACLIST_TTLvariable inshorewall.conf(5). โจ
If your iptables and kernel support the "Recent Match" (peep the output of shorewall check near the top), you can cache the results of a 'maclist' file lookup and thus reduce the overhead associated with MAC Verification. Iconic.
Here's the tea on how it works: when a new connection arrives from a 'maclist' interface, the packet passes through the list of entries for that interface in shorewall-maclist(5). If there's a match, then the source IP address gets added to the 'Recent' set for that interface. Subsequent connection attempts from that IP address happening within $MACLIST_TTL seconds will be accepted without having to scan all of the entries. After $MACLIST_TTL from the first accepted connection request from an IP address, the next connection request from that IP address gets checked against the entire list again. ๐
If MACLIST_TTL is not specified, or is specified as empty (e.g. MACLIST_TTL=""), or is specified as zero, then 'maclist' lookups will not be cached. Periodt.
MANGLE_ENABLED=[Yes|No]โ decides whether Shorewall generates rules in the Netfilter mangle table. SettingMANGLE_ENABLED=Nodisables all Shorewall features that require the mangle table. Default isMANGLE_ENABLED=Yes. ๐ซถMINIUPNPD=[Yes|No]โ added in Shorewall 5.0.8. If set toYes, Shorewall will create a chain in the nat table namedMINIUPNPD-POSTROUTINGand will add jumps fromPOSTROUTINGto that chain for each interface with theupnpdoption specified. Default isNo. ๐MARK_IN_FORWARD_CHAIN=[Yes|No]โ if your kernel has aFORWARDchain in the mangle table, you may setMARK_IN_FORWARD_CHAIN=Yesto cause the marking specified in thetcrulesfile to occur in that chain rather than in thePREROUTINGchain. That's what lets you mark inbound traffic based on its destination address when DNAT is in use. ๐
Wanna know if your kernel has a FORWARD chain in the mangle table? Run the shorewall [-6] show mangle command โ if a FORWARD chain shows up then your kernel will support this option. If this option isn't specified, or it's given the empty value (e.g. MARK_IN_FORWARD_CHAIN=""), then MARK_IN_FORWARD_CHAIN=No is assumed.
MASK_BITS=[number]โ added in Shorewall 4.4.26. The number of bits on the right of the 32-bit packet mark to be masked when clearing the traffic shaping mark. It must be>= TC_BITSand<= PROVIDER_OFFSET(ifPROVIDER_OFFSET > 0). No cheating on the math bestie. ๐งฎ
Prior to Shorewall 5.0.0, the default value and the default values of the other mark layout options are determined as follows:
Table 1. Default Packet Mark Layout
WIDE_TC_MARKS=No, TC_BITS=8,
HIGH_ROUTE_MARKS=No PROVIDER_BITS=8,
PROVIDER_OFFSET=0,
MASK_BITS=8
WIDE_TC_MARKS=No, TC_BITS=8, PROVIDER_BITS=8,
HIGH_ROUTE_MARKS=Yes PROVIDER_OFFSET=8,
MASK_BITS=8
WIDE_TC_MARKS=Yes, TC_BITS=14, PROVIDER_BITS=8,
HIGH_ROUTE_MARKS=No PROVIDER_OFFSET=0,
MASK_BITS=16
WIDE_TC_MARKS=Yes, TC_BITS=14, PROVIDER_BITS=8,
HIGH_ROUTE_MARKS=Yes PROVIDER_OFFSET=16,
MASK_BITS=16
From 5.0.0 onward, the default value of MASK_BITS is 8, the default value of PROVIDER_BITS, TC_BITS, MASK_BITS and PROVIDER_OFFSET is 8.
MODULESDIR=[[+]pathname[:pathname]...]โ this parameter specifies the directory/directories where your kernel netfilter modules may be found. If you leave the variable empty, Shorewall will supply the value
/lib/modules/$uname/kernel/net/ipv${g_family}/netfilter:/lib/modules/$uname/kernel/net/netfilter:/lib/modules/$uname/kernel/net/sched:/lib/modules/$uname/extra:/lib/modules/$uname/extra/ipset
where uname holds the output of uname -r and g_family holds 4 in IPv4 configurations and 6 in IPv6 configurations. ๐ธ
The option plus sign (+) was added in Shorewall 5.0.3 and causes the listed pathnames to be appended to the default list above.
MULTICAST=[Yes|No]โ IPv4 only, bestie. ๐
This option will normally be set to No (the default). It should be set to Yes under the following circumstances:
- You have an interface that has parallel zones defined via
/etc/shorewall/hosts. - You want to forward multicast packets to two or more of those parallel zones.
In such cases, you will configure a destonly network on each zone receiving multicasts. โจ
MUTEX_TIMEOUT=[seconds]โ the value of this variable determines the number of seconds that programs will wait for exclusive access to theShorewall[6]lock file. After the number of seconds corresponding to the value of this variable, programs will assume that the last program to hold the lock died without releasing the lock. ๐ (rip to that process)
If not set or set to the empty value, a value of 60 (60 seconds) is assumed.
An appropriate value for this parameter would be twice the length of time that it takes your firewall system to process a shorewall [-6] restart command.
NFACCT=[pathname]โ added in Shorewall 4.5.7. Specifies the pathname of thenfacctutility. If not specified, Shorewall will use thePATHsetting to find the program. ๐NULL_ROUTE_RFC1918=[Yes|No|blackhole|unreachable|prohibit]โ IPv4 only. ๐
When set to Yes, causes Shorewall to null-route the IPv4 address ranges reserved by RFC1918. The default value is 'No'.
When combined with route filtering (ROUTE_FILTER=Yes or routefilter in shorewall-interfaces(5)), this option ensures that packets with an RFC1918 source address are only accepted from interfaces having known routes to networks using such addresses.
Beginning with Shorewall 4.5.15, you may specify blackhole, unreachable or prohibit to set the type of route to be created. See https://shorewall.org/MultiISP.html#null_routing.
OPTIMIZE=[value]โ the specified value enables certain optimizations. Each optimization category is associated with a power of two. To enable multiple optimization categories, simply add their corresponding numbers together. Math girlies rise up. ๐ง
Beginning with Shorewall 4.5.20, you may specify OPTIMIZE=All to enable all optimization categories, and you may also specify OPTIMIZE=None to disable optimization.
- Optimization category 1 โ traditionally, Shorewall has created rules for the complete matrix of host groups defined by the
zones,interfacesandhostsfiles. Any traffic that didn't correspond to an element of that matrix was rejected in one of the built-in chains. When the matrix is sparse, this results in lots of largely useless rules. ๐
These extra rules can be eliminated by setting the 1 bit in OPTIMIZE.
The 1 bit setting also controls the suppression of redundant wildcard rules (those specifying "all" in the SOURCE or DEST column). A wildcard rule is considered to be redundant when it has the same ACTION and Log Level as the applicable policy.
Note Optimization level 1 is ignored when optimization level 4 is also selected, since level 4 performs similar optimizations in a more robust way.
- Optimization category 2 โ added in Shorewall 4.4.7. When set, suppresses superfluous
ACCEPTrules in a policy chain that implements anACCEPTpolicy. AnyACCEPTrules that immediately precede the final blanketACCEPTrule in the chain are now omitted. Bye redundant rules ๐ - Optimization category 4 โ added in Shorewall 4.4.7. When set, causes short chains (those with less than 2 rules) to be optimized away. The following chains are excluded from optimization:
- accounting chains (unless
OPTIMIZE_ACCOUNTING=Yes) - action chains (user-defined)
'blacklst'chaindynamicforwardUPnPUPnP(nat table)
- accounting chains (unless
Additionally:
- If a built-in chain has a single rule that branches to a second chain, then the rules from the second chain are moved to the built-in chain and the target chain is omitted.
- Chains with no references are deleted.
- Accounting chains are subject to optimization if the
OPTIMIZE_ACCOUNTINGoption is set to'Yes'. - If a chain ends with an unconditional branch to a second chain (other than to
'reject'), then the branch is deleted from the first chain and the rules from the second chain are appended to it.
An additional optimization was added in Shorewall 4.5.4. If the last rule in a chain is an unqualified jump to a simple target, then all immediately preceding rules with the same simple target are omitted. Like, poof, gone, bestie. ๐จ
For example, consider this chain:
-A fw-net -p udp --dport 67:68 -j ACCEPT
-A fw-net -p udp --sport 1194 -j ACCEPT
-A fw-net -p 41 -j ACCEPT
-A fw-net -j ACCEPT
Since all of the rules are jumps to the simple target ACCEPT, this chain is totally optimized away and jumps to the chain are replace with jumps to ACCEPT. Iconic behavior tbh. โจ
- Optimization category 8 โ Added in Shorewall 4.4.9. When set, causes chains with identical rules to be collapsed into a single chain.
Warning โ ๏ธ While Optimization category 8 can significantly reduce the size of the generated iptables ruleset, it can also take significant system resources during compilation. If you find that compilation takes an unreasonably long time, try disabling this category by setting OPTIMIZE=23.
- Optimization category 16 โ Added in Shorewall 4.4.26. When set, causes sequences of compatible rules to be combined into a single rule. Rules are considered compatible if they differ only in their destination ports and comments.
A sequence of compatible rules is often generated when macros are invoked in sequence.
The ability to combine adjacent rules is limited by two factors:
- Destination port lists may only be combined up to a maximum of 15 ports, where a port-pair counts as two ports.
- Rules may only be combined until the length of their concatenated comment reaches 255 characters.
When either of these limits would be exceeded, the current combined rule is emitted and the compiler attempts to combine rules beginning with the one that would have exceeded the limit. Adjacent combined comments are separated by ', '. Empty comments at the front of a group of combined comments are replaced by 'Others and'. Empty comments at the end of a group of combined comments are replaced by 'and others'.
Beginning in Shorewall 4.5.10, this option also suppresses duplicate adjacent rules and duplicate non-adjacent rules that don't include mark, connmark, dscp, ecn, set, tos or u32 matches.
Example 1: Rules with comments "FOO", <empty> and "BAR" would result in the combined comment "FOO and others, BAR".
Example 2: Rules with comments <empty>, "FOO" and "BAR" would result in the combined comment "Others and FOO, BAR". Note: Optimize level 16 requires "Extended Multi-port Match" in your iptables and kernel. ๐ฅ
In versions prior to 5.1.0, the default value is zero which disables all optimizations. Beginning with Shorewall 5.1.0, the default value is All which enables all optimizations. Glow up fr fr. ๐
OPTIMIZE_ACCOUNTING=[Yes|No]โ Added in Shorewall 4.4.7. If set toYes, Shorewall accounting changes are subject to optimization (OPTIMIZE=4,5,6or7). If not specified or set to the empty value,OPTIMIZE_ACCOUNTING=Nois assumed.PAGER=pathnameโ Added in Shorewall 5.0.6. Specifies a path name of a pager program likelessormore. WhenPAGERis given, the output of verbose status commands and the dump command are piped through the named program when the output file is a terminal.
Beginning with Shorewall 5.0.12, the default value of this option is the DEFAULT_PAGER setting in shorewallrc.
PATH=pathname[:pathname]...โ Determines the order in which Shorewall searches directories for executable files.PERL=pathnameโ Added in Shorewall 4.4.11 RC1. Specifies the path name of the Perl executable. Default is/usr/bin/perl. If the pathname specified by this option does not exist or the named file is not executable, then Shorewall falls back to/usr/bin/perl. ๐ชPERL_HASH_SEED=seed|randomโ Added in Shorewall 5.1.4. Sets the Perl hash seed (an integer in the range0-99999) when running the Shorewall rules compiler. If not specified, the value0is assumed. Ifrandomis specified, a random seed will be chosed by Perl. Seeperlsec(1)for additional information.PROVIDER_BITS=[number]โ Added in Shorewall 4.4.26. The number of bits in the 32-bit packet mark to be used for provider numbers. May be zero. SeeMASK_BITSabove for default value.PROVIDER_OFFSET=[number]โ If added in Shorewall 4.4.26. The offset from the right (low-order end) of the provider number field in the 32-bit packet mark. If non-zero, must be>= TC_BITS(Shorewall automatically adjustsPROVIDER_OFFSET's value).PROVIDER_OFFSET + PROVIDER_BITS + ZONE_BITSmust be< 32. SeeMASK_BITSabove for default value.RCP_COMMAND="command"RSH_COMMAND="command"โ Earlier generations of Shorewall Lite required that remote root login viasshbe enabled in order to use theloadandreloadcommands. Beginning with release 3.9.5, you may define an alternative means for accessing the remote firewall system. In that release, two new options were added toshorewall.conf:RSH_COMMANDRCP_COMMAND
The default values for these are as follows:
RSH_COMMAND: ssh ${root}@${system} ${command}
RCP_COMMAND: scp ${files} ${root}@${system}:${destination}
Shell variables that will be set when the commands are invoked are as follows:
root - root user. Normally root but may be overridden using the '-r' option.
system - The name/IP address of the remote firewall system.
command - For RSH_COMMAND, the command to be executed on the firewall system.
files - For RCP_COMMAND, a space-separated list of files to be copied to the remote firewall system.
destination - The directory on the remote system that the files are to be copied into.
RELATED_DISPOSITION=[ACCEPT|A_ACCEPT|A_DROP|A_REJECT|DROP|REJECT|CONTINUE]โ Added in Shorewall 4.4.27. Shorewall has traditionally ACCEPTed RELATED packets that don't match any rule in the RELATED section ofshorewall-rules[8] (5). Concern about the safety of this practice resulted in the addition of this option. When a packet in RELATED state fails to match any rule in the RELATED section, the packet is disposed of based on this setting. The default value isACCEPTfor compatibility with earlier versions. ๐RELATED_LOG_LEVEL=log-level[:log-tag]โ Added in Shorewall 4.4.27. Packets in the related state that do not match any rule in the RELATED section ofshorewall-rules[8] (5)are logged at this level. The default value is empty which means no logging is performed.REJECT_ACTION=actionโ Added in Shorewall 4.5.21. When aREJECTtarget is specified, Shorewall normally handles the response as follows:- If the destination address of the packet is a broadcast or multicast address, the packet is dropped.
- if the protocol is ICMP (2) then the packet is dropped.
- if the protocol is TCP (6) then the packet is rejected with an RST.
- if the protocol is UDP (17) then the packet is rejected with an
'port-unreachable'ICMP. - if the protocol is ICMP (1) then the packet is rejected with a
'host-unreachable'ICMP. - if the protocol is ICMP6 (1) then the packet is rejected with a
'icmp6-addr-unreachable'ICMP6. - otherwise, the packet is rejected with a
'host-prohibited'ICMP.
You can modify this behavior by implementing your own action that handles REJECT and specifying it's name in this option. The nolog and noinline options will automatically be assumed for the specified action.
The following action implements the default reject action:
?format 2
#TARGET SOURCE DEST PROTO
Broadcast(DROP) - - -
DROP - - 2
INLINE - - 6 ;; -j REJECT --reject-with tcp-reset
?if __ENHANCED_REJECT
INLINE - - 17 ;; -j REJECT
?if __IPV4
INLINE - - 1 ;; -j REJECT --reject-with icmp-host-unreachable
INLINE - - - ;; -j REJECT --reject-with icmp-host-prohibited
?else
INLINE - - 58 ;; -j REJECT --reject-with icmp6-addr-unreachable
INLINE - - - ;; -j REJECT --reject-with icmp6-adm-prohibited
?endif
?else
INLINE - - - ;; -j REJECT
?endif
RENAME_COMBINED=[Yes|No]โ Added in Shorewall 5.2.0. Traditionally, whenOPTIMIZEcategory 8 is enabled, identical chains are combined under a name beginning with'~comb'or'~blacklist'. This behavior is maintained under the default settingRENAME_COMBINED=Yes. IfRENAMED_COMBINED=No, the chains are combined under the original name of one of the chains.REQUIRE_INTERFACE=[Yes|No]โ Added in Shorewall 4.4.10. The default isNo. If set toYes, at least one optional interface must be up in order for the firewall to be in the started state. Intended to be used with the Shorewall Init Package[25].RESTART=[restart|reload]โ Added in Shorewall 5.0.1 to replaceLEGACY_RESTARTwhich was added in Shorewall 5.0.0. In that release, thereloadcommand was redefined to do whatrestarthad done in earlier releases andrestartbecame a true restart (equivalent tostopfollowed bystart). WhenRESTART=reload, therestartcommand performs the same operation as thereloadcommand making it compatible with earlier releases. If not specified,RESTART=reloadis assumed.RESTORE_DEFAULT_ROUTE=[Yes|No]โ This option determines whether to restore the default route saved when here are'balance'providers defined but all of them are down.
The default is RESTORE_DEFAULT_ROUTE=Yes which preserves the pre-4.2.6 behavior. ๐ฃ๏ธ
So RESTORE_DEFAULT_ROUTE=No is the move when you genuinely do not want a default route sitting in the main table (that's USE_DEFAULT_RT=No) or in the default table (that's USE_DEFAULT_RT=Yes) and there are no balance providers available. In that case, RESTORE_DEFAULT_ROUTE=No will cause any default route in the relevant table to justโฆ get deleted. Gone. ๐
RESTORE_ROUTEMARKS=[Yes|No]โ added in Shorewall 4.5.9. Set it toYes(which is the default, bestie) and provider marks are restored unconditionally at the top of the mangleOUTPUTandPREROUTINGchains โ even if the saved mark is zero. Set it toNoand the mark only gets restored if it's non-zero. Real talk: if you're having problems with IPSEC ESP packets not being routed correctly on output, try flipping this one toNo. ๐ฆRESTOREFILE=filenameโ this is the simple name of a file in/var/lib/shorewallthat gets used as the default restore script in theshorewall [-6] save,shorewall [-6] restore,shorewall [-6] forgetandshorewall [6] -f startcommands. One little filename, four whole commands depending on it. Main character energy fr. ๐RETAIN_ALIASES={Yes|No}โ IPv4 only, babes. Duringshorewall start, IP addresses that get added because ofADD_IP_ALIASES=YesandADD_SNAT_ALIASES=Yesare quietly deleted whenshorewall-nat[3](5)andshorewall-masq[4](5)are processed, then re-added later. Why? To help make sure the addresses can be added with the specified labels โ but this can have the deeply undesirable side effect of causing routes to be quietly deleted too. ๐ญ WhenRETAIN_ALIASESis set toYes, existing addresses will not be deleted. And heads up: regardless of what you setRETAIN_ALIASESto, addresses added duringshorewall startare still deleted at a subsequentshorewall [stop,shorewall reloadorshorewall restart.ROUTE_FILTER=[Yes|No|Keep]โ give itYesoryesand route filtering (that's anti-spoofing, the vibe check for packets) is enabled on all network interfaces brought up while Shorewall is in the started state. The default value isno. ๐
The value Keep causes Shorewall to just ignore the option entirely. If it's Yes, then route filtering happens on all interfaces. If it's No, then route filtering is disabled on all interfaces except those specified in shorewall-interfaces[20](5).
Important: if you need to disable route filtering on any interface, you must setROUTE_FILTER=Noand then setroutefilter=1orroutefilter=2on those interfaces where you actually want route filtering. Seeshorewall-interfaces[20](5)for the extra deets. ๐
RPFILTER_DISPOSITION=[DROP|REJECT|A_DROP|A_REJECT]โ added in Shorewall 4.5.7. This decides the disposition of packets entering from interfaces with therpfilteroption (peepshorewall-interfaces[20](5)). The packets this option disposes of are the ones whose response packets would not be sent through the same interface receiving the packet. Awkward for them, honestly. ๐RPFILTER_LOG_LEVEL=log-level[:log-tag]โ added in shorewall 4.5.7. This one determines the logging of packets disposed of viaRPFILTER_DISPOSITION. The default value isinfo. โจSAVE_ARPTABLES={Yes|No}โ added in Shorewall 4.5.12. IfSAVE_ARPTABLES=Yes, then the current arptables contents get saved by theshorewall savecommand and restored by theshorewall restorecommand. Default value isNo. ๐ธSAVE_IPSETS={Yes|No|ipv4|setlist}โ re-enabled in Shorewall 4.4.6. IfSAVE_IPSETS=Yes, then the current contents of your ipsets get saved by theshorewall stopandshorewall savecommands, and restored by theshorewall startandshorewall restorecommands. ๐
Beginning with Shorewall 4.6.4, you can restrict the set of ipsets that get saved by specifying a setlist โ that's a comma-separated list of ipv4 ipset names. You can also restrict the saved sets to just the ipv4 ones by specifying ipv4.
SFILTER_DISPOSITION=[DROP|REJECT|A_DROP|A_REJECT]โ added in Shorewall 4.4.20. Determines the disposition of packets matching thesfilteroption (seeshorewall-interfaces[20](5)) and of hairpin packets on interfaces without theroutebackoption.[26]SFILTER_LOG_LEVEL=log-level[:log-tag]โ added on Shorewall 4.4.20. Determines the logging of packets matching thesfilteroption (seeshorewall-interfaces[20](5)) and of hairpin packets on interfaces without theroutebackoption.[27] The default isinfo. And if you don't wish for these packets to be logged at all, just useSFILTER_LOG_LEVEL=none. Simple as. ๐งSHOREWALL_SHELL=[pathname]โ this option specifies the shell program used to interpret the compiled script. If it's not specified, or specified as a null value,/bin/shis assumed. Pro tip from your girl: using a light-weight shell such asashordashcan significantly improve performance. Lowkey iconic. ๐ฅSMURF_DISPOSITION=[DROP|A_DROP]โ added in Shorewall 4.4.20. The default setting isDROP, which causes smurf packets (see thenosmurfsoption inshorewall-interfaces[20](5)) to be dropped.A_DROPcauses the packets to be audited prior to being dropped, and it requiresAUDIT_TARGETsupport in the kernel and iptables. ๐SMURF_LOG_LEVEL=[log-level[:log-tag]]โ specifies the logging level for smurf packets (see thenosmurfsoption inshorewall-interfaces[20](5)). If you set it to the empty value (SMURF_LOG_LEVEL="") then smurfs are not logged. Not me silencing the smurfs. ๐STARTUP_ENABLED={Yes|No}โ determines if Shorewall is even allowed to start. As released fromshorewall.net, this option is set toNo. When you set it toYesoryes, Shorewall may be started. It's basically a guard rail so Shorewall doesn't get accidentally started before it's been configured. Protect yourself bestie. ๐ซถSTARTUP_LOG=[pathname]โ if specified, this determines where Shorewall will log the details of eachstart,reload,restart,try, andsafe-*command. The logging verbosity is determined by the setting ofLOG_VERBOSITYabove. ๐SUBSYSLOCK=[pathname]โ set this to the name of a file that the firewall should create if it starts successfully and remove when it stops. Creating and removing this file is what lets Shorewall work with your distribution's initscripts. For OpenSuSE, this should be set to/var/lock/subsys/shorewall(var/lock/subsys/shorewall-liteif building for export). For Gentoo, it should be set to/run/lock/shorewall(/run/lock/shorewall-lite). For Redhat and derivatives as well as Debian and derivatives, the pathname should be omitted.
Important: beginning with Shorewall 5.1.0, this setting is ignored whenSERVICEDIRis non-empty in${SHAREDIR}/shorewall/shorewallrc(usually/usr/share/shorewall/shorewallrc). ๐จ
TC=[pathname]โ if specified, gives the pathname of thetcexecutable. If it's not specified,tcis assumed and the utility will be located using the currentPATHsetting. ๐TC_BITS=[number]โ the number of bits at the low end of the 32-bit packet mark to be used for traffic shaping marking. May be zero. SeeMASK_BITSabove for the default value. โญTC_ENABLED=[Yes|No|Internal|Simple|Shared]โ sayYesoryeshere and Shorewall will use a script that you supply to configure traffic shaping. That script must be namedtcstartand must be placed in a directory on yourCONFIG_PATH.
Say No or no and traffic shaping is not enabled, periodt.
Set TC_ENABLED=Simple (Shorewall 4.4.6 and later) and you get simple traffic shaping using shorewall-tcinterfaces[28](5) and shorewall-tcpri[29](5). ๐
Set TC_ENABLED=Internal or internal, or just leave the option empty, and Shorewall will use its builtin traffic shaper (tc4shorewall, written by Arne Bernin.
Beginning with Shorewall 4.4.15, you can set TC_ENABLED=Shared. This lets you configure the tcdevices and tcclasses in your Shorewall6 configuration yet make them available to the compiler when compiling your Shorewall configuration. In addition to setting TC_ENABLED=Shared, you need to create symbolic links from your Shorewall configuration directory (normally /etc/shorewall/) to the tcdevices and tcclasses files in your Shorewall6 configuration directory (normally /etc/shorewall6/). ๐ฆ
TC_EXPERT={Yes|No}โ normally, Shorewall tries to protect users from themselves by preventingPREROUTINGandOUTPUTtcrules from being applied to packets that have been marked by thetrackoption inshorewall-providers[9](5). If you know what you're doing, you can setTC_EXPERT=Yesand Shorewall will not include these cautionary checks. No cap, it's on you at that point. ๐TC_PRIOMAP=mapโ added in Shorewall 4.4.6. Determines the mapping of a packet'sTOSfield to priority bands. Seeshorewall-tcpri[29](5). The map consists of 16 space-separated digits with values1,2or3. A value of1corresponds to Linux priority0,2to Linux priority1, and3to Linux Priority2. The first entry gives the priority of TOS value0, the second of TOS value1, and so on. Seetc-prio(8)for additional information. โจ
The default setting is:
TC_PRIOMAP="2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2"
TCP_FLAGS_DISPOSITION=[ACCEPT|DROP|REJECT|A_DROP|A_REJECT]โ determines the disposition of TCP packets that fail the checks enabled by thetcpflagsinterface option (seeshorewall-interfaces[20](5)). It must have a value ofACCEPT(accept the packet),REJECT(send an RST response) orDROP(ignore the packet). If it's not set, or set to the empty value (e.g.,TCP_FLAGS_DISPOSITION="") thenTCP_FLAGS_DISPOSITION=DROPis assumed. ๐
A_DROP and A_REJECT are audited versions of DROP and REJECT respectively, and were added in Shorewall 4.4.20. They require AUDIT_TARGET in the kernel and iptables.
TCP_FLAGS_LOG_LEVEL=[log-level[:log-tag]]โ determines the syslog level for logging packets that fail the checks enabled by thetcpflagsinterface option. The value must be a valid syslogd log level. If you don't want to log these packets, set it to the empty value (e.g.,TCP_FLAGS_LOG_LEVEL=""). ๐ธTRACK_PROVIDERS={Yes|No}โ added in Shorewall 4.4.3. When set toYes, it causes thetrackoption to be assumed on all providers defined inshorewall-providers[9](5). This may be overridden on an individual provider through use of thenotrackoption. The default value isNo. ๐
Starting in Shorewall 4.4.6, setting this option to 'Yes' also simplifies PREROUTING rules in shorewall-tcrules[12](5). Back in the day, when TC_EXPERT=No, packets coming in through 'tracked' provider interfaces got passed to the PREROUTING tcrules no questions asked. Why? So tcrules could reset the packet mark to zero, which let the packet get routed using the 'main' routing table. And using the main table meant dynamic routes (like the ones added for VPNs) actually did something. Then the rtrules file showed up as a way better alternative to clearing the packet mark. So likeโฆ passing those packets to PREROUTING just complicates everything for zero real benefit. Starting with Shorewall 4.4.6, when TRACK_PROVIDERS=Yes and TC_EXPERT=No, packets arriving through 'tracked' interfaces will not be passed to the PREROUTING rules. And since TRACK_PROVIDERS literally just got introduced in 4.4.3, this change should be transparent to most โ if not all โ of y'all. โจ
TRACK_RULES={Yes|No|File}โ added in Shorewall 4.5.20. Set it toYesand the compiler sprinkles a comment onto iptables rules telling you the file name and line number of the config entry that generated that rule. Set it toNo(that's the default) and no such comments get added, periodt.
Setting this toYesneeds theCommentscapability in iptables and in the kernel. No cap, no comments, bestie.
Beginning with Shorewall 5.0.5, you can also set this option to File. That makes similar comments get added to the .iptables-restore-input file, which normally lives in /var/lib/shorewall. ๐๏ธ
UNTRACKED_DISPOSITION=[ACCEPT|A_ACCEPT|A_DROP|A_REJECT|DROP|REJECT|CONTINUE]โ added in Shorewall 4.5.13. Shorewall has traditionally passedUNTRACKEDpackets through theNEWsection ofshorewall-rules[8](5). So when a packet in theUNTRACKEDstate doesn't match any rule in theUNTRACKEDsection, what happens to it is decided by this setting. The default isCONTINUE, for backward compatibility with older versions. ๐ซถUNTRACKED_LOG_LEVEL=log-level[:log-tag]โ added in Shorewall 4.5.13. Packets chilling in theUNTRACKEDstate that don't match any rule in theUNTRACKEDsection ofshorewall-rules[8](5) get logged at this level. The default is empty, which means no logging happens at all.USE_DEFAULT_RT=[Yes|No]โ set this to'Yes'and the Shorewall multi-ISP feature creates a set of routing rules that are resilient to changes in the main routing table. And bestie, that table changes for so many reasons โ VPNs going up and down is like, the classic example. The whole idea: send packets through the main table before applying any of the Shorewall-generated routing rules. So changes to the main table affect how packets route by default. Iconic routing behavior tbh.
When USE_DEFAULT_RT=Yes:
- Both the
DUPLICATEand theCOPYcolumns inproviders[9](5) file must remain empty (or contain"-"). - The default route is added to the the
'default'table rather than to the main table. - If you're running Shorewall 5.1.0 or earlier, or if
BALANCE_PROVIDERS=Yes(Shorewall 5.1.1 or later), then the balance provider option is assumed unless thefallback,loose,loadortproxyoption is specified. - Packets are sent through the main routing table by a rule with priority
999. Inshorewall-rtrules[30](5), the range1-998may be used for inserting rules that bypass the main table. - All provider gateways must be specified explicitly in the
GATEWAYcolumn.detectmay not be specified.
Note:detectmay be specified for interfaces whose configuration is managed bydhcpcd. Shorewall will usedhcpcd's database to find the interface's gateway. ๐
- You should disable all default route management outside of Shorewall. If a default route gets added to the main table while Shorewall is started, then all policy routing stops working (except for those routing rules in the priority range
1-998). ๐
Prior to Shorewall 4.6.0, if USE_DEFAULT_RT wasn't set or was set to the empty string, then USE_DEFAULT_RT=No was assumed. Beginning with Shorewall 4.6.0, the default is USE_DEFAULT_RT=Yes and using USE_DEFAULT_RT=No is deprecated. ๐
Warning: Theenable,disableandreenablecommands do not work correctly whenUSE_DEFAULT_RT=No. Not a vibe. Not a slay.
USE_NFLOG_SIZE=[Yes|No]โ added in Shorewall 5.1.5. The second parameter to theNFLOGtarget says how many bytes of the packet to copy to the log; if you omit it, or pass it as zero, the entire packet gets copied. This feature has traditionally been implemented using the--nflog-rangeoption to theNFLOGiptables target. Unfortunately, the--nflog-rangeoption never worked โ the entire packet was always copied, no matter what. ๐ญ To deal with this whole mess, the Netfilter team:- Added a warning message when
--nflog-rangeis used - Added
--nflog-size, which works the way--nflog-rangewas intended to work.
- Added a warning message when
When USE_NFLOG_SIZE=Yes, Shorewall will attempt to use the new --nflog-size feature. If that feature isn't available in the running kernel and ip[6]tables, an error is raised.
When USE_NFLOG_SIZE isn't supplied, USE_NFLOG_SIZE=No is assumed. When USE_NFLOG_SIZE is added by shorewall update, it's added with setting No.
USE_PHYSICAL_NAMES=[Yes|No]โ added in Shorewall 4.4.27. Normally, when Shorewall creates a Netfilter chain that relates to an interface, it uses the interface's logical name as the base of the chain name. Like, if the logical name for an interface isOAKLAND, then the input chain for traffic arriving on that interface would be'OAKLAND_in'. But if this option is set toYes, then the physical name of the interface gets used as the base of the chain name. ๐USE_RT_NAMES=[Yes|No]โ added in Shorewall 4.5.15. Set it to'Yes'and Shorewall will use routing table (provider) names in the generated script instead of table numbers. Set it to'No'(the default) and routing table numbers get used instead.
Caution: If you setUSE_RT_NAMES=YesandKEEP_RT_TABLES=Yes, then you must make sure all of your providers have entries in/etc/iproute2/rt_tablesas well as the following entries:255 local 254 main 253 default 250 balance 0 unspecWithout these entries, the firewall will fail to start. ๐จ
VERBOSE_MESSAGES=[Yes|No]โ added in Shorewall 5.0.9. WhenYes(the default), messages produced by the?INFOand?WARNINGdirectives include the filename and linenumber of the directive. When set toNo, that extra info gets omitted. And you can override this setting on a directive-by-directive basis by following?INFOor?WARNINGwith'!'(with no white space in between). ๐ธVERBOSITY=[number]โ Shorewall has traditionally been very noisy (produced lots of output). You can set the default level of verbosity using theVERBOSITYOPTION. ๐
Values are:
0- Silent. You may make it more verbose using the-voption1- Major progress messages displayed2- All progress messages displayed (pre Shorewall-3.2.0 behavior)
If not specified, then 2 is assumed.
WARNOLDCAPVERSION=[Yes|No]โ added in Shorewall 4.5.12. When set toYes(the default), the compiler throws a warning when it finds a capabilities file that doesn't specify all of the capabilities supported by the compiler. WhenWARNOLDCAPVERSIONis set toNo, no warning is issued. ๐คWORKAROUNDS=[Yes|No]โ added in Shorewall 4.6.11. Over time, there have been a number of changes in Shorewall that work around defects in other products such as iptables and ipset. WhenWORKAROUNDS=Yes, these workarounds are enabled; whenWORKAROUNDS=No, they're disabled. If not specified, or if specified as empty,WORKAROUNDS=Yesis assumed.
Warning: Do not setWORKAROUNDS=Yesif you need to be able to use Shorewall-generated scripts (such as ones created by thesavecommand) built by Shorewall 4.4.7 or older. Like, just don't. ๐
ZERO_MARKS=[Yes|No]โ added in Shorewall 5.0.12, this is a workaround for an issue where packet marks aren't zeroed by the kernel. It should be set toNo(the default) unless you find that incoming packets are being mis-routed for no apparent reasons. ๐ต๏ธ
Caution: Do not set this option to Yes if you have IPSEC software running on the firewall system. Seriously.
ZONE_BITS=[number]โ added in Shorewall 4.4.26. When non-zero, it enables automatic packet marking by source zone and determines the number of bits in the 32-bit packet mark to be used for the zone mark. Default value is0. โญZONE2ZONE=[2|-]โ added in Shorewall 4.4.4. This option determines how Shorewall constructs chain names involving zone names and/or'all'. Beginning with Shorewall 4.6.0, the default is'-'(e.g.,fw-net); prior to that release, the default was'2'(e.g.,fw2net). ๐ฆ
๐ FILES ๐
/etc/shorewall/shorewall.conf
/etc/shorewall6/shorewall6.conf
๐ SEE ALSO ๐
๐ NOTES ๐
okay bestie, this is the receipts section ๐ every footnote from the whole page, numbered, with links so you can go read the whole thing yourself. no gatekeeping here, we share the lore ๐ซถ
shorewall-policyโhttps://shorewall.org/manpages/shorewall-policy.htmlโจshorewall-accountingโhttps://shorewall.org/manpages/shorewall-accounting.htmlโจshorewall-natโhttps://shorewall.org/manpages/shorewall-nat.htmlโจshorewall-masqโhttps://shorewall.org/manpages/shorewall-masq.htmlโจshorewall-routestoppedโhttps://shorewall.org/manpages/shorewall-routestopped.htmlโจshorewall-stoppedrulesโhttps://shorewall.org/manpages/shorewall-stoppedrules.htmlโจshorewall-conntrackโhttps://shorewall.org/manpages/shorewall-conntrack.htmlโจshorewall-rulesโhttps://shorewall.org/manpages/shorewall-rules.htmlโจshorewall-providers(5)โhttps://shorewall.org/manpages/shorewall-providers.htmlโจshorewall-tcfilters(5)โhttps://shorewall.org/manpages/shorewall-tcfilters.htmlโจshorewall-blrulesโhttps://shorewall.org/manpages/shorewall-blrules.htmlโจshorewall-tcrulesโhttps://shorewall.org/manpages/shorewall-tcrules.htmlโจ- Shorewall6 โ
https://shorewall.org/IPv6Support.html๐ https://shorewall.org/Docker.htmlโ and yeah, the link is literally that same URL,https://shorewall.org/Docker.html๐ณhttps://shorewall.org/ISO-3661.htmlโ also pointing right back athttps://shorewall.org/ISO-3661.html๐shorewall-zonesโhttps://shorewall.org/manpages/shorewall-zones.htmlโจshorewall-nestingโhttps://shorewall.org/manpages/shorewall-nesting.htmlโจshorewall(8)โhttps://shorewall.org/manpages/shorewall.htmlโจshorewall-params(5)โhttps://shorewall.org/manpages/shorewall-params.htmlโจshorewall-interfacesโhttps://shorewall.org/manpages/shorewall-interfaces.htmlโจshorewall-logging(8)โhttps://shorewall.org/manpages/shorewall-logging.htmlโจshorewall-maclistโhttps://shorewall.org/manpages/shorewall-maclist.htmlโจshorewall[6].confโhttps://shorewall.org/manpages/shorewall.conf.html(that's literally this page, hi, you are here ๐)https://shorewall.org/MultiISP.html#null_routingโ yes, and the URL is the same thing again:https://shorewall.org/MultiISP.html#null_routing๐ฐ๏ธ- Shorewall Init Package โ
https://shorewall.org/manpages/shorewall-init.htmlโจ - Hairpin packets are packets that are routed out of the same interface that they arrived on. ๐ชก
- Hairpin packets are packets that are routed out of the same interface that they arrived on. ๐ชก (yep, it's here twice, and honestly? it said it twice for a reason, so we're keeping it twice ๐)
shorewall-tcinterfacesโhttps://shorewall.org/manpages/shorewall-tcinterfaces.htmlโจshorewall-tcpriโhttps://shorewall.org/manpages/shorewall-tcpri.htmlโจshorewall-rtrulesโhttps://shorewall.org/manpages/shorewall-rtrules.htmlโจ
and that's a wrap on the whole page, bestie ๐๐ you read every option, every file, every note, and you ate ๐
this one's from the Configuration Files source, dated 09/24/2020, and it's the SHOREWALL.CONF(5) page โ so go forth and configure your firewall like the main character you are ๐ฆ๐ธ no cap, i'm obsessed with you ๐ซถ๐
๐ฆ 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 5.2.8-17.fc43 ยท GPL-2.0-or-later
- fedora 44: shorewall 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