Compare commits

..

540 Commits

Author SHA1 Message Date
Tom Eastep
f831d9a988 Correct mal-formed entries in Build.xml
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2020-02-16 11:02:37 -08:00
Tom Eastep
31b558b7f9 Filter out LIBVIRT rules when saving Docker Rules
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2020-02-16 10:36:16 -08:00
Matt Darfeuille
b897fe2b9d Update build article
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2020-02-01 11:01:06 -08:00
Matt Darfeuille
802ff1da4e Harmonize permissions
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2020-02-01 11:00:41 -08:00
Tom Eastep
f05bd969af Revert "Add targetname files"
This reverts commit c9eb443574.
2020-02-01 09:46:05 -08:00
Matt Darfeuille
093e55083c Ignore empty target files
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2020-02-01 09:42:07 -08:00
Tom Eastep
c9eb443574 Add targetname files
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2020-01-29 10:41:55 -08:00
Tom Eastep
08da235896 Correct IPv6 Address Range parsing
Previously, such ranges were required to be of the form [<addr1>-<addr2>]
rather than the more standard form [<addr1>]-[<addr2>]. In the snat file
(and in nat actions), the latter form was actually flagged as an error
while in other contexts, it resulted in a less obvious error being raised.

With this change, both forms are accepted.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-12-23 10:02:48 -08:00
Tom Eastep
77cad81ba7 Clean up comments
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-12-23 09:59:29 -08:00
Tom Eastep
9213d7e707 Clean up Shorewall6[-lite] manpage links
- there were many links pointing to /manpages6/shorewall6... that should
  have been updated to point to /manpages/shorewall...

- this commit corrects those links

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-11-27 15:46:57 -08:00
Tom Eastep
157abcbd37 Allow NFQUEUE 'bypass' in the policy file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-10-21 14:41:02 -07:00
Tom Eastep
6da498510c Correct mss specification when using ipcomp
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-10-16 11:45:08 -07:00
Tom Eastep
54c7e1a607 Correct typo in FTP.xml
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-09-03 07:42:06 -07:00
Tom Eastep
c4d5bb904b Correct description of 'bypass' in shorewall-rules(5).
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-08-26 15:45:26 -07:00
Tom Eastep
40f6192e19 Make 'AUTOMAKE=No' the update default
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-08-25 14:20:54 -07:00
Tom Eastep
7051daeb08 Correct handle of multi-queue NFQUEUE when passed to a macro
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-08-25 14:18:54 -07:00
Tom Eastep
a9c42e1eaa Correct NFQUEUE policy with per-CPU queues
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-08-25 14:18:06 -07:00
Tom Eastep
6b21135ade Correct handling of an ipset in the SPORT column
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-04-11 18:37:27 -07:00
Tom Eastep
2f3f6ffa15 Revert "Make $update global in Config.pm"
This reverts commit b9d0821acb.
2019-03-17 08:02:53 -07:00
Tom Eastep
60f2f3b0d0 Allow variable expansion when processing shorewallrc.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-03-14 20:38:10 -07:00
Tom Eastep
e626b77097 Correct policy zone exclusion handling
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-21 09:31:13 -08:00
Tom Eastep
15dd14e167 Correct link to Roberto's repository
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-08 10:47:43 -08:00
Tom Eastep
83b586c192 More document changes
- Include Linuxfest presentation titles

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-08 10:45:09 -08:00
Matt Darfeuille
d3fcb29f0d Use proper function name for warning messages
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-07 10:44:46 -08:00
Tom Eastep
a4ed419aba Add new manpages to Manpages web page
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-07 10:42:23 -08:00
Tom Eastep
e548043e96 Remove modules files
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-06 14:17:10 -08:00
Tom Eastep
443a4223c2 Remove pre-2.6.20 helpers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-06 14:11:48 -08:00
Tom Eastep
8f42a6a72b Remove LOAD_HELPERS_ONLY
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-03 10:04:19 -08:00
Tom Eastep
0982fec513 Remove superfluous whitespace from Providers.pm
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-01 12:44:44 -08:00
Tom Eastep
f5262dd050 Correct typo in shorewall-providers(5)
- RESTORE_DEFAULT_OPTION -> RESTORE_DEFAULT_GATEWAY
2019-02-01 12:44:00 -08:00
Tom Eastep
8dcfd86f3a Document compiler globals
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-24 08:26:27 -08:00
Tom Eastep
edc9e25f25 Deprecate 'all[+]-'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-23 12:35:07 -08:00
Tom Eastep
ef11ae834d Drop documentation for all-
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-22 15:53:33 -08:00
Tom Eastep
9f423412d8 Allow zone exclusion in the policy file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-22 12:35:23 -08:00
Tom Eastep
7f7fef3a4e Disallow 'all' in a policy zone list
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-21 10:00:36 -08:00
Tom Eastep
b9d0821acb Make $update global in Config.pm
- Only save raw image if we are updating

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-20 11:06:40 -08:00
Tom Eastep
857539c8b1 Update lib.runtime copyright
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-16 13:09:42 -08:00
Tom Eastep
429070d107 Update Chains.pm and Compiler.pm copyrights
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-16 12:28:27 -08:00
Tom Eastep
89725c530f Change limit of 'wait' option setting to 300 seconds (5 minutes)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-16 11:50:33 -08:00
Tom Eastep
8e5f67797a Allow INLINE() in the accounting file to accept '+' in inline matches
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-14 14:52:18 -08:00
Tom Eastep
0eb0bace9a Update more copyrights
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-09 11:57:41 -08:00
Tom Eastep
fab8cc055b Remove unused local variable
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-08 14:25:09 -08:00
Tom Eastep
bef8ec09b3 Insist that '+' (if present) be the first non-blank character in IL matches
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-08 13:55:02 -08:00
Tom Eastep
cf330afbd9 Allow inline matches in the conntrack file.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-08 13:09:00 -08:00
Tom Eastep
49731da807 Update copyright dates
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-04 10:14:27 -08:00
Tom Eastep
f3ecbc185c Add Netmanager gateway detection
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-03 11:22:15 -08:00
Tom Eastep
a71a44346e Document the provider table contents
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-02 15:27:38 -08:00
Tom Eastep
4d278f4c20 Clarify [no]hostroute in shorewall-providers(5).
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-02 15:08:38 -08:00
Tom Eastep
45ec24ea42 Add comments to the Zones module
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-12-30 14:10:28 -08:00
Tom Eastep
bf3880ae59 Add some comments to the Misc module
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-12-30 12:41:55 -08:00
Tom Eastep
9e838e6d04 Add Tuomo Soini's WUDO macro
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-12-19 14:57:38 -08:00
Tom Eastep
d096db6a94 Add/modify comments in Chains.pm
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-12-19 09:19:26 -08:00
Tom Eastep
636d82414f Merge branch '5.2.1' 2018-12-16 10:34:34 -08:00
Tom Eastep
cb3273b13b Revert "Allow leading 's' & 'd' to be omitted when specifying two rates"
This reverts commit 23bc6f1ab5.
2018-12-16 10:06:34 -08:00
Tom Eastep
f0c75b5119 Update RATE documentation in shorewall-rules(5)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-12-16 10:06:00 -08:00
Tom Eastep
23bc6f1ab5 Allow leading 's' & 'd' to be omitted when specifying two rates
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-12-16 09:47:45 -08:00
Roberto C. Sánchez
54e6412c49 Fix documentation typos 2018-12-15 15:34:45 -08:00
Tom Eastep
1465035aa4 Merge branch 'master' of ssh://git.code.sf.net/p/shorewall/code 2018-12-15 14:57:21 -08:00
Tom Eastep
8473bf2200 Clean up macros contributed by Vincas Dargis
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-12-15 10:31:57 -08:00
Tom Eastep
0fe45b8f46 Merge branch 'tor' of ssh://teastep@git.code.sf.net/u/talkless/shorewall 2018-12-15 10:25:22 -08:00
Tom Eastep
a4c87149c9 Merge branch 'oncrpc_macro' of ssh://teastep@git.code.sf.net/u/talkless/shorewall 2018-12-15 10:24:56 -08:00
Tom Eastep
83359b098d Merge branch 'bitcoin' of ssh://teastep@git.code.sf.net/u/talkless/shorewall 2018-12-15 10:21:14 -08:00
Tom Eastep
3239fb3eb9 Merge branch '5.2.1' 2018-12-15 09:56:14 -08:00
Roberto C. Sánchez
096f59b5bc Fix documentation typos 2018-12-15 11:02:07 -05:00
Vincas Dargis
9260be402b Add Tor macros
Add macros for various Tor Anonimity Network ports
2018-12-15 13:08:06 +02:00
Vincas Dargis
7bf7000941 Add Bitcoin macros
Add macros for various Bitcoin daemon ports.
2018-12-15 12:35:52 +02:00
Vincas Dargis
840f8b904d Add ONC RPC macro
Add macro for handling ONC RPC calls, for rpcinbd on Linux.
2018-12-15 12:10:03 +02:00
Tom Eastep
61ac08dc7f Correct handling of netmask when two rates are specified in the RATE col.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-12-14 14:16:26 -08:00
Tom Eastep
f65b10c375 Remove dead/silly code from Shorewall::Chains::use_input/output_chain()
- combine the two into a single function use_interface_chain().

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-12-14 13:54:36 -08:00
Tom Eastep
35c7f304f7 Correct log name for untracked chain
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-12-14 11:00:27 -08:00
Tom Eastep
467544801e Clean up of Chains.pm
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-12-14 10:59:31 -08:00
Tom Eastep
7cfe9ec272 Correct log name for untracked chain
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-12-14 10:58:26 -08:00
Tom Eastep
6908a4bcf7 Issue warning when ULOG is used.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-12-14 09:00:42 -08:00
Tom Eastep
be2110b47e Revert "Remove ULOG support"
This reverts commit 061ce3d781.
2018-12-14 08:54:07 -08:00
Tom Eastep
ad6401da8c Cleanup of Config.pm
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-12-13 15:32:39 -08:00
Tom Eastep
2b6d657fb0 Add UDP tip to DNAT solutions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-12-13 10:33:11 -08:00
Tom Eastep
668cb6deda Make 'status -i' work when there are no providers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-12-11 13:44:31 -08:00
Tom Eastep
ddd8576ced Merge branch '5.2.1' 2018-12-09 11:07:44 -08:00
Tom Eastep
98aad094fb Correct typo in Anti-Spoofing.xml
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-12-09 11:07:10 -08:00
Tom Eastep
8ed644a0ec Correct HELPER requires error message
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-11-28 11:00:41 -08:00
Tom Eastep
86b82c53cf Correct HELPER requires error message
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-11-28 10:59:53 -08:00
Tom Eastep
061ce3d781 Remove ULOG support
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-11-15 14:59:29 -08:00
Tom Eastep
45f8d31021 Don't try to load ipt_ULOG
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-11-15 14:33:25 -08:00
Tom Eastep
03d2088cf7 Implement SW_CONFDIR support
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-11-06 15:40:26 -08:00
Tom Eastep
6534201284 Fix assertion failure during 'check -r' when DOCKER=Yes
- avoid unnecessary mode transitions

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-10-31 15:30:03 -07:00
Tom Eastep
282ca14182 Corrections to DOCKER-ISOLATION change
- Handle DOCKER-USER

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-10-28 09:20:47 -07:00
Tom Eastep
4b7d346911 Merge branch '5.2.1' 2018-10-27 09:11:00 -07:00
Tom Eastep
131a2cd40d Accommodate Docker version 18.06
- Optionally replace DOCKER-ISOLATION with DOCKER-ISOLATION-STAGE-1 and -2

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-10-27 09:04:34 -07:00
Tom Eastep
ae90ab1f68 Add version of Jeremie Courreges-Anglas's <jca@tranquil.it> patch
- Handle case where we are enabling/disabling a balanced/fallback provider
  and another such provider has lost carrier.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-10-11 15:18:47 -07:00
Tom Eastep
5e57c895b3 Avoid emacs issues with compiled code
- handle embedded spaces in moduledir path names

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-10-09 14:47:36 -07:00
Tom Eastep
aab1df7421 Correct ip[6]tables-restore failure message
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-10-06 08:22:46 -07:00
Tom Eastep
9f3cc88cf0 Prevent invalid code generation with SNAT(detect)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-10-02 08:15:20 -07:00
Tom Eastep
aaa80882a0 Add Eric Teeter's Cockpit macro
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-09-28 09:43:55 -07:00
Tom Eastep
1b6de901e0 Merge branch '5.2.0' 2018-08-24 15:33:16 -07:00
Tom Eastep
56780a5d1f Apply rate limiting in the nat table on nat+accept rules
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-08-24 15:31:20 -07:00
Tom Eastep
22c1bc2e9c Apply rate limiting in the nat table on nat+accept rules
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-08-23 14:07:10 -07:00
Tom Eastep
5048e68cb5 Correct IPv4 examples in shorewall-blrules(5)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-08-13 19:21:03 -07:00
Tom Eastep
1897794dbf Change reference to 'masq' to 'snat'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-08-12 11:37:12 -07:00
Tom Eastep
4fca96f10e Fix typo in IPSEC-2.6.xml
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-08-09 08:14:01 -07:00
Tom Eastep
2d2ded7efc Merge branch '5.2.0' 2018-08-07 07:46:29 -07:00
Tom Eastep
e5e427f278 Merge branch '5.2.0' of ssh://git.code.sf.net/p/shorewall/code into 5.2.0 2018-08-07 07:44:38 -07:00
Tom Eastep
5e8fd570d1 Prepare for Perl 5.32
- Escape '{' in REs

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-08-07 07:43:58 -07:00
Tom Eastep
e8428cc298 Prepare for Perl 5.32
- Escape '{' in REs

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-08-07 07:42:34 -07:00
Tom Eastep
aa94772fc6 Merge branch '5.2.0' 2018-08-06 08:08:39 -07:00
Matt Darfeuille
732ae3ce19 Ipcalc: Fail when missing arguments
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-08-05 10:26:17 -07:00
Tom Eastep
9cbcb328af More mutex changes for LEDE
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-08-01 13:58:50 -07:00
Tom Eastep
82e84f724d Use -h rather than -L for checking a symlink
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-08-01 13:58:35 -07:00
Tom Eastep
23cf8328d5 Fix mutex on OpenWRT - patch 1
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-08-01 13:58:28 -07:00
Tom Eastep
7c31f70dc8 Use '=' rather than '&' to create UNTRACKED rule chains.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-08-01 13:50:20 -07:00
Tom Eastep
f1eafdc314 Use '=' rather than '&' to create UNTRACKED rule chains.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-08-01 13:48:29 -07:00
Tom Eastep
69745caa41 Revert previous emacs-related change.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-31 15:16:24 -07:00
Tom Eastep
0b49477e0d More mutex changes for LEDE
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-31 15:03:58 -07:00
Tom Eastep
c195bab01d Correct handling of a provider interface that matches a wildcard.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-29 20:34:02 -07:00
Tom Eastep
1b550baf7e Eliminate broken links
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-28 07:58:32 -07:00
Tom Eastep
d829093caa Use -h rather than -L for checking a symlink
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-26 13:57:10 -07:00
Tom Eastep
1fa77ac470 Fix mutex on OpenWRT - patch 1
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-26 11:47:51 -07:00
Tom Eastep
5083246266 Avoid emacs issues with lib.common
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-26 11:28:06 -07:00
Tom Eastep
c0d6c9e7c0 Document issue with optional shared interfaces
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-19 10:08:17 -07:00
Tom Eastep
0d682fe78b Disallow optional shared providers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-19 09:57:06 -07:00
Tom Eastep
410a20dda3 Make shared interface and 'load=<load-factor' play nice together
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-17 13:25:26 -07:00
Tom Eastep
0685d0edfd Fix rate limiting
- Avoid specifying a timeout when the match is '-m limit'

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-15 08:57:43 -07:00
Tom Eastep
474604b1fe Correct source interface exclusion
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-04 08:01:27 -07:00
Tom Eastep
6fef1f34ba Correct links in manpages
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-03 15:31:14 -07:00
Tom Eastep
93f0183550 Tweak do_ratelimit()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-03 14:22:30 -07:00
Tom Eastep
5a599552f2 Correct INLINE typos
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-02 16:56:57 -07:00
Tom Eastep
a42972644c Allow specification of 'hashlimit' table sizes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-02 14:14:36 -07:00
Tom Eastep
b271c52603 Update RATE column documentation
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-02 14:10:53 -07:00
Tom Eastep
49514e2d58 Allow specification of ht buckets and max entries in RATE columns
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-02 10:23:36 -07:00
Tom Eastep
a265685e20 Allow specification of VLSM in the RATE columns
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-07-02 09:08:45 -07:00
Matt Darfeuille
442e6ac152 Update version to 5.2
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-06-23 09:09:00 -07:00
Matt Darfeuille
14e5a2d5ca Be more verbose in progress messages
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-06-23 09:02:18 -07:00
Matt Darfeuille
6e32f052c8 Use proper function name on fatal error
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-06-23 09:01:49 -07:00
Tom Eastep
780eb0402c Update manpages for interface exclusion
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-06-15 08:23:35 -07:00
Tom Eastep
bfb9852eb6 Allow MARK, CONNMARK, SAVE and RESTORE in the nat table
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-06-14 10:01:12 -07:00
Tom Eastep
a8b6a301f2 Revert "MARK and CONNMARK in the snat file"
This reverts commit e36547f8be.
2018-06-14 07:58:33 -07:00
Tom Eastep
150f7ab798 Allow specification of the TPROXY mark in CONNMARK and MARK.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-06-14 07:58:06 -07:00
Tom Eastep
b11d63a7bd More manpage corrections
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-06-11 08:54:34 -07:00
Tom Eastep
84b283533b Correct dangling link
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-06-11 08:52:07 -07:00
Tom Eastep
e36547f8be MARK and CONNMARK in the snat file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-06-10 16:34:55 -07:00
Tom Eastep
0632723a6c Support interface exclusion
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-06-10 12:02:19 -07:00
Tom Eastep
43543b5c32 Clean up shorewall-addresses(5)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-06-10 12:00:54 -07:00
Tom Eastep
ffc5a3c7df Add ALT Linux support by Alexey Shabalin <sha-ba@mail.ru>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-05-29 08:13:26 -07:00
Tom Eastep
b6d1293b2e Merge branch '5.2.0' 2018-05-20 14:48:40 -07:00
Tom Eastep
ec21b03c5b Correct handling of dbl=src_dst in interface OPTIONS
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-05-18 10:18:09 -07:00
Tom Eastep
25dcf8c5d6 Check for linkdown in interface_is_usable() rather than ..._is_up().
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-05-18 07:56:06 -07:00
Tom Eastep
c02b71b530 Correct interface_is_up() to look for the 'state' as well as 'UP'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-05-12 08:09:46 -07:00
Tom Eastep
78269d57bc Handle missing AUTOMAKE
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-05-10 11:12:23 -07:00
Tom Eastep
fc91648315 Avoid split_line2 confusion when processing a raw line
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-05-10 09:30:02 -07:00
Tom Eastep
067f435ac5 Update BLACKLIST_DEFAULT if Drop or Reject
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-05-06 13:31:54 -07:00
Tom Eastep
2039f38faf Fix 'show saves' when there are no saves
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-05-05 13:27:37 -07:00
Tom Eastep
07654d8f8d Fix 'compile -c'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-05-05 13:26:58 -07:00
Tom Eastep
b5e8f9bd50 Restore the read_yesno_with_timeout() function
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-05-04 08:52:40 -07:00
Tom Eastep
f9995a9515 New manpages
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-05-04 08:47:33 -07:00
Tom Eastep
9c950082f6 Add new IPFS macros
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-05-04 08:45:39 -07:00
Tom Eastep
defdd320cf Merge branch '5.2.0' 2018-04-27 14:09:07 -07:00
Matt Darfeuille
fc44eb7516 Update version to 5.2 in RC files
- Mention LEDE distro in OpenWRT RC file

Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-04-27 14:08:36 -07:00
Matt Darfeuille
bb89d509ea Ipdecimal: Correct error when missing arguments
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-04-27 14:08:00 -07:00
Matt Darfeuille
c2fe389da8 Update version to 5.2 in RC files
- Mention LEDE distro in OpenWRT RC file

Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-04-27 11:42:04 -07:00
Matt Darfeuille
45d1ef3978 Ipdecimal: Correct error when missing arguments
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-04-27 11:41:44 -07:00
Tom Eastep
65e174a073 Add IPFS macros from Răzvan Sandu <razvan.sandu@mobexpert.ro>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-04-21 09:05:48 -07:00
Tom Eastep
6822803802 Correct Netfilter Diagram
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-04-18 15:53:01 -07:00
Tom Eastep
66edd76b10 Correct typo in patch merged from 5.1.12
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-04-15 08:46:05 -07:00
Matt Darfeuille
99be0ce970 Use a function to load configuration files
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-04-14 13:06:54 -07:00
Tom Eastep
98d5bf8f55 Correct 'reset' handling in 'IfEvent'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-04-13 09:22:29 -07:00
Tom Eastep
370901e873 Add link to Events.html from PortKnocking.html
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-04-13 08:50:19 -07:00
Tom Eastep
c59ff50de4 Process params file in remote_capture()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-04-13 08:49:35 -07:00
Matt Darfeuille
3df5c032da Be more verbose when executing remote commands
- Reword progress messages

Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-04-12 11:12:39 -07:00
Tom Eastep
b997bfcd97 Update copyright of Shorewall 5 Document
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-04-10 10:44:38 -07:00
Tom Eastep
7630d3cdb1 Update Shorewall 5 Article
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-04-10 10:00:52 -07:00
Tom Eastep
90df607d79 Finish removal of 'refresh command'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-30 15:30:34 -07:00
Matt Darfeuille
f012244acd Add 5.2 as a supported Shorewall version
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-28 13:03:49 -07:00
Tom Eastep
5e2f1f573d Unconditionally convert masq->snat
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-27 11:38:47 -07:00
Tom Eastep
011322992e Revert "Delete masq file processing"
This reverts commit 609ee8dea2.
2018-03-27 11:08:33 -07:00
Tom Eastep
16bb41db15 Document 'getcaps', 'getrc' and 'show rc'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-27 09:54:32 -07:00
Tom Eastep
47a96e9ff9 Delete masq file.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-26 15:57:49 -07:00
Tom Eastep
4a1d8ba0f9 delete shorewall-masq.xml
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-26 15:56:11 -07:00
Tom Eastep
7c99059a66 Supersede the masq file.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-26 15:53:07 -07:00
Tom Eastep
609ee8dea2 Delete masq file processing
- Automatically convert the masq file if it exists

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-26 11:40:22 -07:00
Matt Darfeuille
299ea2b41f Update version to 5.2
- Remove unneeded punctuation marks

Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-24 09:53:02 -07:00
Tom Eastep
224400833a Correct port knocking action in the Events article
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-24 09:47:56 -07:00
Tom Eastep
32f1ae1992 Make &lo work correctly
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-19 18:23:19 -07:00
Matt Darfeuille
9b5468cd4a Add and document the show rc command
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-18 17:36:44 -07:00
Matt Darfeuille
47a59cdd7c Add and document the remote-getcaps command
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-18 17:36:38 -07:00
Matt Darfeuille
676ca872d6 Add and document the remote-getrc command
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-18 17:36:33 -07:00
Matt Darfeuille
ef28208c0e Use a more consistent name for function definition
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-18 17:36:20 -07:00
Matt Darfeuille
cdeb82bdab Improve when to capture capabilities
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-18 17:35:42 -07:00
Tom Eastep
3be071ca3d Up the INCLUDE depth limit to 20
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-12 14:39:53 -07:00
Tom Eastep
6f6abfc8cd Clarify the processing of the params file in shorewall-params(5)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-08 08:51:36 -08:00
Tom Eastep
f99f3539d1 Recommend using the link-level IP of upstream IPv6 routers.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-05 16:42:15 -08:00
Tom Eastep
e08e239c00 Implement AUTOMAKE=recursive
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-03 15:50:56 -08:00
Tom Eastep
02ed6f26a9 Allow AUTOMAKE=<depth> to specify search depth
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-03 13:04:48 -08:00
Tom Eastep
9e002a7689 Be sure that mutex is released when exiting
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-28 13:38:30 -08:00
Tom Eastep
34c5441768 Apply optimize category 16 again after 8 if 8 did anything
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-27 14:17:21 -08:00
Tom Eastep
c3d8cba042 Reverse the order of optimize 8 and optimize 16 application
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-23 15:01:47 -08:00
Tom Eastep
8bc97bcd35 Replace ${VARDIR}/firewall with $g_firewall in CLI
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-23 12:40:14 -08:00
Tom Eastep
c1a74b54fc Implement RENAME_COMBINED
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-22 12:49:55 -08:00
Tom Eastep
88547f5140 Handle two-chain case when LOG_ZONE != 'Both'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-22 11:25:19 -08:00
Tom Eastep
4a714b3ab9 More INLINE_MATCHES changes
Signed-off-by: Tom Eastep <teastep@shorewall.net>

# Conflicts:
#	Shorewall/manpages/shorewall-mangle.xml
#	Shorewall/manpages/shorewall-rules.xml
2018-02-21 15:15:23 -08:00
Tom Eastep
7ad7598d5b Implement LOG_ZONE
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-20 15:31:31 -08:00
Tom Eastep
4dfc6d90b9 Add 'logname' member to chain table entries.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-20 11:04:50 -08:00
Tom Eastep
0cb4a5c202 Correct "Invalid Policy Action" error message
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-19 10:04:18 -08:00
Tom Eastep
9a83365986 Remove the USEPKTTYPE capability
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-16 11:20:00 -08:00
Tom Eastep
bc65d29650 Add shorewallrc.sandbox
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-15 13:10:53 -08:00
Tom Eastep
9d3e8d6f6c Tabify shorewalrc.debian.systemd
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-15 13:08:43 -08:00
Tom Eastep
8056b6fd85 Create the 'show saves' command.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-15 12:42:55 -08:00
Tom Eastep
db4a26cfa9 'update' changes for V5.2
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-13 09:21:15 -08:00
Tom Eastep
95e956c913 Complete removal of INLINE_MATCHES
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-13 09:20:31 -08:00
Tom Eastep
5e3795b5a4 Delete support for single semicolon in INLINE and IP[6]TABLES rules
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-12 19:12:03 -08:00
Tom Eastep
3402b1efb6 Correct documentation WRT ';' vs. ';;'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-12 19:11:01 -08:00
Tom Eastep
24e21e730e Correct typo in add_common_rules()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-12 19:10:35 -08:00
Tom Eastep
421edccd3f Delete INLINE_MATCHES from .conf files
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-12 19:09:42 -08:00
Tom Eastep
cf8a48f110 Delete deprecated actions and macros
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-12 19:08:18 -08:00
Tom Eastep
12bbbbfa2a Merge branch '5.1.12'
# Conflicts:
#	Shorewall/Perl/Shorewall/Config.pm
2018-02-09 17:16:12 -08:00
Tom Eastep
422911f06b Update config file basics doc to discourage INLINE_MATCHES=Yes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-09 17:09:11 -08:00
Tom Eastep
2a12e0950a Allow pairs in braces to appear with ';;'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-09 12:58:18 -08:00
Tom Eastep
9869dd25d7 Correct capitalization of IPsec
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-09 11:20:22 -08:00
Tom Eastep
e47b57fd4a Replace macro.SSDPServer with corrected macro.SSDPserver
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-09 08:45:03 -08:00
Tom Eastep
3cbe0e7a1c Describe IPSEC via SNAT
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-08 14:33:54 -08:00
Tom Eastep
221753c3c0 INLINE_MATCHES=No in sample configs
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-08 12:53:20 -08:00
Tom Eastep
b14924bd64 New macros - Tuomo Soini
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-08 12:29:56 -08:00
Tom Eastep
c0a608ef84 Updated IPMI Macro (Tuomo Soini)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-08 11:59:55 -08:00
Tom Eastep
c518e85215 Clarify warning message regarding INLINE_MATCHES
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-08 11:21:38 -08:00
Roberto C. Sánchez
34fd10df41 Fix typo 2018-02-08 10:49:14 -08:00
Roberto C. Sánchez
e7004da47c Fix typo 2018-02-08 10:49:06 -08:00
Tom Eastep
1fc97c50f1 Merge branch 'master' of ssh://git.code.sf.net/p/shorewall/code 2018-02-08 10:47:57 -08:00
Roberto C. Sánchez
440d404780 Fix typo 2018-02-08 13:45:58 -05:00
Tom Eastep
91c76f7559 Add INLINE_MATCHES=Yes to deprecated option list
- Issue a warning for each line requiring change.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-07 19:08:28 -08:00
Roberto C. Sánchez
eb224e653f Fix typo 2018-02-07 21:53:40 -05:00
Tom Eastep
73b39abd62 Remove INLINE_MATCHES
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-07 14:41:49 -08:00
Tom Eastep
3903fe5fd9 Remove the 'refresh' command
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-07 12:38:24 -08:00
Tom Eastep
a3e10157de Merge branch '5.1.12' 2018-02-06 17:35:31 -08:00
Tom Eastep
2e4af68b98 Always report IPSET_MATCH in 'show capabilities' output.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-06 13:41:28 -08:00
Tom Eastep
de9f29d7d4 Update Actions article
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-05 17:11:30 -08:00
Tom Eastep
99ddb17c9e Update the Macros article
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-05 17:11:05 -08:00
Tom Eastep
8ea9d0bbef Mention capabilities file to speed up 'start'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-02 10:45:21 -08:00
Tom Eastep
ebe09a95b8 Lightweight format_rule() for use in digest creation
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-02 09:27:19 -08:00
Tom Eastep
f32b304eb6 Describe disabling shorewall under systemd in the FAQs
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-31 14:59:15 -08:00
Tom Eastep
7bdd69d151 Optimization category 8 tweaks
- Document cost of the category in shorewall.conf(5)
- Omit DONT_DELETE chains from consideration right off the bat

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-31 14:58:01 -08:00
Tom Eastep
a08f0cfe10 Avoid awkward blank lines
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-30 19:15:10 -08:00
Tom Eastep
09a81ae574 Omit trailing black space from the generated script
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-30 14:31:54 -08:00
Tom Eastep
7042d586b2 Clarify BLACKLIST_DISPOSITION in shorewall.conf(5)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-30 13:54:03 -08:00
Tom Eastep
e17c4ac8af Reorganize code around wait/Interface-variable fix
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-30 11:25:37 -08:00
Tom Eastep
a6000ee963 Reorganize code around wait/Interface-variable fix
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-30 11:25:04 -08:00
Tom Eastep
0ab1464f51 Merge branch '5.1.12' 2018-01-28 14:54:23 -08:00
Tom Eastep
789854adce Revert "Correct order of optional interface and address variable handling"
This reverts commit fbee4a91fd.
2018-01-28 14:54:06 -08:00
Tom Eastep
37101a2031 Merge branch '5.1.11' into 5.1.12 2018-01-28 13:15:42 -08:00
Tom Eastep
40bcfd15e5 Revert "Correct order of optional interface and address variable handling"
This reverts commit f4cae55c1e.
2018-01-28 13:15:13 -08:00
Tom Eastep
230ab06e5d Reverse order of required-interface and address variable processing
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-28 13:10:44 -08:00
Tom Eastep
09cda21dd4 Revert "Correct order of optional interface and address variable handling"
This reverts commit 9253f90ac5.
2018-01-28 12:29:38 -08:00
Tom Eastep
9253f90ac5 Correct order of optional interface and address variable handling
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-28 11:39:06 -08:00
Tom Eastep
f4cae55c1e Correct order of optional interface and address variable handling
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-28 10:54:03 -08:00
Tom Eastep
fbee4a91fd Correct order of optional interface and address variable handling
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-28 10:53:20 -08:00
Tom Eastep
cb7071a213 Clarify BLACKLIST_DISPOSITION in shorewall.conf(5)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-28 10:52:35 -08:00
Tom Eastep
cdf5ad45d5 Eliminate the MAPOLDACTIONS option
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-24 12:59:26 -08:00
Tom Eastep
070a67d665 Deimplement OPTIMIZE_USE_FIRST
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-24 11:56:20 -08:00
Tom Eastep
9796c58eb2 Add OPTIMIZE_MASK constant
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-23 13:15:44 -08:00
Tom Eastep
cabc20957f Delete an unnecessary variable
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-23 09:45:50 -08:00
Tom Eastep
a9a379c5a5 Implement INPUT SNAT
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-22 16:37:38 -08:00
Tom Eastep
3bf5066f82 Document multiple DEST interfaces in the snat file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-22 11:12:28 -08:00
Tom Eastep
b2c33a0f9a Add snat to the list of manpages
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-22 10:48:58 -08:00
Tom Eastep
64f704a964 Improve quoting in the route-balancing logic
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-21 14:46:51 -08:00
Tom Eastep
416224ee05 Correct typos and anachronisms in Chains.pm comments
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-21 11:53:58 -08:00
Tom Eastep
92ce1beddc Move read_yesno_with_timeout() to lib.cli-std
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-20 14:26:13 -08:00
Tom Eastep
4d6bf8564e Avoid unnecessary variable expansion
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-20 14:25:42 -08:00
Tom Eastep
fb4b362724 Eliminate unnecessary local array
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-20 13:26:10 -08:00
Tom Eastep
97de2be778 Change a fatal_error() call with an assertion in add_policy_rules()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-19 13:39:51 -08:00
Tom Eastep
85cae3c7f8 Add parens to improve readability
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-19 12:47:17 -08:00
Tom Eastep
acd425a3c2 Remove superfluous logic from validate_portpari1()
- Add comments

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-19 12:46:52 -08:00
Tom Eastep
4e6949f996 Document port masquerading
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-19 08:55:56 -08:00
Tom Eastep
5d7dcc3122 Unify variable style
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-18 13:42:13 -08:00
Tom Eastep
23d498146b Merge branch '5.1.11'
# Conflicts:
#	Shorewall/lib.cli-std
2018-01-18 13:40:37 -08:00
Tom Eastep
422d0b216a Don't use the -quit option to Busybox find
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-18 13:39:44 -08:00
Tom Eastep
37ecbff23a Merge branch '5.1.11'
# Conflicts:
#	Shorewall/lib.cli-std
2018-01-18 13:37:52 -08:00
Tom Eastep
491309a78a Don't use the -quit option to Busybox find
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-18 13:36:23 -08:00
Tom Eastep
bc993c384c Don't use the -quit option to Busybox find
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-18 11:34:46 -08:00
Matt Darfeuille
0e4c1cdac1 Init: Correct indentation
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-12 10:26:37 -08:00
Tom Eastep
27a0f0f7a0 Make TRACK_PROVIDERS=Yes the default
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-10 08:46:01 -08:00
Tom Eastep
9ac075fd56 Clear the connection mark in tunneled packets from tracked providers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-09 17:12:14 -08:00
Tom Eastep
b2604583af Revert "Clear the connection mark in tunneled packets from tracked providers"
This reverts commit 62c6411cb0.
2018-01-09 17:01:51 -08:00
Tom Eastep
62c6411cb0 Clear the connection mark in tunneled packets from tracked providers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-09 14:51:57 -08:00
Matt Darfeuille
6badf3ce1a Update supported Shorewall version
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-08 09:08:53 -08:00
Tom Eastep
1bc90beb01 Update copyrights
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-07 15:01:46 -08:00
Tom Eastep
eaccf033c6 Update copyrights for 2018
- Update some header versions to 5.1

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-07 14:24:01 -08:00
Tom Eastep
056711d304 Remove anachronistic comment
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-06 13:58:20 -08:00
Tom Eastep
0aa0bebe07 Reword error message
- "Invalid action name ..." to "Reserved action name ..."

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-06 13:56:36 -08:00
Tom Eastep
1a68d87c94 Don't enable forwarding in 'clear'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-04 15:39:07 -08:00
Tom Eastep
c518cfaa4a Allow address variables to work correctly with the 'clear' command
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-03 08:58:28 -08:00
Tom Eastep
196a56ea3c Permit when firewall stopped when using an ipset for dynamic BL
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-02 13:26:32 -08:00
Tom Eastep
2c3f121835 Don't call setup_dbl() unconditionally
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-02 13:11:31 -08:00
Tom Eastep
18ba5c7311 Don't verify 'conntrack' utility for 'remote-' commands
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-02 11:52:35 -08:00
Tom Eastep
c8774110c6 Correct typo (rootonly => root_only)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-02 11:51:42 -08:00
Tom Eastep
1479e955d4 Add FAQ 106 (startup at boot on Debian)
- mention reload as a faster alternative to restart

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-02 08:52:12 -08:00
Tom Eastep
09980cc75e Use split() in uptodate()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-31 15:59:28 -08:00
Tom Eastep
e0a757ea03 Quit find after finding the first newer file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-31 14:15:45 -08:00
Tom Eastep
550003f0f4 Only look at regular files when running 'find'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-31 14:09:51 -08:00
Tom Eastep
4f50303318 Merge branch '5.1.10'
# Conflicts:
#	Shorewall/lib.cli-std
2017-12-31 14:06:52 -08:00
Tom Eastep
5053999442 Don't run 'find' in the PWD
- Also remove -mindepth so as to catch deletions in the directories

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-31 13:33:16 -08:00
Tom Eastep
6b5889177b Correct startup_error() inadvertent change
- Switch ensure_root() back to calling startup_error()

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-30 09:24:21 -08:00
Tom Eastep
71f8bad300 Tweak Shared Config doc
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-30 08:44:49 -08:00
Tom Eastep
377c9f5708 Only search files in each CONFIG_PATH directory - no recursion
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-30 08:44:05 -08:00
Tom Eastep
45a164733b Fix breakage of ipp2p
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-30 08:38:14 -08:00
Tom Eastep
6f82bfe7d1 Handle PROTO '-' in conntrack file processing.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-29 15:54:15 -08:00
Tom Eastep
4e5b98d3d9 Only search files in each CONFIG_PATH directory - no recursion
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-29 15:42:09 -08:00
Tom Eastep
078c781dfa Allow override of :syn assumption in CT rules
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-29 15:15:33 -08:00
Tom Eastep
46f68c6dcb Move adjustment of the protocol in process_conntrack_rule()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-29 13:51:33 -08:00
Tom Eastep
b42678269c Revert "Add :syn to each TCP entry in the conntrack file"
This reverts commit f861f8da35.
2017-12-29 13:08:27 -08:00
Tom Eastep
9bd10c0c00 Call fatal_error (not startup_error) when non-root does default compile
- Also reword the message
2017-12-29 12:49:43 -08:00
Tom Eastep
f861f8da35 Add :syn to each TCP entry in the conntrack file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-29 12:38:58 -08:00
Tom Eastep
9e3cb27d0a Use the synchain name in log messages rather than the base chain name
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-28 14:13:50 -08:00
Tom Eastep
5b97800901 Tweak Shared Config doc
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-28 13:26:39 -08:00
Tom Eastep
d8a22d13dd Allow non-root to run many 'show' commands
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-28 10:49:09 -08:00
Tom Eastep
675e41e6a6 Merge branch 'master' into 5.1.10 2017-12-27 11:15:25 -08:00
Tom Eastep
28f6379956 Fix broken links in the blacklisting article
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-26 16:57:44 -08:00
Tom Eastep
c9b58e203b Fix broken links in the blacklisting article
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-26 16:56:37 -08:00
Tom Eastep
9afe8daae0 Merge branch '5.1.10'
# Conflicts:
#	Shorewall-core/install.sh
#	Shorewall/install.sh
2017-12-26 15:45:20 -08:00
Tom Eastep
43adcd26a1 Make the /etc and the configfiles .conf files the same
Signed-off-by: Tom Eastep <teastep@shorewall.net>

# Conflicts:
#	Shorewall/install.sh
2017-12-26 15:39:26 -08:00
Tom Eastep
65371437b5 Correct installer for case where SHAREDIR != /usr/share/
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-26 15:36:38 -08:00
Tom Eastep
cc2022e172 Correct installer for case where SHAREDIR != /usr/share/
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-26 15:00:15 -08:00
Tom Eastep
f2a565729f Replace $PRODUCT with ${PRODUCT}
- Also correct one incidence of PRODUCT that should have been $PRODUCT

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-26 14:00:00 -08:00
Tom Eastep
ea8b2a803a Make the /etc and the configfiles .conf files the same
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-26 11:48:33 -08:00
Tom Eastep
16832149ca Remove unneeded modification of $CONFDIR/$PRODUCT/$PRODUCT.conf
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-26 11:35:56 -08:00
Tom Eastep
7edf4918d7 Remove leading ":" from CONFIG_PATH in active shorewall[6].conf
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-26 10:27:19 -08:00
Tom Eastep
d3a1dc1e2a Delete superfluous semicolon.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-25 08:45:42 -08:00
Matt Darfeuille
f68f47d01b Init: Fix when to compile the firewall on Debian
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-25 08:37:00 -08:00
Tom Eastep
b1d1fa862a Add comment noting that the 'physwild' interface member is currently unused
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-23 10:58:16 -08:00
Tom Eastep
24acf25451 Delete unused find_interfaces_by_option1()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-23 10:53:16 -08:00
Tom Eastep
229c47ac6c Don't delete options that are to be ignored from %options
- specifying some options can have side-effects that cause
  $interfaceref->{options}{$option} to be accessed

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-23 10:47:22 -08:00
Tom Eastep
38de9c1732 Make wildcard/option checks order-independent WRT the options
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-23 10:24:08 -08:00
Tom Eastep
17f4fd7cd2 Initialize $physwild to $wildcard
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-22 15:42:16 -08:00
Tom Eastep
cfd02c1bb6 More $minroot changes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-22 13:58:38 -08:00
Tom Eastep
02caeb5aa0 Remove sourceroute=0 from IPv6 Universal interface options
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-22 13:44:11 -08:00
Tom Eastep
19b7601c72 Improve handling of wildcard interfaces and options
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-22 13:43:45 -08:00
Tom Eastep
5a8e9cd0a3 Correct $minroot logic
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-22 09:08:27 -08:00
Tom Eastep
b5a6067588 Describe default interval and decay for rate estimator policing filters
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-20 09:04:52 -08:00
Tom Eastep
45468af2d2 Correct ingress policing for later releases of iproute2
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-18 11:52:19 -08:00
Tom Eastep
6c018f478c Avoid unnecessary recompilation by Shorewall-init
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-18 10:25:56 -08:00
Tom Eastep
dec3cacb2a Correct typo in the Helpers Article
Port 1729 -> port 1723 for PPTP

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-08 15:28:01 -08:00
Tom Eastep
4ab8e1f0a2 Remove PSH from the FIN action
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-05 15:25:54 -08:00
Tom Eastep
821d72093a Rename DEFAULTACTION_SECTION to POLICYACTION_SECTION.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-02 16:25:15 -08:00
Tom Eastep
42d5d13780 Retain proto setting when switching inline <-> noinline
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-02 13:40:41 -08:00
Tom Eastep
7121a0f1b1 Disallow a protocol on the Reject Action
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-02 12:58:05 -08:00
Tom Eastep
ab12d63a4f Change 'default action' to 'policy action' in comments and messages
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-02 12:55:17 -08:00
Tom Eastep
6ba1d5413b Allow a protocol to be associated with an action
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-02 11:24:08 -08:00
Tom Eastep
4fc572f664 Exit the IPv6 AllowICMPs chain if packet isn't ipv6-icmp
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-01 14:50:17 -08:00
Tom Eastep
138e64c54a Improve the documentation surrounding DNS names.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-01 09:25:20 -08:00
Tom Eastep
b04b65cac8 Clear counters in all tables during 'reset'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-30 14:31:59 -08:00
Tom Eastep
c907748b52 Correct typo in 'dump'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-30 14:31:33 -08:00
Tom Eastep
7f3414e3d8 Merge branch 'master' of ssh://git.code.sf.net/p/shorewall/code 2017-11-29 08:19:57 -08:00
Roberto C. Sánchez
c75fe2ea8d Fix typo 2017-11-29 06:56:06 -05:00
Tom Eastep
5dcb684efc Don't be specific when deleting IPv6 balanced/fallback default routes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-28 15:26:17 -08:00
Tom Eastep
3e87e5004a Merge branch 'master' of ssh://git.code.sf.net/p/shorewall/code 2017-11-27 09:36:13 -08:00
Roberto C. Sánchez
c89b113a61 Fix typos 2017-11-26 15:39:59 -05:00
Tom Eastep
7289175070 Chop first config dir if non-root or if compiling for export.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-23 09:57:12 -08:00
Tom Eastep
5aaf1e53de IPv6 Samples use logical interface names
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-22 09:56:45 -08:00
Tom Eastep
a9373d727b Use logical interface names in the samples.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-22 09:40:15 -08:00
Tom Eastep
528b473f6b Add some additional documentation to the Config module
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-22 08:41:37 -08:00
Tom Eastep
d22210c074 Set g_export before calling get_config()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-14 13:46:41 -08:00
Tom Eastep
89d6009200 Revert "Fix for copying SYSCONFFILE. Gave a Permission denied on OpenWRT"
This reverts commit f0cb3f50e4.
2017-11-14 10:48:56 -08:00
Tom Eastep
f411f7dd31 Remove redundant test
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-14 10:45:10 -08:00
Tom Eastep
502e98eb9f Add Redfish console to the IPMI macro
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-14 10:44:54 -08:00
Tom Eastep
f73bad440d Don't verify IP and SHOREWALL_SHELL when compiling/checking for test
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-14 10:02:15 -08:00
W. van den Akker
f0cb3f50e4 Fix for copying SYSCONFFILE. Gave a Permission denied on OpenWRT
Signed-off-by: W. van den Akker <wvdakker@wilsoft.nl>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-14 09:01:06 -08:00
W. van den Akker
23bc019a82 Add OpenWRT options.
Signed-off-by: W. van den Akker <wvdakker@wilsoft.nl>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-14 09:00:46 -08:00
Tom Eastep
9d299ef866 Don't verify IP and SHOREWALL_SHELL setting when compiling for export
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-14 08:50:05 -08:00
Tom Eastep
2a9272ccd1 Clean up RAs involving "|"
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-14 08:26:17 -08:00
Tom Eastep
130ddff9de Correct a typo in an error message
- Includes cosmetic changes to Providers.pm

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-10 11:25:52 -08:00
Tom Eastep
9cf298482d Merge branch '5.1.8' 2017-11-09 12:59:59 -08:00
Tom Eastep
c5a586aa37 Allow [...] around gateway address in the providers file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-09 12:20:01 -08:00
Tom Eastep
0670ecaf5e Update Shared Configuration Article
- Add network graphic

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-08 18:47:23 -08:00
Tom Eastep
d3eebde464 Add another restriction for SAVE_IPSETS=Yes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-08 10:56:57 -08:00
Tom Eastep
832418585a Don't make persistent routes and rules dependent on autosrc.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-08 09:46:25 -08:00
Tom Eastep
605f61fb3c Don't make persistent routes and rules dependent on autosrc.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-08 09:45:59 -08:00
Tom Eastep
824f4ca570 Update Shared Configuration document
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-08 09:44:40 -08:00
Tom Eastep
9acdbb5acf Unify online manpages
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-03 10:43:48 -07:00
Tom Eastep
8dfa0be611 Add shorewall-logging(5)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-02 15:26:14 -07:00
Tom Eastep
ef8b85fc3e Implement support for logging in the SNAT file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-02 12:44:42 -07:00
Tom Eastep
2b5613026a Merge branch '5.1.8' 2017-10-25 09:14:20 -07:00
Tom Eastep
c7c318c0e7 Align columns in actions.std
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-25 09:13:37 -07:00
Tom Eastep
b48e5a8932 Create new Netfilter diagram using Dia
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-25 09:13:08 -07:00
Tom Eastep
d1976189aa Correct a couple of typos in the manpages
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-22 12:59:31 -07:00
Tom Eastep
6b4905c2c0 Replace 'tcp' with '6' in action.TCPFlags
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-20 12:33:36 -07:00
Tom Eastep
774b707352 Inline Multicast when Address Type Match is available
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-20 12:01:41 -07:00
Tom Eastep
c3bd58827f Align columns in actions.std
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-20 11:44:10 -07:00
Tom Eastep
b35f1112f4 Allow 'noinline' in /etc/shorewall[6]/actions to override 'inline'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-20 09:19:50 -07:00
Tom Eastep
a0eb91cb90 Inline the Broadcast action when ADDRTYPE match is available
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-20 08:49:14 -07:00
Tom Eastep
105e6a3d01 Create new Netfilter diagram using Dia
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-19 14:51:36 -07:00
Tom Eastep
77d9eeb915 Eliminate extra parameter editing of TPROXY parameter list.
- Clarify syntax for actions with multiple parameters

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-19 13:08:12 -07:00
Tom Eastep
17838c1443 Add TCPMSS to the allowed mangle actions.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-19 12:58:38 -07:00
Tom Eastep
5867ce6c3b CLAMPMSS now done in the mangle table.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-18 15:55:07 -07:00
Tom Eastep
84cd80eba9 Update the Shared Config document
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-17 16:51:35 -07:00
Tom Eastep
9b02f7a922 Update Shared config article
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-15 19:15:13 -07:00
Tom Eastep
f1975ae9b0 More robust detection of empty SPD entries.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-15 08:26:27 -07:00
Tom Eastep
7b9f7c095d Don't dump SPD entries for the other address family
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-14 13:39:00 -07:00
Tom Eastep
8ea96098bf Warning when 'persistent' used with RESTORE_DEFAULT_ROUTE=Yes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-11 15:22:07 -07:00
Tom Eastep
02ed36332a Revert "Warn when RESTORE_DEFAULT_ROUTE=Yes and a persistent provider is defined"
This reverts commit 39a3c72057.
2017-10-11 11:24:54 -07:00
Tom Eastep
15a3b29a32 Revert "Document warning when RESTORE_DEFAULT_ROUTE=Yes and 'persistent'"
This reverts commit bfab002dda.
2017-10-11 11:24:39 -07:00
Tom Eastep
cb4f9e7261 Don't restore default routes when there is an enabled fallback provider
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-11 11:24:13 -07:00
Tom Eastep
bfab002dda Document warning when RESTORE_DEFAULT_ROUTE=Yes and 'persistent'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-11 11:01:09 -07:00
Tom Eastep
ddb12fcad9 Add/correct comments
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-11 11:00:46 -07:00
Tom Eastep
42ce754961 Don't restore default routes when a fallback= provider is enabled
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-11 11:00:05 -07:00
Tom Eastep
5cd4d63bc5 Delete main default routes when a fallback provider is enabled
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-11 10:59:31 -07:00
Tom Eastep
5b567f2d8b Correct delete_default_routes() in tables other than main
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-11 10:58:48 -07:00
Tom Eastep
39a3c72057 Warn when RESTORE_DEFAULT_ROUTE=Yes and a persistent provider is defined
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-11 10:58:09 -07:00
Tom Eastep
b47e633c38 Use 'route replace' rather than 'route add' to avoid persistence issues
Previous failure case was:

- disable interface
- reload
- enable interface

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-09 08:58:10 -07:00
Tom Eastep
1b55a37a28 Ensure that 'rule add' commands don't fail with persistent interfaces
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-08 08:53:53 -07:00
Tom Eastep
a97dcd23d0 Allow merging of rules that specify an IPSEC policy
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-07 13:17:43 -07:00
Tom Eastep
108b169d8d Treat LOG_TARGET like all other capabilities
- Previous implementation could generate unworkable script when
  LOAD_HELPERS_ONLY=Yes

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-06 08:01:52 -07:00
Tom Eastep
a9fbaa57ed Pass -$g_family to 'ip xfrm' commands
- This currently doesn't work correctly, but maybe it will in the future

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-10-06 08:00:29 -07:00
Tom Eastep
317f12041b Strengthen the test for empty SPD entries
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-30 15:43:17 -07:00
Tom Eastep
8469f983d8 Merge branch '5.1.7'
# Conflicts:
#	Shorewall/Perl/prog.footer
2017-09-29 15:25:37 -07:00
Tom Eastep
f54acb665a Correct handling of mark range in MARK target.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-29 14:44:33 -07:00
Tom Eastep
3d2e9eb93e Improve the fix for SELinux "getattr" denials
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-28 15:16:50 -07:00
Tom Eastep
c6a939301f Improve the fix for SELinux "getattr" denials
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-28 15:16:00 -07:00
Tom Eastep
1cb98254cc Handle SELinux getattr denials in open() processing
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-26 16:42:54 -07:00
Tom Eastep
baa791a1e3 Handle SELinux getattr denials in open() processing
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-26 16:41:50 -07:00
Tom Eastep
8b4b965f63 Remove unnecessary disable/enable of script generation
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-21 14:36:30 -07:00
Tom Eastep
8ee2d6246c Update a comment in the compiler
- get_configuration() also processes the shorewallrc file(s)

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-21 12:32:34 -07:00
Tom Eastep
a7be3dfece Align progress messages produced by 'reenable'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-19 13:29:13 -07:00
Tom Eastep
846e8c4ece Correct reenable logic
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-19 13:29:08 -07:00
Tom Eastep
e2bf7e6584 Align progress messages produced by 'reenable'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-19 13:28:09 -07:00
Tom Eastep
ff3994f6a1 Correct reenable logic
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-19 13:17:50 -07:00
Tom Eastep
494ec9c59c Avoid extra comparison in reload_command()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-19 10:49:11 -07:00
Tom Eastep
1cde92e8f3 Initialize g_dockeringress
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-19 10:43:44 -07:00
Tom Eastep
721a1e3b33 Initialize g_dockeringress
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-19 10:39:52 -07:00
Tom Eastep
84fa774cb7 Change copyright dates in lib.runtime
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-19 09:03:00 -07:00
Tom Eastep
c39bc7b65f Update version of lib.*installer
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-18 13:09:35 -07:00
Tom Eastep
2548e8741d Update version and copyright dates in lib.common
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-18 13:07:37 -07:00
Tom Eastep
0a31fba6bb Update version and copyright dates in lib.core
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-18 13:00:50 -07:00
Tom Eastep
9701c9c522 Update version and copyright dates in lib.base
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-18 12:57:02 -07:00
Tom Eastep
973d352209 Update shorewall script
- Update copyright dates
- Add a comment about PRODUCT setting

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-18 12:51:27 -07:00
Tom Eastep
91e59c2ed4 Remove the Lite Makefiles
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-18 11:56:04 -07:00
Tom Eastep
be5aabcbfb Correct typo in Chains.pm
&g_dockeringress -> $g_dockeringress

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-18 10:14:22 -07:00
Tom Eastep
a8937e6bc8 Correct harmless typo
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-18 10:06:41 -07:00
Tom Eastep
e91bd9a0e9 Remove useless/empty .tmp file when SAVE_IPSETS is set
- Add SAVE_IPSETS support to the Redhat/Fedora sysv init script

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-18 09:28:43 -07:00
Tom Eastep
5e1cf17ebc DOCKER-INGRESS support
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-17 10:57:29 -07:00
Tom Eastep
85a7ec6fe5 Correct module loading in the compiler
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-14 15:08:38 -07:00
Tom Eastep
fb831e3128 Remove empty/useless ipsets tmp file in Shorewall-init
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-12 11:56:24 -07:00
Tom Eastep
2ed11c7e15 Default ADD_IP_ALIASES to 'No' in Shorewall6
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-12 11:55:53 -07:00
Tom Eastep
ef1353790e Correct VLSM editing in the 'ipcalc' command.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-12 10:53:41 -07:00
Tom Eastep
4f79d2e82b Move and simplify handling of nat columns
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-12 10:53:04 -07:00
Tom Eastep
e6a2ba78a4 Correct handling of DEST column during action invocation
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-08 10:05:37 -07:00
Tom Eastep
41ea3bdeda Modify the Event actions to handle NAT rules
- Separate DNAT and REDIRECT into DNAT- and REDIRECT- plus ACCEPT

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-08 09:47:12 -07:00
Tom Eastep
1065c2951b Allow NAT targets to be passed to the Event actions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-08 09:46:03 -07:00
Tom Eastep
3b373f3f21 Correct handling of ipsets in the DEST column of the snat file
- Also corrected handling of exclusion

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-06 11:30:42 -07:00
Tom Eastep
0c05ab3bff Correct typo in shorewall-snat(5)
- missing ':' in IPv4 Example 4.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-09-05 10:29:19 -07:00
Tom Eastep
ef3a33e3f4 Merge branch '5.1.6'
# Conflicts:
#	Shorewall-core/lib.common

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-30 15:02:23 -07:00
Tom Eastep
8a78fb6e77 Correct -p check for the conntrack utility's availability
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-29 09:06:36 -07:00
Tom Eastep
b54a691110 Improve dynamic gateway detection
- Use provider's routing table, if any

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-23 15:04:47 -07:00
Tom Eastep
90f33dd436 Eliminate MODULE_SUFFIX
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-23 12:48:14 -07:00
Tom Eastep
b7aef24d7c Delete useless line of code
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-23 12:18:29 -07:00
Tom Eastep
6f475cde3f Eliminate MODULE_SUFFIX
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-23 10:19:25 -07:00
Tom Eastep
6053a40af0 Apply Tuomo Soini's loadmodule patch
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-23 09:20:50 -07:00
Tom Eastep
7e4dba7623 Revert "Correct check for module already loaded"
This reverts commit 2e98d4375b.
2017-08-23 08:01:25 -07:00
Tom Eastep
3d322d31b7 Add UDP rule to macro.RDP
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-22 08:07:32 -07:00
Tom Eastep
34e4fffd7d Module suffix changes
- Re-order default list in the compiler to match lib.common
- MODULE_SUFFIX="ko ko.xz" in standard .conf files.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-21 12:44:23 -07:00
Tom Eastep
2e98d4375b Correct check for module already loaded
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-21 10:27:29 -07:00
Tom Eastep
419ff8903b Invert logic in Shorewall::Chains::delete_reference() - better readability
- similar change in Shorewall::Chains::adjust_reference_counts()

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-19 12:25:27 -07:00
Tom Eastep
390ac30be8 Remove a superfluous line of code from Shorewall::Chains::format_rule()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-19 12:12:54 -07:00
Tom Eastep
8cb98f16ea Add a comment in Shorewall::Chains::optimize_level8()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-19 08:08:24 -07:00
Tom Eastep
5a9f179e25 Allow port variables as the server port in DNAT rules
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-16 15:36:18 -07:00
Tom Eastep
d8eca457de Correct typo in the Aliased Interfaces article.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-16 08:24:44 -07:00
Tom Eastep
8641d53bd1 Use MUTEX_TIMEOUT for ip[6]tables --wait interval
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-15 14:02:08 -07:00
Tom Eastep
7e3521e221 RESTORE_WAIT_OPTION
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-13 18:56:40 -07:00
Tom Eastep
0603f8e355 Serialize start of IPv4 and IPv6 under systemd
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-13 12:48:18 -07:00
Tom Eastep
ddefde2d10 Correct handling of address variables in DNAT rule.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-13 08:30:11 -07:00
Tom Eastep
2beeedd8fe Remove incorrect '+' info from shorewall-interfaces(5)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-12 12:19:00 -07:00
Tom Eastep
1a2647618e Allow runtime address variables as the server IP in DNAT rules
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-12 12:18:16 -07:00
Tom Eastep
72293883dd Tabify the Zones module
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-12 11:28:14 -07:00
Tom Eastep
c31397532c Verify that parent and child zones have a common interface
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-12 09:24:05 -07:00
Tom Eastep
d0861e813b Make Shorewall's handling of '+' consistent with that of iptables
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-12 08:22:57 -07:00
Tom Eastep
5d5bef105a Remove reference to swping from the shorewall-init article.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-11 13:38:58 -07:00
Tom Eastep
da62bd2b32 Use a hash slice in recently-added code
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-11 13:38:34 -07:00
Tom Eastep
a83c19cc33 Adjust some default values in shorewall.conf(5)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-10 15:48:16 -07:00
Tom Eastep
96a33395e8 Correct typo in the Squid document
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-09 15:42:19 -07:00
Tom Eastep
dabe8abe52 Add 'action' to the conntrack columns for alternate input
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-09 12:41:45 -07:00
Tom Eastep
a504820d19 Correct optimize level 8 handling of policy and policychain
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-07 16:56:30 -07:00
Matt Darfeuille
8db4265ccc docs: Clarify path for locating Shorewall files
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-07 13:48:47 -07:00
Tom Eastep
4c2c1bcdf1 Export CONFDIR and SHAREDIR to the generated script.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-06 13:42:01 -07:00
Tom Eastep
f2ee8013fc Update the providers manpage re balanced IPv6 routes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-05 10:12:42 -07:00
Tom Eastep
56c8f70b52 Describe the parameters passed to the enable and disable extension scripts
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-04 12:38:14 -07:00
Tom Eastep
657215f9b5 Add sample enabled and disabled scripts
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-03 12:50:49 -07:00
Tom Eastep
5589ab76d9 Add arguments to the enabled and disabled user exits
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-03 12:44:15 -07:00
Tom Eastep
ec0e6763e4 add 'enabled' and 'disabled' to the Extension Script Article
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-02 15:44:48 -07:00
Tom Eastep
6425e5ae5d Remove superfluous white space in the generated script
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-02 14:09:05 -07:00
Tom Eastep
8521c6f750 Merge branch '5.1.5' 2017-08-02 14:02:03 -07:00
Tom Eastep
c57edb0fbf Update FAQ2* to use address variables
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-01 14:56:20 -07:00
Tom Eastep
80e6cd8a2f Add enabled and disabled user exits
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-29 15:15:57 -07:00
Tom Eastep
69a0061d0f Correct handling of MAC addresses in the accounting file.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-27 14:55:19 -07:00
Tom Eastep
5a24953e6c Merge branch '5.1.5' 2017-07-27 09:14:50 -07:00
Tom Eastep
eea3cca90c Correct handling of USER/GROUP in the OUTPUT accounting section
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-27 09:01:46 -07:00
Tom Eastep
a420ef04d9 Correct tcfilter source port handling when BASIC_FILTERS=Yes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-26 16:48:53 -07:00
Tom Eastep
e573436b12 Correct tcfilter source port handling when BASIC_FILTERS=Yes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-23 12:14:57 -07:00
Tom Eastep
7f44473387 Correct some typos in the Install article
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-23 10:44:46 -07:00
Tom Eastep
cf9773c4de Update FAQ 76 to make it non-Debian specific
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-21 16:56:08 -07:00
Tom Eastep
939f0e92a5 Allow configure.pl to recognize $SOURCE_DATE_EPOCH
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-20 15:18:50 -07:00
Tom Eastep
320d448684 Apply Bernhard M. Wiedemann's patch for configure...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-20 15:18:41 -07:00
Tom Eastep
975a14b94f Allow configure.pl to recognize $SOURCE_DATE_EPOCH
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-20 14:48:40 -07:00
Tom Eastep
cf3c304078 Apply Bernhard M. Wiedemann's patch for configure...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-20 14:19:39 -07:00
Tom Eastep
d1a21fb678 Revert "Add SHARED_CONFIG option to shorewallrc"
This reverts commit 4e978b687d.
2017-07-20 12:23:59 -07:00
Tom Eastep
b9b7baf98d Merge branch '5.1.5' 2017-07-20 10:37:53 -07:00
Tom Eastep
92e725de97 Remove link to non-existent blog
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-16 09:23:02 -07:00
Tom Eastep
922bd9eeca Implement SPARSE=Very
- Only installs the .conf file.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-09 16:18:09 -07:00
Tom Eastep
d2b3fa476a Correct VLSM (56->60) in the Shared Config Document
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-09 16:17:16 -07:00
Tom Eastep
4e978b687d Add SHARED_CONFIG option to shorewallrc
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-07 08:25:33 -07:00
Tom Eastep
2d0cb5c2d8 Process the snat file if the masq file is empty
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-06 09:09:52 -07:00
Tom Eastep
d9dc6bcfe2 Merge branch 'master' into 5.1.5 2017-07-06 07:48:51 -07:00
Tom Eastep
ff51915b4f Add the shared config document to the index
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-06 07:48:03 -07:00
Tom Eastep
1ad796ba5d Add Warning to Squid document
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-02 18:11:42 -07:00
Tom Eastep
c8e2b4ae28 Add Shared Configs Document
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-07-02 18:11:16 -07:00
Tom Eastep
9d160d4342 Add RESTORE_DEFAULT_ROUTE to shorewall6.conf samples
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-27 15:50:56 -07:00
Tom Eastep
1301848315 Change .conf files to specify USE_NFLOG_SIZE=No
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-26 10:46:16 -07:00
Tom Eastep
f050fc6e05 Avoid issues with Perl 5.30
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-25 20:57:48 -07:00
Tom Eastep
61b6898782 Add dropBcasts action
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-25 18:36:54 -07:00
Tom Eastep
aee8c14ea6 Correct update setting of USE_NFLOG_SIZE
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-25 17:10:44 -07:00
Tom Eastep
ff2323b249 Add the USE_NFLOG_SIZE option
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-25 16:54:14 -07:00
Tom Eastep
b4a06e9656 NFLOG_SIZE capability
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-25 13:44:26 -07:00
Tom Eastep
4122021344 Improve editing of port numbers/service names
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-25 07:44:23 -07:00
Tom Eastep
71d50e0217 Use --nflog-size rather than --nflog-range
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-25 07:43:39 -07:00
Tom Eastep
1b6f15d577 Correct multiple fallback providers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-23 07:41:23 -07:00
Tom Eastep
7515520b46 Don't use symlinks for shorewall6 manpages
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-22 13:57:00 -07:00
Tom Eastep
1e2030fd6f Document leading "+" in inline matches
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-22 13:56:39 -07:00
Tom Eastep
708644f7c9 Clarify isusable and persistent providers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-21 14:26:11 -07:00
Tom Eastep
2f5687c65a Don't generate multihop routes unnecessarily
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-18 09:37:41 -07:00
Tom Eastep
66d1fbd3aa Clean up shorewall[6].conf(5)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-17 10:39:46 -07:00
Tom Eastep
c410459e27 Correct install of section 5 manpages
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-17 10:30:49 -07:00
Tom Eastep
987e54cd54 Move shorewall6-proxyndp.xml to Shorewall/manpages/shorewall-proxyndp.xml
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-17 09:07:28 -07:00
Tom Eastep
42a46d42b6 Centralize the complete list of manpages in shorewall(8)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-16 17:11:43 -07:00
Tom Eastep
d8ef934f24 Consolidate manpages between Shorewall and Shorewall6
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-16 15:01:41 -07:00
Tom Eastep
62a60ad995 Add comments around functions moved from IPAddrs.pm to Chains.pm.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-14 12:26:22 -07:00
Tom Eastep
b1ba05db2b Correct handling of port ranges and port variables
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-12 17:07:55 -07:00
Tom Eastep
57f7cb4f3c Runtime Port Variables
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-12 11:55:56 -07:00
Tom Eastep
4cf60258af Correct a runtime error with NFQUEUE.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-12 11:07:54 -07:00
Tom Eastep
1061644ac7 Clean up links in the manpages
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-06-08 15:43:59 -07:00
Tom Eastep
4a262c0e1b Add FIN action
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-05-31 08:28:27 -07:00
Tom Eastep
29ffb7eb4b Merge branch '5.1.4' 2017-05-31 08:23:07 -07:00
Tom Eastep
a775fdcb7c Remove stutter from the .conf manpages
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-05-31 08:21:45 -07:00
Tom Eastep
f21d6de4d6 Clean up the introductory part of shorewall-rules.xml
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-05-17 15:28:51 -07:00
Tom Eastep
965a8e8f68 Minor cleanup of the Config module
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-05-15 09:29:12 -07:00
Tom Eastep
eb26a467e9 Add snat and mangle to %config_files
- Tabify initialization of %config_files

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-05-12 08:37:54 -07:00
Tom Eastep
28e3218041 Update the copyrights on the two- and three-interface HOWTOs
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-05-11 15:51:28 -07:00
317 changed files with 10804 additions and 22707 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*targetname

View File

@@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
# #
# Shorewall Packet Filtering Firewall RPM configuration program - V4.6 # Shorewall Packet Filtering Firewall configuration program - V5.2
# #
# (c) 2012,2014 - Tom Eastep (teastep@shorewall.net) # (c) 2012,2014,2017 - Tom Eastep (teastep@shorewall.net)
# #
# Shorewall documentation is available at http://www.shorewall.net # Shorewall documentation is available at http://www.shorewall.net
# #
@@ -109,6 +109,9 @@ if [ -z "$vendor" ]; then
opensuse) opensuse)
vendor=suse vendor=suse
;; ;;
alt|basealt|altlinux)
vendor=alt
;;
*) *)
vendor="$ID" vendor="$ID"
;; ;;
@@ -132,6 +135,8 @@ if [ -z "$vendor" ]; then
if [ -f /etc/debian_version ]; then if [ -f /etc/debian_version ]; then
params[HOST]=debian params[HOST]=debian
ls -l /sbin/init | fgrep -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit ls -l /sbin/init | fgrep -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
elif [ -f /etc/altlinux-release ] ; then
params[HOST]=alt
elif [ -f /etc/redhat-release ]; then elif [ -f /etc/redhat-release ]; then
params[HOST]=redhat params[HOST]=redhat
rcfile=shorewallrc.redhat rcfile=shorewallrc.redhat
@@ -190,7 +195,7 @@ for p in ${!params[@]}; do
done done
echo '#' > shorewallrc echo '#' > shorewallrc
echo "# Created by Shorewall Core version $VERSION configure - " `date` >> shorewallrc echo "# Created by Shorewall Core version $VERSION configure - " `date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}"` >> shorewallrc
echo "# rc file: $rcfile" >> shorewallrc echo "# rc file: $rcfile" >> shorewallrc
echo '#' >> shorewallrc echo '#' >> shorewallrc

View File

@@ -1,6 +1,6 @@
#! /usr/bin/perl -w #! /usr/bin/perl -w
# #
# Shorewall Packet Filtering Firewall RPM configuration program - V4.5 # Shorewall Packet Filtering Firewall configuration program - V5.2
# #
# (c) 2012, 2014 - Tom Eastep (teastep@shorewall.net) # (c) 2012, 2014 - Tom Eastep (teastep@shorewall.net)
# #
@@ -74,6 +74,8 @@ unless ( defined $vendor ) {
} elsif ( $id eq 'ubuntu' || $id eq 'debian' ) { } elsif ( $id eq 'ubuntu' || $id eq 'debian' ) {
my $init = `ls -l /sbin/init`; my $init = `ls -l /sbin/init`;
$vendor = $init =~ /systemd/ ? 'debian.systemd' : 'debian.sysvinit'; $vendor = $init =~ /systemd/ ? 'debian.systemd' : 'debian.sysvinit';
} elsif ( $id eq 'alt' || $id eq 'basealt' || $id eq 'altlinux' ) {
$vendor = 'alt';
} else { } else {
$vendor = $id; $vendor = $id;
} }
@@ -117,6 +119,9 @@ if ( defined $vendor ) {
} else { } else {
$rcfilename = 'shorewallrc.debian.sysvinit'; $rcfilename = 'shorewallrc.debian.sysvinit';
} }
} elsif ( -f '/etc/altlinux-release' ){
$vendor = 'alt';
$rcfilename = 'shorewallrc.alt';
} elsif ( -f '/etc/redhat-release' ){ } elsif ( -f '/etc/redhat-release' ){
$vendor = 'redhat'; $vendor = 'redhat';
$rcfilename = 'shorewallrc.redhat'; $rcfilename = 'shorewallrc.redhat';
@@ -173,7 +178,12 @@ my $outfile;
open $outfile, '>', 'shorewallrc' or die "Can't open 'shorewallrc' for output: $!"; open $outfile, '>', 'shorewallrc' or die "Can't open 'shorewallrc' for output: $!";
printf $outfile "#\n# Created by Shorewall Core version %s configure.pl - %s %2d %04d %02d:%02d:%02d\n", VERSION, $abbr[$localtime[4]], $localtime[3], 1900 + $localtime[5] , @localtime[2,1,0]; if ( $ENV{SOURCE_DATE_EPOCH} ) {
printf $outfile "#\n# Created by Shorewall Core version %s configure.pl - %s\n", VERSION, `date --utc --date=\"\@$ENV{SOURCE_DATE_EPOCH}\"`;
} else {
printf $outfile "#\n# Created by Shorewall Core version %s configure.pl - %s %2d %04d %02d:%02d:%02d\n", VERSION, $abbr[$localtime[4]], $localtime[3], 1900 + $localtime[5] , @localtime[2,1,0];
}
print $outfile "# rc file: $rcfilename\n#\n"; print $outfile "# rc file: $rcfilename\n#\n";
print $outfile "# Input: @ARGV\n#\n" if @ARGV; print $outfile "# Input: @ARGV\n#\n" if @ARGV;

View File

@@ -2,7 +2,7 @@
# #
# Script to install Shoreline Firewall Core Modules # Script to install Shoreline Firewall Core Modules
# #
# (c) 2000-2016 - Tom Eastep (teastep@shorewall.net) # (c) 2000-2018 - Tom Eastep (teastep@shorewall.net)
# #
# Shorewall documentation is available at http://shorewall.net # Shorewall documentation is available at http://shorewall.net
# #
@@ -172,6 +172,9 @@ if [ -z "$BUILD" ]; then
opensuse) opensuse)
BUILD=suse BUILD=suse
;; ;;
alt|basealt|altlinux)
BUILD=alt
;;
*) *)
BUILD="$ID" BUILD="$ID"
;; ;;
@@ -180,6 +183,8 @@ if [ -z "$BUILD" ]; then
BUILD=debian BUILD=debian
elif [ -f /etc/gentoo-release ]; then elif [ -f /etc/gentoo-release ]; then
BUILD=gentoo BUILD=gentoo
elif [ -f /etc/altlinux-release ]; then
BUILD=alt
elif [ -f /etc/redhat-release ]; then elif [ -f /etc/redhat-release ]; then
BUILD=redhat BUILD=redhat
elif [ -f /etc/slackware-version ] ; then elif [ -f /etc/slackware-version ] ; then
@@ -238,7 +243,7 @@ case "$HOST" in
apple) apple)
echo "Installing Mac-specific configuration..."; echo "Installing Mac-specific configuration...";
;; ;;
debian|gentoo|redhat|slackware|archlinux|linux|suse|openwrt) debian|gentoo|redhat|slackware|archlinux|linux|suse|openwrt|alt)
;; ;;
*) *)
fatal_error "Unknown HOST \"$HOST\"" fatal_error "Unknown HOST \"$HOST\""
@@ -335,9 +340,8 @@ for f in lib.* ; do
done done
if [ $SHAREDIR != /usr/share ]; then if [ $SHAREDIR != /usr/share ]; then
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/${PRODUCT}/lib.base eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/shorewall/lib.base
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/${PRODUCT}/lib.core eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/shorewall/lib.cli
eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}${SHAREDIR}/${PRODUCT}/lib.cli
fi fi
# #

View File

@@ -1,7 +1,7 @@
# #
# Shorewall 5.0 -- /usr/share/shorewall/lib.base # Shorewall 5.2 -- /usr/share/shorewall/lib.base
# #
# (c) 1999-2015 - Tom Eastep (teastep@shorewall.net) # (c) 1999-2017 - Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
# #
# Shorewall 5.0 -- /usr/share/shorewall/lib.common. # Shorewall 5.2 -- /usr/share/shorewall/lib.common
# #
# (c) 2010-2015 - Tom Eastep (teastep@shorewall.net) # (c) 2010-2018 - Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #
@@ -269,53 +269,48 @@ loadmodule() # $1 = module name, $2 - * arguments
{ {
local modulename local modulename
modulename=$1 modulename=$1
shift
local moduleoptions
moduleoptions=$*
local modulefile local modulefile
local suffix local suffix
if [ -d /sys/module/ ]; then if [ -d /sys/module/ ]; then
if ! list_search $modulename $DONT_LOAD; then if ! list_search $modulename $DONT_LOAD; then
if [ ! -d /sys/module/$modulename ]; then if [ ! -d /sys/module/$modulename ]; then
shift case $moduleloader in
insmod)
for suffix in $MODULE_SUFFIX ; do for directory in $moduledirectories; do
for directory in $moduledirectories; do for modulefile in $directory/${modulename}.*; do
modulefile=$directory/${modulename}.${suffix} if [ -f $modulefile ]; then
insmod $modulefile $moduleoptions
if [ -f $modulefile ]; then return
case $moduleloader in fi
insmod) done
insmod $modulefile $* done
;; ;;
*) *)
modprobe $modulename $* modprobe -q $modulename $moduleoptions
;; ;;
esac esac
break 2
fi
done
done
fi fi
fi fi
elif ! list_search $modulename $DONT_LOAD $MODULES; then elif ! list_search $modulename $DONT_LOAD $MODULES; then
shift case $moduleloader in
insmod)
for suffix in $MODULE_SUFFIX ; do for directory in $moduledirectories; do
for directory in $moduledirectories; do for modulefile in $directory/${modulename}.*; do
modulefile=$directory/${modulename}.${suffix} if [ -f $modulefile ]; then
insmod $modulefile $moduleoptions
if [ -f $modulefile ]; then return
case $moduleloader in fi
insmod) done
insmod $modulefile $* done
;; ;;
*) *)
modprobe $modulename $* modprobe -q $modulename $moduleoptions
;; ;;
esac esac
break 2
fi
done
done
fi fi
} }
@@ -338,8 +333,6 @@ reload_kernel_modules() {
moduleloader=insmod moduleloader=insmod
fi fi
[ -n "${MODULE_SUFFIX:=ko ko.gz ko.xz o o.gz o.xz gz xz}" ]
if [ -n "$MODULESDIR" ]; then if [ -n "$MODULESDIR" ]; then
case "$MODULESDIR" in case "$MODULESDIR" in
+*) +*)
@@ -394,8 +387,6 @@ load_kernel_modules() # $1 = Yes, if we are to save moduleinfo in $VARDIR
moduleloader=insmod moduleloader=insmod
fi fi
[ -n "${MODULE_SUFFIX:=o gz xz ko o.gz o.xz ko.gz ko.xz}" ]
if [ -n "$MODULESDIR" ]; then if [ -n "$MODULESDIR" ]; then
case "$MODULESDIR" in case "$MODULESDIR" in
+*) +*)
@@ -420,7 +411,7 @@ load_kernel_modules() # $1 = Yes, if we are to save moduleinfo in $VARDIR
[ -d $directory ] && moduledirectories="$moduledirectories $directory" [ -d $directory ] && moduledirectories="$moduledirectories $directory"
done done
[ -n "$LOAD_HELPERS_ONLY" ] && modules=$(find_file helpers) || modules=$(find_file modules) modules=$(find_file helpers)
if [ -f $modules -a -n "$moduledirectories" ]; then if [ -f $modules -a -n "$moduledirectories" ]; then
[ -d /sys/module/ ] || MODULES=$(lsmod | cut -d ' ' -f1) [ -d /sys/module/ ] || MODULES=$(lsmod | cut -d ' ' -f1)
@@ -428,7 +419,7 @@ load_kernel_modules() # $1 = Yes, if we are to save moduleinfo in $VARDIR
. $modules . $modules
if [ $savemoduleinfo = Yes ]; then if [ $savemoduleinfo = Yes ]; then
[ -d ${VARDIR} ] || mkdir -p ${VARDIR} [ -d ${VARDIR} ] || mkdir -p ${VARDIR}
echo MODULESDIR="$MODULESDIR" > ${VARDIR}/.modulesdir echo MODULESDIR=\"$MODULESDIR\" > ${VARDIR}/.modulesdir
cp -f $modules ${VARDIR}/.modules cp -f $modules ${VARDIR}/.modules
fi fi
elif [ $savemoduleinfo = Yes ]; then elif [ $savemoduleinfo = Yes ]; then
@@ -510,7 +501,7 @@ ip_network() {
# #
# The following hack is supplied to compensate for the fact that many of # The following hack is supplied to compensate for the fact that many of
# the popular light-weight Bourne shell derivatives don't support XOR ("^"). # the popular light-weight Bourne shell derivatives do not support XOR ("^").
# #
ip_broadcast() { ip_broadcast() {
local x local x
@@ -760,36 +751,44 @@ mutex_on()
lockf=${LOCKFILE:=${VARDIR}/lock} lockf=${LOCKFILE:=${VARDIR}/lock}
local lockpid local lockpid
local lockd local lockd
local lockbin
local openwrt
MUTEX_TIMEOUT=${MUTEX_TIMEOUT:-60} MUTEX_TIMEOUT=${MUTEX_TIMEOUT:-60}
if [ $MUTEX_TIMEOUT -gt 0 ]; then if [ -z "$g_havemutex" -a $MUTEX_TIMEOUT -gt 0 ]; then
lockd=$(dirname $LOCKFILE) lockd=$(dirname $LOCKFILE)
[ -d "$lockd" ] || mkdir -p "$lockd" [ -d "$lockd" ] || mkdir -p "$lockd"
lockbin=$(mywhich lock)
[ -n "$lockbin" -a -h "$lockbin" ] && openwrt=Yes
if [ -f $lockf ]; then if [ -f $lockf ]; then
lockpid=`cat ${lockf} 2> /dev/null` lockpid=`cat ${lockf} 2> /dev/null`
if [ -z "$lockpid" -o $lockpid = 0 ]; then if [ -z "$lockpid" ] || [ $lockpid = 0 ]; then
rm -f ${lockf} rm -f ${lockf}
error_message "WARNING: Stale lockfile ${lockf} removed" error_message "WARNING: Stale lockfile ${lockf} removed"
elif [ $lockpid -eq $$ ]; then elif [ -z "$openwrt" ]; then
return 0 if [ $lockpid -eq $$ ]; then
elif ! ps | grep -v grep | qt grep ${lockpid}; then fatal_error "Mutex_on confusion"
rm -f ${lockf} elif ! qt ps --pid ${lockpid}; then
error_message "WARNING: Stale lockfile ${lockf} from pid ${lockpid} removed" rm -f ${lockf}
error_message "WARNING: Stale lockfile ${lockf} from pid ${lockpid} removed"
fi
fi fi
fi fi
if qt mywhich lockfile; then if [ -n "$openwrt" ]; then
lockfile -${MUTEX_TIMEOUT} -r1 ${lockf} lock ${lockf} || fatal_error "Can't lock ${lockf}"
g_havemutex="lock -u ${lockf}"
elif qt mywhich lockfile; then
lockfile -${MUTEX_TIMEOUT} -r1 ${lockf} || fatal_error "Can't lock ${lockf}"
g_havemutex="rm -f ${lockf}"
chmod u+w ${lockf} chmod u+w ${lockf}
echo $$ > ${lockf} echo $$ > ${lockf}
chmod u-w ${lockf} chmod u-w ${lockf}
elif qt mywhich lock; then
lock ${lockf}
chmod u=r ${lockf}
else else
while [ -f ${lockf} -a ${try} -lt ${MUTEX_TIMEOUT} ] ; do while [ -f ${lockf} -a ${try} -lt ${MUTEX_TIMEOUT} ] ; do
sleep 1 sleep 1
@@ -799,10 +798,15 @@ mutex_on()
if [ ${try} -lt ${MUTEX_TIMEOUT} ] ; then if [ ${try} -lt ${MUTEX_TIMEOUT} ] ; then
# Create the lockfile # Create the lockfile
echo $$ > ${lockf} echo $$ > ${lockf}
g_havemutex="rm -f ${lockf}"
else else
echo "Giving up on lock file ${lockf}" >&2 echo "Giving up on lock file ${lockf}" >&2
fi fi
fi fi
if [ -n "$g_havemutex" ]; then
trap mutex_off EXIT
fi
fi fi
} }
@@ -811,7 +815,10 @@ mutex_on()
# #
mutex_off() mutex_off()
{ {
[ -f ${CONFDIR}/rc.common ] && lock -u ${LOCKFILE:=${VARDIR}/lock} if [ -n "$g_havemutex" ]; then
rm -f ${LOCKFILE:=${VARDIR}/lock} eval $g_havemutex
g_havemutex=
trap '' exit
fi
} }

View File

@@ -1,7 +1,7 @@
# #
# Shorewall 5.0 -- /usr/share/shorewall/lib.core # Shorewall 5.2 -- /usr/share/shorewall/lib.core
# #
# (c) 1999-2015 - Tom Eastep (teastep@shorewall.net) # (c) 1999-2017 - Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #
@@ -24,7 +24,7 @@
# generated scripts. # generated scripts.
# #
SHOREWALL_LIBVERSION=50100 SHOREWALL_LIBVERSION=50108
# #
# Fatal Error # Fatal Error

View File

@@ -1,6 +1,5 @@
# #
# # Shorewall 5.2 -- /usr/share/shorewall/lib.installer
# Shorewall 5.0 -- /usr/share/shorewall/lib.installer.
# #
# (c) 2017 - Tom Eastep (teastep@shorewall.net) # (c) 2017 - Tom Eastep (teastep@shorewall.net)
# (c) 2017 - Matt Darfeuille (matdarf@gmail.com) # (c) 2017 - Matt Darfeuille (matdarf@gmail.com)

View File

@@ -1,6 +1,5 @@
# #
# # Shorewall 5.2 -- /usr/share/shorewall/lib.installer
# Shorewall 5.0 -- /usr/share/shorewall/lib.installer.
# #
# (c) 2017 - Tom Eastep (teastep@shorewall.net) # (c) 2017 - Tom Eastep (teastep@shorewall.net)
# (c) 2017 - Matt Darfeuille (matdarf@gmail.com) # (c) 2017 - Matt Darfeuille (matdarf@gmail.com)
@@ -61,7 +60,7 @@ mywhich() {
remove_file() # $1 = file to remove remove_file() # $1 = file to remove
{ {
if [ -n "$1" ] ; then if [ -n "$1" ] ; then
if [ -f $1 -o -L $1 ] ; then if [ -f $1 -o -h $1 ] ; then
rm -f $1 rm -f $1
echo "$1 Removed" echo "$1 Removed"
fi fi
@@ -85,7 +84,7 @@ remove_file_with_wildcard() # $1 = file with wildcard to remove
if [ -d $f ] ; then if [ -d $f ] ; then
rm -rf $f rm -rf $f
echo "$f Removed" echo "$f Removed"
elif [ -f $f -o -L $f ] ; then elif [ -f $f -o -h $f ] ; then
rm -f $f rm -f $f
echo "$f Removed" echo "$f Removed"
fi fi

View File

@@ -405,20 +405,6 @@
<replaceable>provider</replaceable> }</arg> <replaceable>provider</replaceable> }</arg>
</cmdsynopsis> </cmdsynopsis>
<cmdsynopsis>
<command>shorewall[6]</command>
<arg
choice="opt"><option>trace</option>|<option>debug</option><arg><option>nolock</option></arg></arg>
<arg>options</arg>
<arg
choice="plain"><option>refresh</option><arg><option>-n</option></arg><arg><option>-d</option></arg><arg><option>-T</option></arg><arg><option>-i</option></arg><arg>-<option>D</option>
<replaceable>directory</replaceable> </arg><arg
rep="repeat"><replaceable>chain</replaceable></arg></arg>
</cmdsynopsis>
<cmdsynopsis> <cmdsynopsis>
<command>shorewall[6][-lite]</command> <command>shorewall[6][-lite]</command>
@@ -459,6 +445,54 @@
<arg><replaceable>directory</replaceable></arg> <arg><replaceable>directory</replaceable></arg>
</cmdsynopsis> </cmdsynopsis>
<cmdsynopsis>
<command>shorewall[6]</command>
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
<arg>options</arg>
<arg choice="plain"><option>remote-getcaps</option></arg>
<arg><option>-s</option></arg>
<arg><option>-R</option></arg>
<arg><option>-r</option> <replaceable>root-user-name</replaceable></arg>
<arg><option>-T</option></arg>
<arg><option>-i</option></arg>
<arg><arg><option>-D</option></arg><replaceable>directory</replaceable></arg>
<arg choice="plain"><arg><replaceable>system</replaceable></arg></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>shorewall[6]</command>
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
<arg>options</arg>
<arg choice="plain"><option>remote-getrc</option></arg>
<arg><option>-s</option></arg>
<arg><option>-c</option></arg>
<arg><option>-r</option> <replaceable>root-user-name</replaceable></arg>
<arg><option>-T</option></arg>
<arg><option>-i</option></arg>
<arg><arg><option>-D</option></arg><replaceable>directory</replaceable></arg>
<arg choice="plain"><arg><replaceable>system</replaceable></arg></arg>
</cmdsynopsis>
<cmdsynopsis> <cmdsynopsis>
<command>shorewall[6]</command> <command>shorewall[6]</command>
@@ -813,7 +847,7 @@
<arg choice="req"><option>show | list | ls </option></arg> <arg choice="req"><option>show | list | ls </option></arg>
<arg choice="plain"><option>tc</option></arg> <arg choice="plain"><option>saves</option></arg>
</cmdsynopsis> </cmdsynopsis>
<cmdsynopsis> <cmdsynopsis>
@@ -1107,7 +1141,7 @@
setting in <ulink setting in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5) url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).</para> url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).</para>
<para>When no <replaceable>verbosity</replaceable> is specified, <para>When no <replaceable>verbosity</replaceable> is specified,
each instance of this option causes 1 to be added to the effective each instance of this option causes 1 to be added to the effective
@@ -1128,7 +1162,7 @@
setting in <ulink setting in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5) url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).</para> url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).</para>
<para>Each instance of this option causes 1 to be subtracted from <para>Each instance of this option causes 1 to be subtracted from
the effective verbosity.</para> the effective verbosity.</para>
@@ -1165,7 +1199,7 @@
defined in the <ulink defined in the <ulink
url="/manpages/shorewall-interfaces.html">shorewall-interfaces</ulink>(5) url="/manpages/shorewall-interfaces.html">shorewall-interfaces</ulink>(5)
(<ulink (<ulink
url="/manpages6/shorewall6-interfaces.html">shorewall6-interfaces</ulink>(5))file. url="/manpages/shorewall-interfaces.html">shorewall6-interfaces</ulink>(5))file.
A <emphasis>host-list</emphasis> is comma-separated list whose A <emphasis>host-list</emphasis> is comma-separated list whose
elements are host or network addresses.<caution> elements are host or network addresses.<caution>
<para>The <command>add</command> command is not very robust. If <para>The <command>add</command> command is not very robust. If
@@ -1180,7 +1214,7 @@
<para>Beginning with Shorewall 4.5.9, the <emphasis <para>Beginning with Shorewall 4.5.9, the <emphasis
role="bold">dynamic_shared</emphasis> zone option (<ulink role="bold">dynamic_shared</emphasis> zone option (<ulink
url="/manpages/shorewall-zones.html">shorewall-zones</ulink>(5),<ulink url="/manpages/shorewall-zones.html">shorewall-zones</ulink>(5),<ulink
url="???">shorewall6-zones</ulink>(5)) allows a single ipset to url="/manpages/shorewall-zones.html">shorewall6-zones</ulink>(5)) allows a single ipset to
handle entries for multiple interfaces. When that option is handle entries for multiple interfaces. When that option is
specified for a zone, the <command>add</command> command has the specified for a zone, the <command>add</command> command has the
alternative syntax in which the <replaceable>zone</replaceable> name alternative syntax in which the <replaceable>zone</replaceable> name
@@ -1298,7 +1332,7 @@
set to Yes in <ulink set to Yes in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5) url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).</para> url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -1316,7 +1350,7 @@
by the compiled script that executed the last successful <emphasis by the compiled script that executed the last successful <emphasis
role="bold">start</emphasis>, <emphasis role="bold">start</emphasis>, <emphasis
role="bold">restart</emphasis> or <emphasis role="bold">restart</emphasis> or <emphasis
role="bold">refresh</emphasis> command if that script exists.</para> role="bold">reload</emphasis> command if that script exists.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -1406,7 +1440,7 @@
set to Yes in <ulink set to Yes in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5) url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).</para> url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -1424,7 +1458,7 @@
defined in the <ulink defined in the <ulink
url="/manpages/shorewall-interfaces.html">shorewall-interfaces</ulink>(5) url="/manpages/shorewall-interfaces.html">shorewall-interfaces</ulink>(5)
(<ulink (<ulink
url="/manpages6/shorewall6-interfaces.html">shorewall6-interfaces</ulink>(5) url="/manpages/shorewall-interfaces.html">shorewall6-interfaces</ulink>(5)
file. A <emphasis>host-list</emphasis> is comma-separated list whose file. A <emphasis>host-list</emphasis> is comma-separated list whose
elements are a host or network address.</para> elements are a host or network address.</para>
@@ -1432,7 +1466,7 @@
role="bold">dynamic_shared</emphasis> zone option (<ulink role="bold">dynamic_shared</emphasis> zone option (<ulink
url="/manpages/shorewall-zones.html">shorewall-zones</ulink>(5), url="/manpages/shorewall-zones.html">shorewall-zones</ulink>(5),
<ulink <ulink
url="/manpages6/shorewall6-zones.html">shorewall6-zones</ulink>(5)) url="/manpages/shorewall-zones.html">shorewall6-zones</ulink>(5))
allows a single ipset to handle entries for multiple interfaces. allows a single ipset to handle entries for multiple interfaces.
When that option is specified for a zone, the When that option is specified for a zone, the
<command>delete</command> command has the alternative syntax in <command>delete</command> command has the alternative syntax in
@@ -1459,7 +1493,7 @@
command removes any routes added from <ulink command removes any routes added from <ulink
url="/manpages/shorewall-routes.html">shorewall-routes</ulink>(5) url="/manpages/shorewall-routes.html">shorewall-routes</ulink>(5)
(<ulink (<ulink
url="/manpages/shorewall6-routes.html">shorewall6-routes</ulink>(5))and url="/manpages/shorewall-routes.html">shorewall6-routes</ulink>(5))and
any traffic shaping configuration for the interface.</para> any traffic shaping configuration for the interface.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -1520,7 +1554,7 @@
adds any route specified in <ulink adds any route specified in <ulink
url="/manpages/shorewall-routes.html">shorewall-routes</ulink>(5) url="/manpages/shorewall-routes.html">shorewall-routes</ulink>(5)
(<ulink (<ulink
url="/manpages/shorewall6-routes.html">shorewall6-routes</ulink>(5)) url="/manpages/shorewall-routes.html">shorewall6-routes</ulink>(5))
and installs the interface's traffic shaping configuration, if and installs the interface's traffic shaping configuration, if
any.</para> any.</para>
</listitem> </listitem>
@@ -1565,7 +1599,7 @@
given then the file specified by RESTOREFILE in <ulink given then the file specified by RESTOREFILE in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5) url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)) is url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)) is
assumed.</para> assumed.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -1650,7 +1684,7 @@
specified by the BLACKLIST_LOGLEVEL setting in <ulink specified by the BLACKLIST_LOGLEVEL setting in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink> (5) url="/manpages/shorewall.conf.html">shorewall.conf</ulink> (5)
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)). url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).
This command requires that the firewall be in the started state and This command requires that the firewall be in the started state and
that DYNAMIC_BLACKLIST=Yes in <ulink that DYNAMIC_BLACKLIST=Yes in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf url="/manpages/shorewall.conf.html">shorewall.conf
@@ -1666,7 +1700,7 @@
<para>Monitors the log file specified by the LOGFILE option in <para>Monitors the log file specified by the LOGFILE option in
<ulink url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5) <ulink url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)) url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5))
and produces an audible alarm when new Shorewall messages are and produces an audible alarm when new Shorewall messages are
logged. The <emphasis role="bold">-m</emphasis> option causes the logged. The <emphasis role="bold">-m</emphasis> option causes the
MAC address of each packet source to be displayed if that MAC address of each packet source to be displayed if that
@@ -1689,7 +1723,7 @@
specified by the BLACKLIST_LOGLEVEL setting in <ulink specified by the BLACKLIST_LOGLEVEL setting in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink> (5), url="/manpages/shorewall.conf.html">shorewall.conf</ulink> (5),
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)). url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).
This command requires that the firewall be in the started state and This command requires that the firewall be in the started state and
that DYNAMIC_BLACKLIST=Yes in <ulink that DYNAMIC_BLACKLIST=Yes in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf url="/manpages/shorewall.conf.html">shorewall.conf
@@ -1773,63 +1807,6 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><emphasis role="bold">refresh </emphasis> [-<option>n</option>]
[-<option>d</option>] [-<option>T</option>] [-i] [-<option>D
</option><replaceable>directory</replaceable> ] [
<replaceable>chain</replaceable>... ]</term>
<listitem>
<para>Not available with Shorewall[6]-lite.</para>
<para>All steps performed by <command>restart</command> are
performed by <command>refresh</command> with the exception that
<command>refresh</command> only recreates the chains specified in
the command while <command>restart</command> recreates the entire
Netfilter ruleset. If no <replaceable>chain</replaceable> is given,
the static blacklisting chain <emphasis
role="bold">blacklst</emphasis> is assumed.</para>
<para>The listed chains are assumed to be in the filter table. You
can refresh chains in other tables by prefixing the chain name with
the table name followed by ":" (e.g., nat:net_dnat). Chain names
which follow are assumed to be in that table until the end of the
list or until an entry in the list names another table. Built-in
chains such as FORWARD may not be refreshed.</para>
<para>The <option>-n</option> option was added in Shorewall 4.5.3
causes Shorewall to avoid updating the routing table(s).</para>
<para>The <option>-d</option> option was added in Shorewall 4.5.3
causes the compiler to run under the Perl debugger.</para>
<para>The <option>-T</option> option was added in Shorewall 4.5.3
and causes a Perl stack trace to be included with each
compiler-generated error and warning message.</para>
<para>The <option>-i</option> option was added in Shorewall 4.6.0
and causes a warning message to be issued if the current line
contains alternative input specifications following a semicolon
(";"). Such lines will be handled incorrectly if INLINE_MATCHES is
set to Yes in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5).</para>
<para>The <option>-D</option> option was added in Shorewall 4.5.3
and causes Shorewall to look in the given
<emphasis>directory</emphasis> first for configuration files.</para>
<para>Example:<programlisting><command>shorewall refresh net2fw nat:net_dnat</command> #Refresh the 'net2loc' chain in the filter table and the 'net_dnat' chain in the nat table</programlisting></para>
<para>The <emphasis role="bold">refresh</emphasis> command has
slightly different behavior. When no chain name is given to the
<emphasis role="bold">refresh</emphasis> command, the mangle table
is refreshed along with the blacklist chain (if any). This allows
you to modify <filename>/etc/shorewall/tcrules </filename>and
install the changes using <emphasis
role="bold">refresh</emphasis>.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><emphasis role="bold">reject</emphasis><replaceable> <term><emphasis role="bold">reject</emphasis><replaceable>
address</replaceable></term> address</replaceable></term>
@@ -1901,13 +1878,13 @@
INLINE_MATCHES is set to Yes in <ulink INLINE_MATCHES is set to Yes in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5) url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5))..</para> url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5))..</para>
<para>The <option>-C</option> option was added in Shorewall <para>The <option>-C</option> option was added in Shorewall
4.6.5 and is only meaningful when AUTOMAKE=Yes in <ulink 4.6.5 and is only meaningful when AUTOMAKE=Yes in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5) url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)). url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).
If an existing firewall script is used and if that script was If an existing firewall script is used and if that script was
the one that generated the current running configuration, then the one that generated the current running configuration, then
the running netfilter configuration will be reloaded as is so the running netfilter configuration will be reloaded as is so
@@ -1941,6 +1918,57 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><emphasis role="bold">remote-getcaps</emphasis>
[-<option>R</option>] [-<option>r</option>
<replaceable>root-user-name</replaceable>] [ [ -D ]
<replaceable>directory</replaceable> ] [
<replaceable>system</replaceable> ]</term>
<listitem>
<para>Added in Shoreall 5.2.0, this command executes <emphasis
role="bold">shorewall[6]-lite show capabilities -f &gt;
/var/lib/shorewall[6]-lite/capabilities</emphasis> on the remote
<replaceable>system</replaceable> via ssh then the generated file is
copied to <replaceable>directory</replaceable> on the local system.
If no <replaceable>directory</replaceable> is given, the current
working directory is assumed.</para>
<para>if <emphasis role="bold">-R</emphasis> is included, the remote
shorewallrc file is also copied to
<replaceable>directory</replaceable>.</para>
<para>If <option>-r</option> is included, it specifies that the root
user on <replaceable>system</replaceable> is named
<replaceable>root-user-name</replaceable> rather than "root".</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">remote-getrc</emphasis>
[-<option>c</option>] [-<option>r</option>
<replaceable>root-user-name</replaceable>] [ [ -D ]
<replaceable>directory</replaceable> ] [
<replaceable>system</replaceable> ]</term>
<listitem>
<para>Added in Shoreall 5.2.0, this command copies the shorewallrc
file from the remote <replaceable>system</replaceable> to
<replaceable>directory</replaceable> on the local system. If no
<replaceable>directory</replaceable> is given, the current working
directory is assumed.</para>
<para>if <emphasis role="bold">-c</emphasis> is included, the remote
capabilities are also copied to
<replaceable>directory</replaceable>, as is done by the
<command>remote-getcaps</command> command.</para>
<para>If <option>-r</option> is included, it specifies that the root
user on <replaceable>system</replaceable> is named
<replaceable>root-user-name</replaceable> rather than "root".</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><emphasis role="bold">remote-start</emphasis> <term><emphasis role="bold">remote-start</emphasis>
[-<option>n</option>] [-<option>s</option>] [-<option>c</option>] [-<option>n</option>] [-<option>s</option>] [-<option>c</option>]
@@ -1978,7 +2006,7 @@
<replaceable>system</replaceable> is omitted, then the FIREWALL <replaceable>system</replaceable> is omitted, then the FIREWALL
option setting in <ulink option setting in <ulink
url="shorewall.conf.html">shorewall.conf</ulink>(5) (<ulink url="shorewall.conf.html">shorewall.conf</ulink>(5) (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf(5)</ulink>) is url="/manpages/shorewall.conf.html">shorewall6.conf(5)</ulink>) is
assumed. In that case, if you want to specify a assumed. In that case, if you want to specify a
<replaceable>directory</replaceable>, then the <option>-D</option> <replaceable>directory</replaceable>, then the <option>-D</option>
option must be given.</para> option must be given.</para>
@@ -1992,9 +2020,9 @@
role="bold">shorewall-lite save</emphasis> via ssh.</para> role="bold">shorewall-lite save</emphasis> via ssh.</para>
<para>if <emphasis role="bold">-c</emphasis> is included, the <para>if <emphasis role="bold">-c</emphasis> is included, the
command <emphasis role="bold">shorewall-lite show capabilities -f command <emphasis role="bold">shorewall[6]-lite show capabilities -f
&gt; /var/lib/shorewall-lite/capabilities</emphasis> is executed via &gt; /var/lib/shorewall[6]-lite/capabilities</emphasis> is executed
ssh then the generated file is copied to via ssh then the generated file is copied to
<replaceable>directory</replaceable> using scp. This step is <replaceable>directory</replaceable> using scp. This step is
performed before the configuration is compiled.</para> performed before the configuration is compiled.</para>
@@ -2005,13 +2033,6 @@
<para>The <option>-T</option> option was added in Shorewall 4.5.3 <para>The <option>-T</option> option was added in Shorewall 4.5.3
and causes a Perl stack trace to be included with each and causes a Perl stack trace to be included with each
compiler-generated error and warning message.</para> compiler-generated error and warning message.</para>
<para>The <option>-i</option> option was added in Shorewall 4.6.0
and causes a warning message to be issued if the current line
contains alternative input specifications following a semicolon
(";"). Such lines will be handled incorrectly if INLINE_MATCHES is
set to Yes in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5).</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -2050,8 +2071,8 @@
Beginning with Shorewall 5.0.13, if Beginning with Shorewall 5.0.13, if
<replaceable>system</replaceable> is omitted, then the FIREWALL <replaceable>system</replaceable> is omitted, then the FIREWALL
option setting in <ulink option setting in <ulink
url="shorewall6.conf.html">shorewall6.conf(5)</ulink> (<ulink url="/manpages/shorewall.conf.html">shorewall6.conf(5)</ulink> (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)) is url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)) is
assumed. In that case, if you want to specify a assumed. In that case, if you want to specify a
<replaceable>directory</replaceable>, then the <option>-D</option> <replaceable>directory</replaceable>, then the <option>-D</option>
option must be given.</para> option must be given.</para>
@@ -2083,7 +2104,7 @@
set to Yes in <ulink set to Yes in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5) url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).</para> url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -2123,8 +2144,8 @@
Beginning with Shorewall 5.0.13, if Beginning with Shorewall 5.0.13, if
<replaceable>system</replaceable> is omitted, then the FIREWALL <replaceable>system</replaceable> is omitted, then the FIREWALL
option setting in <ulink option setting in <ulink
url="shorewall6.conf.html">shorewall6.conf(5)</ulink> (<ulink url="/manpages/shorewall.conf.html">shorewall6.conf(5)</ulink> (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)) is url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)) is
assumed. In that case, if you want to specify a assumed. In that case, if you want to specify a
<replaceable>directory</replaceable>, then the <option>-D</option> <replaceable>directory</replaceable>, then the <option>-D</option>
option must be given.</para> option must be given.</para>
@@ -2156,7 +2177,7 @@
set to Yes in <ulink set to Yes in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5) url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5).</para> url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5).</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -2283,7 +2304,7 @@
restored from the file specified by the RESTOREFILE option in <ulink restored from the file specified by the RESTOREFILE option in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5) url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).</para> url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).</para>
<caution> <caution>
<para>If your iptables ruleset depends on variables that are <para>If your iptables ruleset depends on variables that are
@@ -2430,16 +2451,16 @@
<replaceable>filename</replaceable> ]</term> <replaceable>filename</replaceable> ]</term>
<listitem> <listitem>
<para>The dynamic blacklist is stored in /var/lib/shorewall/save. <para>Creates a snapshot of the currently running firewall. The
The state of the firewall is stored in dynamic blacklist is stored in /var/lib/shorewall/save. The state of
the firewall is stored in
/var/lib/shorewall/<emphasis>filename</emphasis> for use by the /var/lib/shorewall/<emphasis>filename</emphasis> for use by the
<emphasis role="bold">shorewall restore</emphasis> and <emphasis <emphasis role="bold">shorewall restore</emphasis> command. If
role="bold">shorewall -f start</emphasis> commands. If
<emphasis>filename</emphasis> is not given then the state is saved <emphasis>filename</emphasis> is not given then the state is saved
in the file specified by the RESTOREFILE option in <ulink in the file specified by the RESTOREFILE option in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5) url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).</para> url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).</para>
<para>The <option>-C</option> option, added in Shorewall 4.6.5, <para>The <option>-C</option> option, added in Shorewall 4.6.5,
causes the iptables packet and byte counters to be saved along with causes the iptables packet and byte counters to be saved along with
@@ -2456,7 +2477,7 @@
the SAVE_IPSETS option in <ulink the SAVE_IPSETS option in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink> (5) url="/manpages/shorewall.conf.html">shorewall.conf</ulink> (5)
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)). url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).
This command may be used to proactively save your ipset contents in This command may be used to proactively save your ipset contents in
the event that a system failure occurs prior to issuing a the event that a system failure occurs prior to issuing a
<command>stop</command> command.</para> <command>stop</command> command.</para>
@@ -2624,7 +2645,7 @@
accounting counters (<ulink accounting counters (<ulink
url="/manpages/shorewall-accounting.html">shorewall-accounting</ulink> url="/manpages/shorewall-accounting.html">shorewall-accounting</ulink>
(5), <ulink (5), <ulink
url="/manpages6/shorewall6-accounting.html">shorewall6-accounting</ulink>(5)).</para> url="/manpages/shorewall-accounting.html">shorewall6-accounting</ulink>(5)).</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -2648,7 +2669,7 @@
file specified by the LOGFILE option in <ulink file specified by the LOGFILE option in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5) url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)). url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).
The <emphasis role="bold">-m</emphasis> option causes the MAC The <emphasis role="bold">-m</emphasis> option causes the MAC
address of each packet source to be displayed if that address of each packet source to be displayed if that
information is available.</para> information is available.</para>
@@ -2737,6 +2758,15 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><emphasis role="bold">rc</emphasis></term>
<listitem>
<para>Added in Shorewall 5.2.0. Displays the contents of
$SHAREDIR/shorewall/shorewallrc.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>[-<option>c</option>]<emphasis role="bold"> <term>[-<option>c</option>]<emphasis role="bold">
routing</emphasis></term> routing</emphasis></term>
@@ -2762,6 +2792,20 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>saves</term>
<listitem>
<para>Added in Shorewall 5.2.0. Lists snapshots created by the
<command>save</command> command. Each snapshot is listed with
the date and time when it was taken. If there is a snapshot
with the name specified in the RESTOREFILE option in <ulink
url="shorewall.conf.html">shorewall.conf(5</ulink>), that
snapshot is listed as the <emphasis>default</emphasis>
snapshot for the <command>restore</command> command.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><emphasis role="bold">tc</emphasis></term> <term><emphasis role="bold">tc</emphasis></term>
@@ -2807,7 +2851,7 @@
in <ulink in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5) url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)) url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5))
will be restored if that saved configuration exists and has will be restored if that saved configuration exists and has
been modified more recently than the files in been modified more recently than the files in
/etc/shorewall. When <emphasis role="bold">-f</emphasis> is /etc/shorewall. When <emphasis role="bold">-f</emphasis> is
@@ -2818,7 +2862,7 @@
option was added to <ulink option was added to <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5) url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)). url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).
When LEGACY_FASTSTART=No, the modification times of files in When LEGACY_FASTSTART=No, the modification times of files in
/etc/shorewall are compared with that of /etc/shorewall are compared with that of
/var/lib/shorewall/firewall (the compiled script that last /var/lib/shorewall/firewall (the compiled script that last
@@ -2837,7 +2881,7 @@
overriding the AUTOMAKE setting in <ulink overriding the AUTOMAKE setting in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5) url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)). url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).
When both <option>-f</option> and <option>-c</option>are When both <option>-f</option> and <option>-c</option>are
present, the result is determined by the option that appears present, the result is determined by the option that appears
last.</para> last.</para>
@@ -2853,7 +2897,7 @@
INLINE_MATCHES is set to Yes in <ulink INLINE_MATCHES is set to Yes in <ulink
url="/manpages/shorewall.conf.html">shorewall.conf(5)</ulink> url="/manpages/shorewall.conf.html">shorewall.conf(5)</ulink>
(<ulink (<ulink
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).</para> url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).</para>
<para>The <option>-C</option> option was added in Shorewall <para>The <option>-C</option> option was added in Shorewall
4.6.5 and is only meaningful when the <option>-f</option> 4.6.5 and is only meaningful when the <option>-f</option>
@@ -2921,7 +2965,7 @@
by the compiled script that executed the last successful <emphasis by the compiled script that executed the last successful <emphasis
role="bold">start</emphasis>, <emphasis role="bold">start</emphasis>, <emphasis
role="bold">restart</emphasis> or <emphasis role="bold">restart</emphasis> or <emphasis
role="bold">refresh</emphasis> command if that script exists.</para> role="bold">reload</emphasis> command if that script exists.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -3172,23 +3216,38 @@
<refsect1> <refsect1>
<title>FILES</title> <title>FILES</title>
<para>/etc/shorewall/</para> <para>/etc/shorewall/*</para>
<para>/etc/shorewall6/*</para>
</refsect1> </refsect1>
<refsect1> <refsect1>
<title>See ALSO</title> <title>See ALSO</title>
<para><ulink <simplelist>
url="/starting_and_stopping_shorewall.htm">http://www.shorewall.net/starting_and_stopping_shorewall.htm</ulink></para> <member><ulink
url="/starting_and_stopping_shorewall.htm">http://www.shorewall.net/starting_and_stopping_shorewall.htm</ulink>
- Describes operational aspects of Shorewall.</member>
<para>shorewall-accounting(5), shorewall-actions(5), <member><ulink url="shorewall-files.html">shorewall-files(5)</ulink> -
shorewall-blacklist(5), shorewall-hosts(5), shorewall_interfaces(5), Describes the various configuration files along with features and
shorewall-ipsets(5), shorewall-maclist(5), shorewall-masq(5), conventions common to those files.</member>
shorewall-nat(5), shorewall-netmap(5), shorewall-params(5),
shorewall-policy(5), shorewall-providers(5), shorewall-proxyarp(5), <member><ulink url="shorewall-names.html">shorewall-names(5)</ulink> -
shorewall-rtrules(5), shorewall-routestopped(5), shorewall-rules(5), Describes naming of objects within a Shorewall configuration.</member>
shorewall.conf(5), shorewall-secmarks(5), shorewall-tcclasses(5),
shorewall-tcdevices(5), shorewall-tcrules(5), shorewall-tos(5), <member><ulink
shorewall-tunnels(5), shorewall-zones(5)</para> url="shorewall-addresses.html">shorewall-addresses(5)</ulink> -
Describes how to specify addresses within a Shorewall
configuration.</member>
<member><ulink
url="shorewall-exclusion.html">shorewall-exclusion(5)</ulink> -
Describes how to exclude certain hosts and/or networks from matching a
rule.</member>
<member><ulink url="shorewall-nesting.html">shorewall-nesting(5)</ulink>
- Describes how to nest one Shorewall zone inside another.</member>
</simplelist>
</refsect1> </refsect1>
</refentry> </refentry>

View File

@@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
# #
# Shorewall Packet Filtering Firewall Control Program - V5.0 # Shorewall Packet Filtering Firewall Control Program - V5.2
# #
# (c) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2014,2015 - # (c) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2014,2015-2017
# Tom Eastep (teastep@shorewall.net) # Tom Eastep (teastep@shorewall.net)
# #
# Shorewall documentation is available at http://www.shorewall.net # Shorewall documentation is available at http://www.shorewall.net
@@ -25,6 +25,10 @@
# For a list of supported commands, type 'shorewall help' or 'shorewall6 help' # For a list of supported commands, type 'shorewall help' or 'shorewall6 help'
# #
################################################################################################ ################################################################################################
#
# Default product is Shorewall. PRODUCT will be set based on $0 and on passed -[46] and -l
# options
#
PRODUCT=shorewall PRODUCT=shorewall
# #

View File

@@ -0,0 +1,25 @@
#
# ALT/BaseALT/ALTLinux Shorewall 5.2 rc file
#
BUILD= #Default is to detect the build system
HOST=alt
PREFIX=/usr #Top-level directory for shared files, libraries, etc.
SHAREDIR=${PREFIX}/share #Directory for arch-neutral files.
LIBEXECDIR=${PREFIX}/libexec #Directory for executable scripts.
PERLLIBDIR=${SHAREDIR}/perl5 #Directory to install Shorewall Perl module directory
CONFDIR=/etc #Directory where subsystem configurations are installed
SBINDIR=/sbin #Directory where system administration programs are installed
MANDIR=${SHAREDIR}/man #Directory where manpages are installed.
INITDIR=${CONFDIR}/rc.d/init.d #Directory where SysV init scripts are installed.
INITFILE=$PRODUCT #Name of the product's installed SysV init script
INITSOURCE=init.alt.sh #Name of the distributed file to be installed as the SysV init script
ANNOTATED= #If non-zero, annotated configuration files are installed
SERVICEDIR=/lib/systemd/system #Directory where .service files are installed (systems running systemd only)
SYSCONFFILE=sysconfig #Name of the distributed file to be installed as $SYSCONFDIR/$PRODUCT
SERVICEFILE= #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service
SYSCONFDIR=/etc/sysconfig/ #Directory where SysV init parameter files are installed
SERVICEDIR=/lib/systemd/system #Directory where .service files are installed (systems running systemd only)
SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR
VARLIB=/var/lib #Directory where product variable data is stored.
VARDIR=${VARLIB}/$PRODUCT #Directory where product variable data is stored.
DEFAULT_PAGER=/usr/bin/less #Pager to use if none specified in shorewall[6].conf

View File

@@ -1,5 +1,5 @@
# #
# Apple OS X Shorewall 5.0 rc file # Apple OS X Shorewall 5.2 rc file
# #
BUILD=apple BUILD=apple
HOST=apple HOST=apple

View File

@@ -1,5 +1,5 @@
# #
# Arch Linux Shorewall 5.0 rc file # Arch Linux Shorewall 5.2 rc file
# #
BUILD= #Default is to detect the build system BUILD= #Default is to detect the build system
HOST=archlinux HOST=archlinux

View File

@@ -1,5 +1,5 @@
# #
# Cygwin Shorewall 5.0 rc file # Cygwin Shorewall 5.2 rc file
# #
BUILD=cygwin BUILD=cygwin
HOST=cygwin HOST=cygwin

View File

@@ -1,5 +1,5 @@
# #
# Debian Shorewall 5.0 rc file # Debian Shorewall 5.2 rc file
# #
BUILD= #Default is to detect the build system BUILD= #Default is to detect the build system
HOST=debian HOST=debian
@@ -13,9 +13,9 @@ MANDIR=${PREFIX}/share/man #Directory where manpages are installed.
INITDIR= #Directory where SysV init scripts are installed. INITDIR= #Directory where SysV init scripts are installed.
INITFILE= #Name of the product's installed SysV init script INITFILE= #Name of the product's installed SysV init script
INITSOURCE=init.debian.sh #Name of the distributed file to be installed as the SysV init script INITSOURCE=init.debian.sh #Name of the distributed file to be installed as the SysV init script
ANNOTATED= #If non-zero, annotated configuration files are installed ANNOTATED= #If non-empty, annotated configuration files are installed
SYSCONFFILE=default.debian.systemd #Name of the distributed file to be installed in $SYSCONFDIR SYSCONFFILE=default.debian.systemd #Name of the distributed file to be installed in $SYSCONFDIR
SERVICEFILE=$PRODUCT.service.debian #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service SERVICEFILE=$PRODUCT.service.debian #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service
SYSCONFDIR=/etc/default #Directory where SysV init parameter files are installed SYSCONFDIR=/etc/default #Directory where SysV init parameter files are installed
SERVICEDIR=/lib/systemd/system #Directory where .service files are installed (systems running systemd only) SERVICEDIR=/lib/systemd/system #Directory where .service files are installed (systems running systemd only)
SPARSE=Yes #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR SPARSE=Yes #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR

View File

@@ -1,5 +1,5 @@
# #
# Debian Shorewall 5.0 rc file # Debian Shorewall 5.2 rc file
# #
BUILD= #Default is to detect the build system BUILD= #Default is to detect the build system
HOST=debian HOST=debian

View File

@@ -1,5 +1,5 @@
# #
# Default Shorewall 5.0 rc file # Default Shorewall 5.2 rc file
# #
BUILD= #Default is to detect the build system BUILD= #Default is to detect the build system
HOST=linux #Generic Linux HOST=linux #Generic Linux

View File

@@ -1,5 +1,5 @@
# #
# OpenWRT Shorewall 5.0 rc file # OpenWRT/LEDE Shorewall 5.2 rc file
# #
BUILD= #Default is to detect the build system BUILD= #Default is to detect the build system
HOST=openwrt HOST=openwrt

View File

@@ -1,5 +1,5 @@
# #
# RedHat/FedoraShorewall 5.0 rc file # RedHat/FedoraShorewall 5.2 rc file
# #
BUILD= #Default is to detect the build system BUILD= #Default is to detect the build system
HOST=redhat HOST=redhat

View File

@@ -0,0 +1,28 @@
#
# Shorewall 5.2 rc file for installing into a Sandbox
#
BUILD= # Default is to detect the build system
HOST=linux
INSTALLDIR= # Set this to the directory where you want Shorewall installed
PREFIX=${INSTALLDIR}/usr # Top-level directory for shared files, libraries, etc.
SHAREDIR=${PREFIX}/share # Directory for arch-neutral files.
LIBEXECDIR=${PREFIX}/share # Directory for executable scripts.
PERLLIBDIR=${PREFIX}/share/shorewall # Directory to install Shorewall Perl module directory
CONFDIR=${INSTALLDIR}/etc # Directory where subsystem configurations are installed
SBINDIR=${INSTALLDIR}/sbin # Directory where system administration programs are installed
MANDIR= # Leave empty
INITDIR= # Leave empty
INITSOURCE= # Leave empty
INITFILE= # Leave empty
AUXINITSOURCE= # Leave empty
AUXINITFILE= # Leave empty
SERVICEDIR= # Leave empty
SERVICEFILE= # Leave empty
SYSCONFFILE= # Leave empty
SYSCONFDIR= # Leave empty
SPARSE= # Leave empty
ANNOTATED= # If non-empty, annotated configuration files are installed
VARLIB=${INSTALLDIR}/var/lib # Directory where product variable data is stored.
VARDIR=${VARLIB}/$PRODUCT # Directory where product variable data is stored.
DEFAULT_PAGER=/usr/bin/less # Pager to use if none specified in shorewall[6].conf
SANDBOX=Yes # Indicates SANDBOX installation

View File

@@ -1,5 +1,5 @@
# #
# Slackware Shorewall 5.0 rc file # Slackware Shorewall 5.2 rc file
# #
BUILD=slackware BUILD=slackware
HOST=slackware HOST=slackware

View File

@@ -1,5 +1,5 @@
# #
# SuSE Shorewall 5.0 rc file # SuSE Shorewall 5.2 rc file
# #
BUILD= #Default is to detect the build system BUILD= #Default is to detect the build system
HOST=suse HOST=suse

View File

@@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# Shorewall interface helper utility - V4.2 # Shorewall interface helper utility - V5.2
# #
# (c) 2007,2014 - Tom Eastep (teastep@shorewall.net) # (c) 2007,2014 - Tom Eastep (teastep@shorewall.net)
# #

150
Shorewall-init/init.alt.sh Executable file
View File

@@ -0,0 +1,150 @@
#!/bin/sh
#
# Shorewall init script
#
# chkconfig: - 09 91
# description: Initialize the shorewall firewall at boot time
#
### BEGIN INIT INFO
# Provides: shorewall-init
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Initialize the shorewall firewall at boot time
# Description: Place the firewall in a safe state at boot time
# prior to bringing up the network.
### END INIT INFO
# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1
# Source function library.
. /etc/init.d/functions
#
# The installer may alter this
#
. /usr/share/shorewall/shorewallrc
NAME="Shorewall-init firewall"
PROG="shorewall-init"
SHOREWALL="$SBINDIR/$PROG"
LOGGER="logger -i -t $PROG"
# Get startup options (override default)
OPTIONS=
LOCKFILE=/var/lock/subsys/shorewall-init
# check if shorewall-init is configured or not
if [ -f "/etc/sysconfig/shorewall-init" ]; then
. /etc/sysconfig/shorewall-init
if [ -z "$PRODUCTS" ]; then
echo "No PRODUCTS configured"
exit 6
fi
else
echo "/etc/sysconfig/shorewall-init not found"
exit 6
fi
RETVAL=0
# set the STATEDIR variable
setstatedir() {
local statedir
if [ -f ${CONFDIR}/${PRODUCT}/vardir ]; then
statedir=$( . /${CONFDIR}/${PRODUCT}/vardir && echo $VARDIR )
fi
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
if [ -x ${STATEDIR}/firewall ]; then
return 0
elif [ $PRODUCT = shorewall ]; then
${SBINDIR}/shorewall compile
elif [ $PRODUCT = shorewall6 ]; then
${SBINDIR}/shorewall -6 compile
else
return 1
fi
}
start() {
local PRODUCT
local STATEDIR
printf "Initializing \"Shorewall-based firewalls\": "
for PRODUCT in $PRODUCTS; do
if setstatedir; then
$STATEDIR/$PRODUCT/firewall ${OPTIONS} stop 2>&1 | "$LOGGER"
RETVAL=$?
else
RETVAL=6
break
fi
done
if [ -n "$SAVE_IPSETS" -a -f "$SAVE_IPSETS" ]; then
ipset -R < "$SAVE_IPSETS"
fi
[ $RETVAL -eq 0 ] && touch "$LOCKFILE"
return $RETVAL
}
stop() {
local PRODUCT
local STATEDIR
printf "Clearing \"Shorewall-based firewalls\": "
for PRODUCT in $PRODUCTS; do
if setstatedir; then
${STATEDIR}/firewall ${OPTIONS} clear 2>&1 | "$LOGGER"
RETVAL=$?
else
RETVAL=6
break
fi
done
if [ -n "$SAVE_IPSETS" ]; then
mkdir -p $(dirname "$SAVE_IPSETS")
if ipset -S > "${SAVE_IPSETS}.tmp"; then
grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS" || rm -f "${SAVE_IPSETS}.tmp"
else
rm -f "${SAVE_IPSETS}.tmp"
fi
fi
[ $RETVAL -eq 0 ] && rm -f "$LOCKFILE"
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload|condrestart|condreload)
# "Not implemented"
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
status)
status "$PROG"
RETVAL=$?
;;
*)
echo $"Usage: ${0##*/} {start|stop|restart|reload|condrestart|condstop|status}"
RETVAL=1
esac
exit $RETVAL

View File

@@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0 # The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
@@ -73,12 +73,16 @@ setstatedir() {
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT} [ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
if [ $PRODUCT = shorewall ]; then if [ -x ${STATEDIR}/firewall ]; then
${SBINDIR}/shorewall compile return 0
elif [ $PRODUCT = shorewall6 ]; then
${SBINDIR}/shorewall -6 compile
else else
return 0 if [ $PRODUCT = shorewall ]; then
${SBINDIR}/shorewall compile
elif [ $PRODUCT = shorewall6 ]; then
${SBINDIR}/shorewall -6 compile
else
return 1
fi
fi fi
} }
@@ -108,16 +112,14 @@ shorewall_start () {
for PRODUCT in $PRODUCTS; do for PRODUCT in $PRODUCTS; do
if setstatedir; then if setstatedir; then
if [ -x ${STATEDIR}/firewall ]; then #
# # Run in a sub-shell to avoid name collisions
# Run in a sub-shell to avoid name collisions #
# (
( if ! ${STATEDIR}/firewall status > /dev/null 2>&1; then
if ! ${STATEDIR}/firewall status > /dev/null 2>&1; then ${STATEDIR}/firewall ${OPTIONS} stop
${STATEDIR}/firewall ${OPTIONS} stop fi
fi )
)
fi
fi fi
done done
@@ -145,9 +147,7 @@ shorewall_stop () {
printf "Clearing \"Shorewall-based firewalls\": " printf "Clearing \"Shorewall-based firewalls\": "
for PRODUCT in $PRODUCTS; do for PRODUCT in $PRODUCTS; do
if setstatedir; then if setstatedir; then
if [ -x ${STATEDIR}/firewall ]; then ${STATEDIR}/firewall ${OPTIONS} clear
${STATEDIR}/firewall ${OPTIONS} clear
fi
fi fi
done done
@@ -159,8 +159,9 @@ shorewall_stop () {
mkdir -p $(dirname "$SAVE_IPSETS") mkdir -p $(dirname "$SAVE_IPSETS")
if ipset -S > "${SAVE_IPSETS}.tmp"; then if ipset -S > "${SAVE_IPSETS}.tmp"; then
grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS" grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS" || rm -f "${SAVE_IPSETS}.tmp"
else else
rm -f "${SAVE_IPSETS}.tmp"
echo_notdone echo_notdone
fi fi

View File

@@ -44,12 +44,14 @@ setstatedir() {
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT} [ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
if [ $PRODUCT = shorewall ]; then if [ -x ${STATEDIR}/firewall ]; then
return 0
elif [ $PRODUCT = shorewall ]; then
${SBINDIR}/shorewall compile ${SBINDIR}/shorewall compile
elif [ $PRODUCT = shorewall6 ]; then elif [ $PRODUCT = shorewall6 ]; then
${SBINDIR}/shorewall -6 compile ${SBINDIR}/shorewall -6 compile
else else
return 0 return 1
fi fi
} }
@@ -66,20 +68,20 @@ start () {
printf "Initializing \"Shorewall-based firewalls\": " printf "Initializing \"Shorewall-based firewalls\": "
if [ -n "$SAVE_IPSETS" -a -f "$SAVE_IPSETS" ]; then
ipset -R < "$SAVE_IPSETS"
fi
for PRODUCT in $PRODUCTS; do for PRODUCT in $PRODUCTS; do
setstatedir setstatedir
retval=$? retval=$?
if [ $retval -eq 0 ]; then if [ $retval -eq 0 ]; then
if [ -x "${STATEDIR}/firewall" ]; then ${STATEDIR}/firewall ${OPTIONS} stop 2>&1 | $logger
${STATEDIR}/firewall ${OPTIONS} stop 2>&1 | $logger retval=${PIPESTATUS[0]}
retval=${PIPESTATUS[0]} [ $retval -ne 0 ] && break
[ $retval -ne 0 ] && break
else
retval=6 #Product not configured
break
fi
else else
retval=6 #Product not configured
break break
fi fi
done done
@@ -106,20 +108,25 @@ stop () {
retval=$? retval=$?
if [ $retval -eq 0 ]; then if [ $retval -eq 0 ]; then
if [ -x "${STATEDIR}/firewall" ]; then ${STATEDIR}/firewall ${OPTIONS} clear 2>&1 | $logger
${STATEDIR}/firewall ${OPTIONS} clear 2>&1 | $logger retval=${PIPESTATUS[0]}
retval=${PIPESTATUS[0]} [ $retval -ne 0 ] && break
[ $retval -ne 0 ] && break
else
retval=6 #Product not configured
break
fi
else else
retval=6 #Product not configured
break break
fi fi
done done
if [ $retval -eq 0 ]; then if [ $retval -eq 0 ]; then
if [ -n "$SAVE_IPSETS" ]; then
mkdir -p $(dirname "$SAVE_IPSETS")
if ipset -S > "${SAVE_IPSETS}.tmp"; then
grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS" || rm -f "${SAVE_IPSETS}.tmp"
else
rm -f "${SAVE_IPSETS}.tmp"
fi
fi
rm -f $lockfile rm -f $lockfile
success success
else else

26
Shorewall-init/init.openwrt.sh Normal file → Executable file
View File

@@ -1,5 +1,5 @@
#!/bin/sh /etc/rc.common #!/bin/sh /etc/rc.common
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0 # The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
# #
# (c) 2010,2012-2014 - Tom Eastep (teastep@shorewall.net) # (c) 2010,2012-2014 - Tom Eastep (teastep@shorewall.net)
# (c) 2016 - Matt Darfeuille (matdarf@gmail.com) # (c) 2016 - Matt Darfeuille (matdarf@gmail.com)
@@ -75,12 +75,14 @@ setstatedir() {
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT} [ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
if [ $PRODUCT = shorewall ]; then if [ -x ${STATEDIR}/firewall ]; then
return 0
elif [ $PRODUCT = shorewall ]; then
${SBINDIR}/shorewall compile ${SBINDIR}/shorewall compile
elif [ $PRODUCT = shorewall6 ]; then elif [ $PRODUCT = shorewall6 ]; then
${SBINDIR}/shorewall -6 compile ${SBINDIR}/shorewall -6 compile
else else
return 0 return 1
fi fi
} }
@@ -92,10 +94,8 @@ start () {
printf "Initializing \"Shorewall-based firewalls\": " printf "Initializing \"Shorewall-based firewalls\": "
for PRODUCT in $PRODUCTS; do for PRODUCT in $PRODUCTS; do
if setstatedir; then if setstatedir; then
if [ -x ${STATEDIR}/firewall ]; then if ! ${SBIN}/$PRODUCT status > /dev/null 2>&1; then
if ! ${SBIN}/$PRODUCT status > /dev/null 2>&1; then ${STATEDIR}/firewall ${OPTIONS} stop
${STATEDIR}/firewall ${OPTIONS} stop
fi
fi fi
fi fi
done done
@@ -103,6 +103,8 @@ start () {
if [ -n "$SAVE_IPSETS" -a -f "$SAVE_IPSETS" ]; then if [ -n "$SAVE_IPSETS" -a -f "$SAVE_IPSETS" ]; then
ipset -R < "$SAVE_IPSETS" ipset -R < "$SAVE_IPSETS"
fi fi
return 0
} }
boot () { boot () {
@@ -117,17 +119,19 @@ stop () {
printf "Clearing \"Shorewall-based firewalls\": " printf "Clearing \"Shorewall-based firewalls\": "
for PRODUCT in $PRODUCTS; do for PRODUCT in $PRODUCTS; do
if setstatedir; then if setstatedir; then
if [ -x ${STATEDIR}/firewall ]; then ${STATEDIR}/firewall ${OPTIONS} clear
${STATEDIR}/firewall ${OPTIONS} clear
fi
fi fi
done done
if [ -n "$SAVE_IPSETS" ]; then if [ -n "$SAVE_IPSETS" ]; then
mkdir -p $(dirname "$SAVE_IPSETS") mkdir -p $(dirname "$SAVE_IPSETS")
if ipset -S > "${SAVE_IPSETS}.tmp"; then if ipset -S > "${SAVE_IPSETS}.tmp"; then
grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS" grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS" || rm -f "${SAVE_IPSETS}.tmp"
else
rm -f "${SAVE_IPSETS}.tmp"
fi fi
fi fi
return 0
} }

View File

@@ -1,5 +1,5 @@
#! /bin/bash #! /bin/bash
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0 # The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
# #
# (c) 2010,2012-2014 - Tom Eastep (teastep@shorewall.net) # (c) 2010,2012-2014 - Tom Eastep (teastep@shorewall.net)
# #
@@ -69,10 +69,12 @@ setstatedir() {
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT} [ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
if [ $PRODUCT = shorewall -o $PRODUCT = shorewall6 ]; then if [ -x ${STATEDIR}/firewall ]; then
return 0
elif [ $PRODUCT = shorewall -o $PRODUCT = shorewall6 ]; then
${SBINDIR}/$PRODUCT ${OPTIONS} compile $STATEDIR/firewall ${SBINDIR}/$PRODUCT ${OPTIONS} compile $STATEDIR/firewall
else else
return 0 return 1
fi fi
} }
@@ -84,10 +86,8 @@ shorewall_start () {
printf "Initializing \"Shorewall-based firewalls\": " printf "Initializing \"Shorewall-based firewalls\": "
for PRODUCT in $PRODUCTS; do for PRODUCT in $PRODUCTS; do
if setstatedir; then if setstatedir; then
if [ -x ${STATEDIR}/firewall ]; then if ! ${SBIN}/$PRODUCT status > /dev/null 2>&1; then
if ! ${SBIN}/$PRODUCT status > /dev/null 2>&1; then ${STATEDIR}/firewall ${OPTIONS} stop
${STATEDIR}/firewall ${OPTIONS} stop
fi
fi fi
fi fi
done done
@@ -107,16 +107,16 @@ shorewall_stop () {
printf "Clearing \"Shorewall-based firewalls\": " printf "Clearing \"Shorewall-based firewalls\": "
for PRODUCT in $PRODUCTS; do for PRODUCT in $PRODUCTS; do
if setstatedir; then if setstatedir; then
if [ -x ${STATEDIR}/firewall ]; then ${STATEDIR}/firewall ${OPTIONS} clear
${STATEDIR}/firewall ${OPTIONS} clear
fi
fi fi
done done
if [ -n "$SAVE_IPSETS" ]; then if [ -n "$SAVE_IPSETS" ]; then
mkdir -p $(dirname "$SAVE_IPSETS") mkdir -p $(dirname "$SAVE_IPSETS")
if ipset -S > "${SAVE_IPSETS}.tmp"; then if ipset -S > "${SAVE_IPSETS}.tmp"; then
grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS" grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS" || rm -f "${SAVE_IPSETS}.tmp"
else
rm -f "${SAVE_IPSETS}.tmp"
fi fi
fi fi

View File

@@ -1,5 +1,5 @@
#! /bin/bash #! /bin/bash
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0 # The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
@@ -79,12 +79,14 @@ setstatedir() {
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT} [ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
if [ $PRODUCT = shorewall ]; then if [ -x ${STATEDIR}/firewall ]; then
return 0
elif [ $PRODUCT = shorewall ]; then
${SBINDIR}/shorewall compile ${SBINDIR}/shorewall compile
elif [ $PRODUCT = shorewall6 ]; then elif [ $PRODUCT = shorewall6 ]; then
${SBINDIR}/shorewall -6 compile ${SBINDIR}/shorewall -6 compile
else else
return 0 return 6
fi fi
} }
@@ -96,10 +98,8 @@ shorewall_start () {
printf "Initializing \"Shorewall-based firewalls\": " printf "Initializing \"Shorewall-based firewalls\": "
for PRODUCT in $PRODUCTS; do for PRODUCT in $PRODUCTS; do
if setstatedir; then if setstatedir; then
if [ -x $STATEDIR/firewall ]; then if ! ${SBIN}/$PRODUCT status > /dev/null 2>&1; then
if ! ${SBIN}/$PRODUCT status > /dev/null 2>&1; then $STATEDIR/$PRODUCT/firewall ${OPTIONS} stop
$STATEDIR/$PRODUCT/firewall ${OPTIONS} stop
fi
fi fi
fi fi
done done
@@ -117,16 +117,16 @@ shorewall_stop () {
printf "Clearing \"Shorewall-based firewalls\": " printf "Clearing \"Shorewall-based firewalls\": "
for PRODUCT in $PRODUCTS; do for PRODUCT in $PRODUCTS; do
if setstatedir; then if setstatedir; then
if [ -x ${STATEDIR}/firewall ]; then ${STATEDIR}/firewall ${OPTIONS} clear
${STATEDIR}/firewall ${OPTIONS} clear
fi
fi fi
done done
if [ -n "$SAVE_IPSETS" ]; then if [ -n "$SAVE_IPSETS" ]; then
mkdir -p $(dirname "$SAVE_IPSETS") mkdir -p $(dirname "$SAVE_IPSETS")
if ipset -S > "${SAVE_IPSETS}.tmp"; then if ipset -S > "${SAVE_IPSETS}.tmp"; then
grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS" grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS" || rm -f "${SAVE_IPSETS}.tmp"
else
rm -f "${SAVE_IPSETS}.tmp"
fi fi
fi fi
} }

View File

@@ -181,6 +181,9 @@ if [ -z "$BUILD" ]; then
opensuse) opensuse)
BUILD=suse BUILD=suse
;; ;;
alt|basealt|altlinux)
BUILD=alt
;;
*) *)
BUILD="$ID" BUILD="$ID"
;; ;;
@@ -191,6 +194,8 @@ if [ -z "$BUILD" ]; then
BUILD=debian BUILD=debian
elif [ -f /etc/gentoo-release ]; then elif [ -f /etc/gentoo-release ]; then
BUILD=gentoo BUILD=gentoo
elif [ -f /etc/altlinux-release ]; then
BUILD=alt
elif [ -f /etc/redhat-release ]; then elif [ -f /etc/redhat-release ]; then
BUILD=redhat BUILD=redhat
elif [ -f /etc/SuSE-release ]; then elif [ -f /etc/SuSE-release ]; then
@@ -253,6 +258,9 @@ case "$HOST" in
openwrt) openwrt)
echo "Installing Openwrt-specific configuration..." echo "Installing Openwrt-specific configuration..."
;; ;;
alt)
echo "Installing ALT-specific configuration...";
;;
linux) linux)
fatal_error "Shorewall-init is not supported on this system" fatal_error "Shorewall-init is not supported on this system"
;; ;;

View File

@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.0 # The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
# #
# (c) 2012-2014 - Tom Eastep (teastep@shorewall.net) # (c) 2012-2014 - Tom Eastep (teastep@shorewall.net)
# #
@@ -33,12 +33,12 @@ setstatedir() {
[ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT} [ -n "$statedir" ] && STATEDIR=${statedir} || STATEDIR=${VARLIB}/${PRODUCT}
if [ $PRODUCT = shorewall ]; then if [ -x ${STATEDIR}/firewall ]; then
return 0
elif [ $PRODUCT = shorewall ]; then
${SBINDIR}/shorewall compile ${SBINDIR}/shorewall compile
elif [ $PRODUCT = shorewall6 ]; then elif [ $PRODUCT = shorewall6 ]; then
${SBINDIR}/shorewall -6 compile ${SBINDIR}/shorewall -6 compile
else
return 0
fi fi
} }
@@ -67,16 +67,14 @@ shorewall_start () {
printf "Initializing \"Shorewall-based firewalls\": " printf "Initializing \"Shorewall-based firewalls\": "
for PRODUCT in $PRODUCTS; do for PRODUCT in $PRODUCTS; do
if setstatedir; then if setstatedir; then
if [ -x ${STATEDIR}/firewall ]; then #
# # Run in a sub-shell to avoid name collisions
# Run in a sub-shell to avoid name collisions #
# (
( if ! ${STATEDIR}/firewall status > /dev/null 2>&1; then
if ! ${STATEDIR}/firewall status > /dev/null 2>&1; then ${STATEDIR}/firewall ${OPTIONS} stop
${STATEDIR}/firewall ${OPTIONS} stop fi
fi )
)
fi
fi fi
done done
@@ -95,16 +93,16 @@ shorewall_stop () {
printf "Clearing \"Shorewall-based firewalls\": " printf "Clearing \"Shorewall-based firewalls\": "
for PRODUCT in $PRODUCTS; do for PRODUCT in $PRODUCTS; do
if setstatedir; then if setstatedir; then
if [ -x ${STATEDIR}/firewall ]; then ${STATEDIR}/firewall ${OPTIONS} clear
${STATEDIR}/firewall ${OPTIONS} clear
fi
fi fi
done done
if [ -n "$SAVE_IPSETS" ]; then if [ -n "$SAVE_IPSETS" ]; then
mkdir -p $(dirname "$SAVE_IPSETS") mkdir -p $(dirname "$SAVE_IPSETS")
if ipset -S > "${SAVE_IPSETS}.tmp"; then if ipset -S > "${SAVE_IPSETS}.tmp"; then
grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS" grep -qE -- '^(-N|create )' "${SAVE_IPSETS}.tmp" && mv -f "${SAVE_IPSETS}.tmp" "$SAVE_IPSETS" || rm -f "${SAVE_IPSETS}.tmp"
else
rm -f "${SAVE_IPSETS}.tmp"
fi fi
fi fi

117
Shorewall-lite/init.alt.sh Executable file
View File

@@ -0,0 +1,117 @@
#!/bin/sh
#
# Shorewall-Lite init script
#
# chkconfig: - 28 90
# description: Packet filtering firewall
#
### BEGIN INIT INFO
# Provides: shorewall-lite
# Required-Start: $local_fs $remote_fs $syslog $network
# Should-Start: $time $named
# Required-Stop:
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Packet filtering firewall
# Description: The Shoreline Firewall, more commonly known as "Shorewall", is a
# Netfilter (iptables) based firewall
### END INIT INFO
# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1
# Source function library.
. /etc/init.d/functions
#
# The installer may alter this
#
. /usr/share/shorewall/shorewallrc
NAME="Shorewall-Lite firewall"
PROG="shorewall"
SHOREWALL="$SBINDIR/$PROG -l"
LOGGER="logger -i -t $PROG"
# Get startup options (override default)
OPTIONS=
SourceIfNotEmpty $SYSCONFDIR/${PROG}-lite
LOCKFILE="/var/lock/subsys/${PROG}-lite"
RETVAL=0
start() {
action $"Applying $NAME rules:" "$SHOREWALL" "$OPTIONS" start "$STARTOPTIONS" 2>&1 | "$LOGGER"
RETVAL=$?
[ $RETVAL -eq 0 ] && touch "$LOCKFILE"
return $RETVAL
}
stop() {
action $"Stoping $NAME :" "$SHOREWALL" "$OPTIONS" stop "$STOPOPTIONS" 2>&1 | "$LOGGER"
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f "$LOCKFILE"
return $RETVAL
}
restart() {
action $"Restarting $NAME rules: " "$SHOREWALL" "$OPTIONS" restart "$RESTARTOPTIONS" 2>&1 | "$LOGGER"
RETVAL=$?
return $RETVAL
}
reload() {
action $"Reloadinging $NAME rules: " "$SHOREWALL" "$OPTIONS" reload "$RELOADOPTIONS" 2>&1 | "$LOGGER"
RETVAL=$?
return $RETVAL
}
clear() {
action $"Clearing $NAME rules: " "$SHOREWALL" "$OPTIONS" clear 2>&1 | "$LOGGER"
RETVAL=$?
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
clear)
clear
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
condreload)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
status)
"$SHOREWALL" status
RETVAL=$?
;;
*)
echo $"Usage: ${0##*/} {start|stop|restart|reload|clear|condrestart|condstop|status}"
RETVAL=1
esac
exit $RETVAL

View File

@@ -1,6 +1,6 @@
#!/bin/sh /etc/rc.common #!/bin/sh /etc/rc.common
# #
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V4.5 # The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
# #
# (c) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2012,2014 - Tom Eastep (teastep@shorewall.net) # (c) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2012,2014 - Tom Eastep (teastep@shorewall.net)
# (c) 2015 - Matt Darfeuille - (matdarf@gmail.com) # (c) 2015 - Matt Darfeuille - (matdarf@gmail.com)

View File

@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
RCDLINKS="2,S41 3,S41 6,K41" RCDLINKS="2,S41 3,S41 6,K41"
# #
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V4.5 # The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
# #
# (c) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2012,2014 - Tom Eastep (teastep@shorewall.net) # (c) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2012,2014 - Tom Eastep (teastep@shorewall.net)
# #

View File

@@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V4.5 # The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V5.2
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #

View File

@@ -190,6 +190,9 @@ if [ -z "$BUILD" ]; then
opensuse) opensuse)
BUILD=suse BUILD=suse
;; ;;
alt|basealt|altlinux)
BUILD=alt
;;
*) *)
BUILD="$ID" BUILD="$ID"
;; ;;
@@ -198,6 +201,8 @@ if [ -z "$BUILD" ]; then
BUILD=debian BUILD=debian
elif [ -f /etc/gentoo-release ]; then elif [ -f /etc/gentoo-release ]; then
BUILD=gentoo BUILD=gentoo
elif [ -f /etc/altlinux-release ]; then
BUILD=alt
elif [ -f ${CONFDIR}/redhat-release ]; then elif [ -f ${CONFDIR}/redhat-release ]; then
BUILD=redhat BUILD=redhat
elif [ -f ${CONFDIR}/SuSE-release ]; then elif [ -f ${CONFDIR}/SuSE-release ]; then
@@ -266,6 +271,9 @@ case "$HOST" in
openwrt) openwrt)
echo "Installing OpenWRT-specific configuration..." echo "Installing OpenWRT-specific configuration..."
;; ;;
alt)
echo "Installing ALT-specific configuration...";
;;
linux) linux)
;; ;;
*) *)
@@ -418,6 +426,11 @@ echo "Capability file builder installed in ${DESTDIR}${LIBEXECDIR}/$PRODUCT/shor
if [ -f modules ]; then if [ -f modules ]; then
install_file modules ${DESTDIR}${SHAREDIR}/$PRODUCT/modules 0600 install_file modules ${DESTDIR}${SHAREDIR}/$PRODUCT/modules 0600
echo "Modules file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/modules" echo "Modules file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/modules"
for f in modules.*; do
install_file $f ${DESTDIR}${SHAREDIR}/$PRODUCT/$f 0644
echo "Module file $f installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/$f"
done
fi fi
if [ -f helpers ]; then if [ -f helpers ]; then
@@ -425,11 +438,6 @@ if [ -f helpers ]; then
echo "Helper modules file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/helpers" echo "Helper modules file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/helpers"
fi fi
for f in modules.*; do
install_file $f ${DESTDIR}${SHAREDIR}/$PRODUCT/$f 0644
echo "Module file $f installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/$f"
done
# #
# Install the Man Pages # Install the Man Pages
# #

View File

@@ -1,5 +1,5 @@
# #
# Shorewall 4.4 -- /usr/share/shorewall-lite/lib.base # Shorewall 5.2 -- /usr/share/shorewall-lite/lib.base
# #
# (c) 2011,2014 - Tom Eastep (teastep@shorewall.net) # (c) 2011,2014 - Tom Eastep (teastep@shorewall.net)
# #

View File

@@ -28,7 +28,7 @@
# #
# On the target system (the system where the firewall program is to run): # On the target system (the system where the firewall program is to run):
# #
# [ IPTABLES=<iptables binary> ] [ MODULESDIR=<kernel modules directory> ] [ MODULE_SUFFIX="<module suffix list>" ] shorecap > capabilities # [ IPTABLES=<iptables binary> ] [ MODULESDIR=<kernel modules directory> ] shorecap > capabilities
# #
# Now move the capabilities file to the compilation system. The file must # Now move the capabilities file to the compilation system. The file must
# be placed in a directory on the CONFIG_PATH to be used when compiling firewalls # be placed in a directory on the CONFIG_PATH to be used when compiling firewalls
@@ -38,7 +38,6 @@
# #
# IPTABLES - iptables # IPTABLES - iptables
# MODULESDIR - /lib/modules/$(uname -r)/kernel/net/ipv4/netfilter # MODULESDIR - /lib/modules/$(uname -r)/kernel/net/ipv4/netfilter
# MODULE_SUFFIX - "o gz xz ko o.gz o.xz ko.gz ko.xz"
# #
# Shorewall need not be installed on the target system to run shorecap. If the '-e' flag is # Shorewall need not be installed on the target system to run shorecap. If the '-e' flag is
# used during firewall compilation, then the generated firewall program will likewise not # used during firewall compilation, then the generated firewall program will likewise not

View File

@@ -151,7 +151,7 @@ fi
remove_file ${SBINDIR}/$PRODUCT remove_file ${SBINDIR}/$PRODUCT
if [ -L ${SHAREDIR}/$PRODUCT/init ]; then if [ -h ${SHAREDIR}/$PRODUCT/init ]; then
if [ $HOST = openwrt ]; then if [ $HOST = openwrt ]; then
if [ $configure -eq 1 ] && /etc/init.d/$PRODUCT enabled; then if [ $configure -eq 1 ] && /etc/init.d/$PRODUCT enabled; then
/etc/init.d/$PRODUCT disable /etc/init.d/$PRODUCT disable

View File

@@ -1,9 +0,0 @@
#
# Shorewall6 -- /usr/share/shorewall/action.A_AllowICMPs
#
# This action A_ACCEPTs needed ICMP types
#
###############################################################################
#ACTION SOURCE DEST PROTO DPORT
AllowICMPs(A_ACCEPT)

View File

@@ -1,57 +0,0 @@
#
# Shorewall -- /usr/share/shorewall/action.A_Drop
#
# The audited default DROP common rules
#
# This action is invoked before a DROP policy is enforced. The purpose
# of the action is:
#
# a) Avoid logging lots of useless cruft.
# b) Ensure that certain ICMP packets that are necessary for successful
# internet operation are always ACCEPTed.
#
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
#
?require AUDIT_TARGET
?warning "You are using the deprecated A_Drop default action. Please see http://www.shorewall.net/Actions.html
###############################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT
#
# Count packets that come through here
#
COUNT
#
# Special Handling for Auth
#
Auth(A_DROP)
#
# ACCEPT critical ICMP types
#
# For IPv6 connectivity ipv6-icmp broadcasting is required so
# AllowICMPs must be before broadcast Drop.
#
A_AllowICMPs - - icmp
#
# Don't log broadcasts and multicasts
#
dropBcast(audit)
dropMcast(audit)
#
# Drop packets that are in the INVALID state -- these are usually ICMP packets
# and just confuse people when they appear in the log.
#
dropInvalid(audit)
#
# Drop Microsoft noise so that it doesn't clutter up the log.
#
SMB(A_DROP)
A_DropUPnP
#
# Drop 'newnotsyn' traffic so that it doesn't get logged.
#
dropNotSyn(audit) - - tcp
#
# Drop late-arriving DNS replies. These are just a nuisance and clutter up
# the log.
#
A_DropDNSrep

View File

@@ -1,11 +1,11 @@
# #
# Shorewall -- /usr/share/shorewall/action.A_REJECTWITH # Shorewall -- /usr/share/shorewall/action.A_REJECT
# #
# A_REJECT Action. # A_REJECT Action.
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
# (c) 2012-2016 Tom Eastep (teastep@shorewall.net) # (c) 2012-2017 Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #

View File

@@ -5,7 +5,7 @@
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
# (c) 2012-2016 Tom Eastep (teastep@shorewall.net) # (c) 2012-2017 Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #

View File

@@ -1,54 +0,0 @@
#
# Shorewall -- /usr/share/shorewall/action.A_Reject
#
# The audited default REJECT action common rules
#
# This action is invoked before a REJECT policy is enforced. The purpose
# of the action is:
#
# a) Avoid logging lots of useless cruft.
# b) Ensure that certain ICMP packets that are necessary for successful
# internet operation are always ACCEPTed.
#
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
?require AUDIT_TARGET
?warning "You are using the deprecated A_REJECT default action. Please see http://www.shorewall.net/Actions.html
###############################################################################
#ACTION SOURCE DEST PROTO
#
# Count packets that come through here
#
COUNT
#
# ACCEPT critical ICMP types
#
# For IPv6 connectivity ipv6-icmp broadcasting is required so
# AllowICMPs must be before broadcast Drop.
#
A_AllowICMPs - - icmp
#
# Drop Broadcasts and multicasts so they don't clutter up the log
# (these must *not* be rejected).
#
dropBcast(audit)
dropMcast(audit)
#
# Drop packets that are in the INVALID state -- these are usually ICMP packets
# and just confuse people when they appear in the log (these ICMPs cannot be
# rejected).
#
dropInvalid(audit)
#
# Reject Microsoft noise so that it doesn't clutter up the log.
#
SMB(A_REJECT)
A_DropUPnP
#
# Drop 'newnotsyn' traffic so that it doesn't get logged.
#
dropNotSyn(audit) - - tcp
#
# Drop late-arriving DNS replies. These are just a nuisance and clutter up
# the log.
#
A_DropDNSrep

View File

@@ -13,7 +13,6 @@ DEFAULTS ACCEPT
@1 - - icmp time-exceeded {comment="Needed ICMP types"} @1 - - icmp time-exceeded {comment="Needed ICMP types"}
?else ?else
?COMMENT Needed ICMP types (RFC4890) ?COMMENT Needed ICMP types (RFC4890)
@1 - - ipv6-icmp destination-unreachable @1 - - ipv6-icmp destination-unreachable
@1 - - ipv6-icmp packet-too-big @1 - - ipv6-icmp packet-too-big
@1 - - ipv6-icmp time-exceeded @1 - - ipv6-icmp time-exceeded
@@ -38,7 +37,7 @@ DEFAULTS ACCEPT
@1 - - ipv6-icmp 148 # Certificate path solicitation @1 - - ipv6-icmp 148 # Certificate path solicitation
@1 - - ipv6-icmp 149 # Certificate path advertisement @1 - - ipv6-icmp 149 # Certificate path advertisement
# The following should have a link local source address and a ttl of 1 and must be allowed to transit abridge # The following should have a link local source address and a ttl of 1 and must be allowed to transit a bridge
@1 fe80::/10 - ipv6-icmp 151 # Multicast router advertisement @1 fe80::/10 - ipv6-icmp 151 # Multicast router advertisement
@1 fe80::/10 - ipv6-icmp 152 # Multicast router solicitation @1 fe80::/10 - ipv6-icmp 152 # Multicast router solicitation
@1 fe80::/10 - ipv6-icmp 153 # Multicast router termination @1 fe80::/10 - ipv6-icmp 153 # Multicast router termination

View File

@@ -3,7 +3,7 @@
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net) # (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #

View File

@@ -5,7 +5,7 @@
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net) # (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #

View File

@@ -1,84 +0,0 @@
#
# Shorewall -- /usr/share/shorewall/action.Drop
#
# The former default DROP common rules. Use of this action is now deprecated
#
# This action is invoked before a DROP policy is enforced. The purpose
# of the action is:
#
# a) Avoid logging lots of useless cruft.
# b) Ensure that certain ICMP packets that are necessary for successful
# internet operation are always ACCEPTed.
#
# The action accepts six optional parameters:
#
# 1 - 'audit' or '-'. Default is '-' which means don't audit in builtin
# actions.
# 2 - Action to take with Auth requests. Default is to do nothing special
# with them.
# 3 - Action to take with SMB requests. Default is DROP or A_DROP,
# depending on the setting of the first parameter.
# 4 - Action to take with required ICMP packets. Default is ACCEPT or
# A_ACCEPT depending on the first parameter.
# 5 - Action to take with late DNS replies (UDP source port 53). Default
# is DROP or A_DROP depending on the first parameter.
# 6 - Action to take with UPnP packets. Default is DROP or A_DROP
# depending on the first parameter.
#
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
#
###############################################################################
?warning "You are using the deprecated Drop default action. Please see http://www.shorewall.net/Actions.html#Default"
?if passed(@1)
?if @1 eq 'audit'
DEFAULTS -,-,A_DROP,A_ACCEPT,A_DROP,A_DROP
?else
?error The first parameter to Drop must be 'audit' or '-'
?endif
?else
DEFAULTS -,-,DROP,ACCEPT,DROP,DROP
?endif
#ACTION SOURCE DEST PROTO DPORT SPORT
#
# Count packets that come through here
#
COUNT
#
# Special Handling for Auth
#
?if passed(@2)
Auth(@2)
?endif
#
# ACCEPT critical ICMP types
#
# For IPv6 connectivity ipv6-icmp broadcasting is required so
# AllowICMPs must be before silent broadcast Drop.
#
AllowICMPs(@4) - - icmp
#
# Don't log broadcasts or multicasts
#
Broadcast(DROP,@1)
Multicast(DROP,@1)
#
# Drop packets that are in the INVALID state -- these are usually ICMP packets
# and just confuse people when they appear in the log.
#
Invalid(DROP,@1)
#
# Drop Microsoft noise so that it doesn't clutter up the log.
#
SMB(@3)
DropUPnP(@6)
#
# Drop 'newnotsyn' traffic so that it doesn't get logged.
#
NotSyn(DROP,@1) - - tcp
#
# Drop late-arriving DNS replies. These are just a nuisance and clutter up
# the log.
#
DropDNSrep(@5)

View File

@@ -5,7 +5,7 @@
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net) # (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #

View File

@@ -0,0 +1,33 @@
#
# Shorewall -- /usr/share/shorewall/action.FIN
#
# FIN Action
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2017 Tom Eastep (teastep@shorewall.net)
#
# Complete documentation is available at http://shorewall.net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of Version 2 of the GNU General Public License
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# FIN[([<action>])]
#
# Default action is ACCEPT
#
###############################################################################
DEFAULTS ACCEPT,-
@1 - - ;;+ -p 6 --tcp-flags ACK,FIN ACK,FIN

View File

@@ -107,6 +107,11 @@ if ( $command & $REAP_OPT ) {
$duration .= '--rttl ' if $command & $TTL_OPT; $duration .= '--rttl ' if $command & $TTL_OPT;
if ( ( $targets{$action} || 0 ) & NATRULE ) {
perl_action_helper( "${action}-", "-m recent --rcheck ${duration}--hitcount $hitcount" );
$action = 'ACCEPT';
}
if ( $command & $RESET_CMD ) { if ( $command & $RESET_CMD ) {
require_capability 'MARK_ANYWHERE', '"reset"', 's'; require_capability 'MARK_ANYWHERE', '"reset"', 's';
@@ -130,7 +135,7 @@ if ( $command & $RESET_CMD ) {
# #
# if the event is armed, remove it and perform the action # if the event is armed, remove it and perform the action
# #
perl_action_helper( $action , "-m mark --mark $mark/$mark -m recent --remove --name $event" ); perl_action_helper( $action , "-m mark --mark $mark/$mark -m recent --remove --name $event $srcdst" );
} elsif ( $command & $UPDATE_CMD ) { } elsif ( $command & $UPDATE_CMD ) {
perl_action_helper( $action, "-m recent --update ${duration}--hitcount $hitcount --name $event $srcdst" ); perl_action_helper( $action, "-m recent --update ${duration}--hitcount $hitcount --name $event $srcdst" );
} else { } else {

View File

@@ -4,7 +4,7 @@
# Invalid Action # Invalid Action
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net) # (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #

View File

@@ -3,7 +3,7 @@
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net) # (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #

View File

@@ -5,7 +5,7 @@
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net) # (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #

View File

@@ -5,7 +5,7 @@
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net) # (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #

View File

@@ -5,7 +5,7 @@
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
# (c) 2012-2016 Tom Eastep (teastep@shorewall.net) # (c) 2012-2017 Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #

View File

@@ -1,85 +0,0 @@
#
# Shorewall -- /usr/share/shorewall/action.Reject
#
# The former default REJECT action common rules. Use of this action is deprecated.
#
# This action is invoked before a REJECT policy is enforced. The purpose
# of the action is:
#
# a) Avoid logging lots of useless cruft.
# b) Ensure that certain ICMP packets that are necessary for successful
# internet operation are always ACCEPTed.
#
# The action accepts six optional parameters:
#
# 1 - 'audit' or '-'. Default is '-' which means don't audit in builtin
# actions.
# 2 - Action to take with Auth requests. Default is to do nothing
# special with them.
# 3 - Action to take with SMB requests. Default is REJECT or A_REJECT,
# depending on the setting of the first parameter.
# 4 - Action to take with required ICMP packets. Default is ACCEPT or
# A_ACCEPT depending on the first parameter.
# 5 - Action to take with late DNS replies (UDP source port 53). Default
# is DROP or A_DROP depending on the first parameter.
# 6 - Action to take with UPnP packets. Default is DROP or A_DROP
# depending on the first parameter.
#
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
###############################################################################
?warning "You are using the deprecated Reject default action. Please see http://www.shorewall.net/Actions.html#Default"
?if passed(@1)
?if @1 eq 'audit'
DEFAULTS -,-,A_REJECT,A_ACCEPT,A_DROP,A_DROP
?else
?error The first parameter to Reject must be 'audit' or '-'
?endif
?else
DEFAULTS -,-,REJECT,ACCEPT,DROP,DROP
?endif
#ACTION SOURCE DEST PROTO
#
# Count packets that come through here
#
COUNT
#
# Special handling for Auth
#
?if passed(@2)
Auth(@2)
?endif
#
# ACCEPT critical ICMP types
#
# For IPv6 connectivity ipv6-icmp broadcasting is required so
# AllowICMPs must be before silent broadcast Drop.
#
AllowICMPs(@4) - - icmp
#
# Drop Broadcasts so they don't clutter up the log
# (broadcasts must *not* be rejected).
#
Broadcast(DROP,@1)
Multicast(DROP,@1)
#
# Drop packets that are in the INVALID state -- these are usually ICMP packets
# and just confuse people when they appear in the log (these ICMPs cannot be
# rejected).
#
Invalid(DROP,@1)
#
# Reject Microsoft noise so that it doesn't clutter up the log.
#
SMB(@3)
DropUPnP(@6)
#
# Drop 'newnotsyn' traffic so that it doesn't get logged.
#
NotSyn(DROP,@1) - - tcp
#
# Drop late-arriving DNS replies. These are just a nuisance and clutter up
# the log.
#
DropDNSrep(@5)

View File

@@ -5,7 +5,7 @@
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net) # (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #

View File

@@ -41,6 +41,11 @@ fatal_error "Invalid Src or Dest ($destination)" unless $destination =~ /^(?:src
set_action_disposition( $disposition) if supplied $disposition; set_action_disposition( $disposition) if supplied $disposition;
set_action_name_to_caller; set_action_name_to_caller;
if ( ( $targets{$action} || 0 ) & NATRULE ) {
perl_action_helper( "${action}-", "" );
$action = 'ACCEPT';
}
if ( $destination eq 'dst' ) { if ( $destination eq 'dst' ) {
perl_action_helper( $action, '', '', "-m recent --name $event --remove --rdest" ); perl_action_helper( $action, '', '', "-m recent --name $event --remove --rdest" );
} else { } else {

View File

@@ -37,6 +37,11 @@ fatal_error "Invalid Src or Dest ($destination)" unless $destination =~ /^(?:src
set_action_disposition( $disposition) if supplied $disposition; set_action_disposition( $disposition) if supplied $disposition;
set_action_name_to_caller; set_action_name_to_caller;
if ( ( $targets{$action} || 0 ) & NATRULE ) {
perl_action_helper( "${action}-", "" );
$action = 'ACCEPT';
}
if ( $destination eq 'dst' ) { if ( $destination eq 'dst' ) {
perl_action_helper( $action, '', '', "-m recent --name $event --set --rdest" ); perl_action_helper( $action, '', '', "-m recent --name $event --set --rdest" );
} else { } else {

View File

@@ -26,4 +26,4 @@ $tcpflags_action - - ;;+ -p 6 --tcp-flags ALL FIN,URG,PSH
$tcpflags_action - - ;;+ -p 6 --tcp-flags ALL NONE $tcpflags_action - - ;;+ -p 6 --tcp-flags ALL NONE
$tcpflags_action - - ;;+ -p 6 --tcp-flags SYN,RST SYN,RST $tcpflags_action - - ;;+ -p 6 --tcp-flags SYN,RST SYN,RST
$tcpflags_action - - ;;+ -p 6 --tcp-flags SYN,FIN SYN,FIN $tcpflags_action - - ;;+ -p 6 --tcp-flags SYN,FIN SYN,FIN
$tcpflags_action - - ;;+ -p tcp --syn --sport 0 $tcpflags_action - - ;;+ -p 6 --syn --sport 0

View File

@@ -5,7 +5,7 @@
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net) # (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #

View File

@@ -3,7 +3,7 @@
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net) # (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #

View File

@@ -0,0 +1,39 @@
#
# Shorewall -- /usr/share/shorewall/action.dropBcasts
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2017 Tom Eastep (teastep@shorewall.net)
#
# Complete documentation is available at http://shorewall.net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of Version 2 of the GNU General Public License
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# dropBcasts[([audit])]
#
###############################################################################
DEFAULTS -
?if passed(@1)
?if @1 eq 'audit'
?require AUDIT_TARGET
Broadcast(A_DROP)
?else
?error "Invalid argument (@1) to dropBcasts"
?endif
?else
Broadcast(DROP)
?endif

View File

@@ -5,7 +5,7 @@
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net) # (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #

View File

@@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# Shorewall WAN Interface monitor - V4.4 # Shorewall WAN Interface monitor - V5.2
# #
# Inspired by Angsuman Chakraborty's gwping script. # Inspired by Angsuman Chakraborty's gwping script.
# #

View File

@@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# Shorewall WAN Interface monitor - V4.4 # Shorewall WAN Interface monitor - V5.2
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #

View File

@@ -0,0 +1,9 @@
#
# Shorewall -- /usr/share/shorewall/macro.IPFS-swarm
#
# This macro handles IPFS data traffic (the connection to IPFS swarm).
#
###############################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
PARAM - - tcp 4001

View File

@@ -1,9 +1,9 @@
# #
# Shorewall - /usr/share/shorewall/macro.SNMPtrap # Shorewall -- /usr/share/shorewall/macro.Apcupsd
# #
# This macro deprecated by SNMPtrap. # This macro handles apcupsd traffic.
# #
############################################################################### ###############################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER #ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
SNMPtrap PARAM - - tcp 3551

View File

@@ -0,0 +1,8 @@
#
# Shorewall --/usr/share/shorewall/macro.Bitcoin
#
# Macro for handling Bitcoin P2P traffic
#
##############################################################################################################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
PARAM - - tcp 8333

View File

@@ -0,0 +1,8 @@
#
# Shorewall --/usr/share/shorewall/macro.BitcoinRPC
#
# Macro for handling Bitcoin RPC traffic
#
##############################################################################################################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
PARAM - - tcp 8332

View File

@@ -0,0 +1,9 @@
#
# Shorewall --/usr/share/shorewall/macro.BitcoinZMQ
#
# Macro for handling Bitcoin ZMQ traffic
# See https://github.com/bitcoin/bitcoin/blob/master/doc/zmq.md
#
##############################################################################################################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
PARAM - - tcp 28332

View File

@@ -0,0 +1,12 @@
#
# Shorewall -- /usr/share/shorewall/macro.Cockpit
#
# This macro handles Time protocol (RFC868).
# Unless you are supporting extremely old hardware or software,
# you shouldn't be using this. NTP is a superior alternative.
#
# By Eric Teeter
###############################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
PARAM - - tcp 9090

View File

@@ -0,0 +1,16 @@
#
# Shorewall -- /usr/share/shorewall/macro.FreeIPA
#
# This macro handles FreeIPA server traffic.
#
###############################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
DNS
HTTP
HTTPS
Kerberos
Kpasswd
LDAP
LDAPS
NTP

View File

@@ -0,0 +1,9 @@
#
# Shorewall -- /usr/share/shorewall/macro.IPFS-API
#
# This macro handles IPFS API port (commands for the IPFS daemon).
#
###############################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
PARAM - - tcp 5001

View File

@@ -0,0 +1,9 @@
#
# Shorewall -- /usr/share/shorewall/macro.IPFS-gateway
#
# This macro handles the IPFS gateway to HTTP.
#
###############################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
PARAM - - tcp 8080

View File

@@ -0,0 +1,9 @@
#
# Shorewall -- /usr/share/shorewall/macro.IPFS-swarm
#
# This macro handles IPFS data traffic (the connection to IPFS swarm).
#
###############################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
PARAM - - tcp 4001

View File

@@ -11,13 +11,20 @@
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER #ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
PARAM - - tcp 623 # RMCP PARAM - - tcp 623 # RMCP
PARAM - - udp 623 # RMCP
PARAM - - tcp 3668,3669 # Virtual Media, Secure (Dell) PARAM - - tcp 3668,3669 # Virtual Media, Secure (Dell)
PARAM - - tcp 5120,5123 # CD, floppy (Asus, Aten) PARAM - - tcp 5120,5122,5123 # CD,FD,HD (Asus, Aten)
PARAM - - tcp 5900,5901 # Remote Console (Aten, Dell) PARAM - - tcp 5900,5901 # Remote Console (Aten, Dell)
PARAM - - tcp 7578 # Remote Console (AMI) PARAM - - tcp 7578 # Remote Console (AMI)
PARAM - - udp 623 # RMCP PARAM - - tcp 8889 # WS-MAN
HTTP HTTP
HTTPS
SNMP
SSH # Serial over Lan
Telnet Telnet
SNMP
# TLS/secure ports
PARAM - - tcp 3520 # Remote Console (Redfish)
PARAM - - tcp 3669 # Virtual Media (Dell)
PARAM - - tcp 5124,5126,5127 # CD,FD,HD (AMI)
PARAM - - tcp 7582 # Remote Console (AMI)
HTTPS
SSH # Serial over Lan

View File

@@ -0,0 +1,10 @@
#
# Shorewall -- /usr/share/shorewall/macro.Kpasswd
#
# This macro handles Kerberos "passwd" traffic.
#
###############################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
PARAM - - tcp 464
PARAM - - udp 464

View File

@@ -0,0 +1,8 @@
#
# Shorewall -- /usr/share/shorewall/macro.ONCRPC
#
# This macro handles ONC RCP traffic (for rpcbind on Linux, etc).
#
##############################################################################################################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
PARAM - - tcp,udp 111

View File

@@ -6,4 +6,5 @@
############################################################################### ###############################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER #ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
PARAM - - udp 3389
PARAM - - tcp 3389 PARAM - - tcp 3389

View File

@@ -0,0 +1,9 @@
#
# Shorewall -- /usr/share/shorewall/macro.RedisSecure
#
# This macro handles Redis Secure (SSL/TLS) traffic.
#
###############################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
PARAM - - tcp 6380

View File

@@ -0,0 +1,9 @@
#
# Shorewall -- /usr/share/shorewall/macro.Rwhois
#
# This macro handles Remote Who Is (rwhois) traffic.
#
###############################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
PARAM - - tcp 4321

View File

@@ -0,0 +1,9 @@
#
# Shorewall -- /usr/share/shorewall/macro.SSDP
#
# This macro handles SSDP (used by DLNA/UPnP) client traffic.
#
###############################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
PARAM - - udp 1900

View File

@@ -0,0 +1,10 @@
#
# Shorewall -- /usr/share/shorewall/macro.SSDPserver
#
# This macro handles SSDP (used by DLNA/UPnP) server bidirectional traffic.
#
###############################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
PARAM - - udp 1900
PARAM DEST SOURCE udp - 1900

View File

@@ -0,0 +1,8 @@
#
# Shorewall --/usr/share/shorewall/macro.Tor
#
# Macro for handling Tor Onion Network traffic
#
##############################################################################################################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
PARAM - - tcp 9001

View File

@@ -0,0 +1,8 @@
#
# Shorewall --/usr/share/shorewall/macro.TorBrowserBundle
#
# Macro for handling Tor Onion Network traffic provided by Tor Browser Bundle
#
##############################################################################################################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
PARAM - - tcp 9150

View File

@@ -0,0 +1,8 @@
#
# Shorewall --/usr/share/shorewall/macro.TorControl
#
# Macro for handling Tor Controller Applications traffic
#
##############################################################################################################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
PARAM - - tcp 9051

View File

@@ -0,0 +1,8 @@
#
# Shorewall --/usr/share/shorewall/macro.TorDirectory
#
# Macro for handling Tor Directory traffic
#
##############################################################################################################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
PARAM - - tcp 9030

View File

@@ -0,0 +1,8 @@
#
# Shorewall --/usr/share/shorewall/macro.TorSocks
#
# Macro for handling Tor Socks Proxy traffic
#
##############################################################################################################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
PARAM - - tcp 9050

View File

@@ -0,0 +1,9 @@
# Shorewall -- /usr/share/shorewall/macro.WUDO
#
# This macro handles WUDO (Windows Update Delivery Optimization)
#
###############################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
PARAM - - tcp 7680

View File

@@ -1,82 +0,0 @@
# Shorewall Packet Filtering Firewall Export Directory Makefile - V4.2
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2006 - Tom Eastep (teastep@shorewall.net)
#
# Shorewall documentation is available at http://www.shorewall.net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of Version 2 of the GNU General Public License
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
################################################################################
# Place this file in each export directory. Modify each copy to set HOST
# to the name of the remote firewall corresponding to the directory.
#
# To make the 'firewall' script, type "make".
#
# Once the script is compiling correctly, you can install it by
# typing "make install".
#
################################################################################
# V A R I A B L E S
#
# Files in the export directory on which the firewall script does not depend
#
IGNOREFILES = firewall% Makefile% trace% %~
#
# Remote Firewall system
#
HOST = gateway
#
# Save some typing
#
LITEDIR = /var/lib/shorewall-lite
#
# Set this if the remote system has a non-standard modules directory
#
MODULESDIR=
#
# Default target is the firewall script
#
################################################################################
# T A R G E T S
#
all: firewall
#
# Only generate the capabilities file if it doesn't already exist
#
capabilities:
ssh root@$(HOST) "MODULESDIR=$(MODULESDIR) /usr/share/shorewall-lite/shorecap > $(LITEDIR)/capabilities"
scp root@$(HOST):$(LITEDIR)/capabilities .
#
# Compile the firewall script. Using the 'wildcard' function causes "*" to be expanded so that
# 'filter-out' will be presented with the list of files in this directory rather than "*"
#
firewall: $(filter-out $(IGNOREFILES) capabilities , $(wildcard *) ) capabilities
shorewall compile -e . firewall
#
# Only reload on demand.
#
install: firewall
scp firewall firewall.conf root@$(HOST):$(LITEDIR)
ssh root@$(HOST) "/sbin/shorewall-lite restart"
#
# Save running configuration
#
save:
ssh root@$(HOST) "/sbin/shorewall-lite save"
#
# Remove generated files
#
clean:
rm -f capabilities firewall firewall.conf reload

View File

@@ -1,5 +1,5 @@
# #
# Shorewall 5.0 -- /usr/share/shorewall/Shorewall/ARP.pm # Shorewall 5.2 -- /usr/share/shorewall/Shorewall/ARP.pm
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #

View File

@@ -1,9 +1,9 @@
# #
# Shorewall 5.0 -- /usr/share/shorewall/Shorewall/Accounting.pm # Shorewall 5.2 -- /usr/share/shorewall/Shorewall/Accounting.pm
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
# (c) 2007-2016 - Tom Eastep (teastep@shorewall.net) # (c) 2007-2019 - Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #
@@ -195,12 +195,19 @@ sub process_accounting_rule1( $$$$$$$$$$$ ) {
$ports = '' if $ports eq 'any' || $ports eq 'all'; $ports = '' if $ports eq 'any' || $ports eq 'all';
$sports = '' if $sports eq 'any' || $sports eq 'all'; $sports = '' if $sports eq 'any' || $sports eq 'all';
fatal_error "USER/GROUP may only be specified in the OUTPUT section" unless $user eq '-' || $asection == OUTPUT; fatal_error "USER/GROUP may only be specified in the OUTPUT section" unless $user eq '-' || $asection == OUTPUT_SECTION;
my $rule = do_proto( $proto, $ports, $sports ) . do_user ( $user ) . do_test ( $mark, $globals{TC_MASK} ) . do_headers( $headers ); my $rule = do_proto( $proto, $ports, $sports ) . do_user ( $user ) . do_test ( $mark, $globals{TC_MASK} ) . do_headers( $headers );
my $prerule = ''; my $prerule = '';
my $rule2 = 0; my $rule2 = 0;
my $jump = 0; my $jump = 0;
my $raw_matches = get_inline_matches(1);
if ( $raw_matches =~ s/^\s*+// ) {
$prerule = $raw_matches;
} else {
$rule .= $raw_matches;
}
unless ( $action eq 'COUNT' ) { unless ( $action eq 'COUNT' ) {
if ( $action eq 'DONE' ) { if ( $action eq 'DONE' ) {
@@ -242,9 +249,7 @@ sub process_accounting_rule1( $$$$$$$$$$$ ) {
$rule .= do_nfacct( $_ ); $rule .= do_nfacct( $_ );
} }
} }
} elsif ( $action eq 'INLINE' ) { } elsif ( $action ne 'INLINE' ) {
$rule .= get_inline_matches(1);
} else {
( $action, my $cmd ) = split /:/, $action; ( $action, my $cmd ) = split /:/, $action;
if ( $cmd ) { if ( $cmd ) {
@@ -266,7 +271,7 @@ sub process_accounting_rule1( $$$$$$$$$$$ ) {
if ( $source eq 'any' || $source eq 'all' ) { if ( $source eq 'any' || $source eq 'all' ) {
$source = ALLIP; $source = ALLIP;
} else { } else {
fatal_error "MAC addresses only allowed in the INPUT and FORWARD sections" if $source =~ /~/ && ( $asection == OUTPUT || ! $asection ); fatal_error "MAC addresses only allowed in the INPUT and FORWARD sections" if $source =~ /~/ && ( $asection == OUTPUT_SECTION || ! $asection );
} }
if ( have_bridges && ! $asection ) { if ( have_bridges && ! $asection ) {
@@ -282,7 +287,7 @@ sub process_accounting_rule1( $$$$$$$$$$$ ) {
if ( $dest eq 'any' || $dest eq 'all' || $dest eq ALLIP ) { if ( $dest eq 'any' || $dest eq 'all' || $dest eq ALLIP ) {
expand_rule( expand_rule(
ensure_rules_chain ( 'accountout' ) , ensure_chain ( $config{ACCOUNTING_TABLE}, 'accountout' ) ,
OUTPUT_RESTRICT , OUTPUT_RESTRICT ,
$prerule , $prerule ,
$rule , $rule ,

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,10 @@
#! /usr/bin/perl -w #! /usr/bin/perl -w
# #
# The Shoreline Firewall Packet Filtering Firewall Compiler - V5.0 # The Shoreline Firewall Packet Filtering Firewall Compiler - V5.2
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
# (c) 2007-2016 - Tom Eastep (teastep@shorewall.net) # (c) 2007-2019 - Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #
@@ -47,19 +47,19 @@ our @EXPORT = qw( compiler );
our @EXPORT_OK = qw( $export ); our @EXPORT_OK = qw( $export );
our $VERSION = 'MODULEVERSION'; our $VERSION = 'MODULEVERSION';
our $export; our $export; # True when compiling for export
our $test; our $test; # True when running regression tests
our $family; our $family; # IP address family (4 or 6)
our $have_arptables; our $have_arptables; # True if we have arptables rules
# #
# Initilize the package-globals in the other modules # Initilize the package-globals in the other modules
# #
sub initialize_package_globals( $$$ ) { sub initialize_package_globals( $$$ ) {
Shorewall::Config::initialize($family, $_[1], $_[2]); Shorewall::Config::initialize($family, $export, $_[1], $_[2]);
Shorewall::Chains::initialize ($family, 1, $export ); Shorewall::Chains::initialize ($family, 1, $export );
Shorewall::Zones::initialize ($family, $_[0]); Shorewall::Zones::initialize ($family, $_[0]);
Shorewall::Nat::initialize($family); Shorewall::Nat::initialize($family);
@@ -103,13 +103,13 @@ sub generate_script_1( $ ) {
copy2( $lib, $debug ) if -f $lib; copy2( $lib, $debug ) if -f $lib;
emit <<'EOF'; emithd<<'EOF';
################################################################################ ################################################################################
# Functions to execute the various user exits (extension scripts) # Functions to execute the various user exits (extension scripts)
################################################################################ ################################################################################
EOF EOF
for my $exit ( qw/init start tcclear started stop stopped clear refresh refreshed restored/ ) { for my $exit ( qw/init start tcclear started stop stopped clear restored enabled disabled/ ) {
emit "\nrun_${exit}_exit() {"; emit "\nrun_${exit}_exit() {";
push_indent; push_indent;
append_file $exit or emit 'true'; append_file $exit or emit 'true';
@@ -125,7 +125,7 @@ EOF
emit '}'; emit '}';
} }
emit <<'EOF'; emithd <<'EOF';
################################################################################ ################################################################################
# End user exit functions # End user exit functions
################################################################################ ################################################################################
@@ -209,6 +209,8 @@ sub generate_script_2() {
emit ( '[ -f ${g_confdir}/vardir ] && . ${g_confdir}/vardir' ); emit ( '[ -f ${g_confdir}/vardir ] && . ${g_confdir}/vardir' );
emit ( qq([ -n "\${VARDIR:=$shorewallrc1{VARDIR}}" ]) ); emit ( qq([ -n "\${VARDIR:=$shorewallrc1{VARDIR}}" ]) );
emit ( qq([ -n "\${VARLIB:=$shorewallrc1{VARLIB}}" ]) ); emit ( qq([ -n "\${VARLIB:=$shorewallrc1{VARLIB}}" ]) );
emit ( qq([ -n "\${CONFDIR:=$shorewallrc1{CONFDIR}}" ]) );
emit ( qq([ -n "\${SHAREDIR:=$shorewallrc1{SHAREDIR}}" ]) );
emit 'TEMPFILE='; emit 'TEMPFILE=';
@@ -266,13 +268,18 @@ sub generate_script_2() {
emit( '', emit( '',
'chain_exists DOCKER nat && chain_exists DOCKER && g_docker=Yes', 'chain_exists DOCKER nat && chain_exists DOCKER && g_docker=Yes',
); );
emit( 'chain_exists DOCKER-ISOLATION && g_dockernetwork=Yes]' ); emit( 'chain_exists DOCKER-INGRESS && g_dockeringress=Yes' );
emit( '' ); emit( 'chain_exists DOCKER-USER && g_dockeruser=Yes' );
emit( 'if chain_exists DOCKER-ISOLATION; then',
' g_dockernetwork=One',
'elif chain_exists DOCKER-ISOLATION-STAGE-1; then',
' g_dockernetwork=Two',
'fi' );
} }
pop_indent; pop_indent;
emit "\n}\n"; # End of initialize() emit "}\n"; # End of initialize()
emit( '' , emit( '' ,
'#' , '#' ,
@@ -309,10 +316,9 @@ sub generate_script_2() {
push_indent; push_indent;
if ( $global_variables == ( ALL_COMMANDS | NOT_RESTORE ) ) { if ( $global_variables == ( ALL_COMMANDS | NOT_RESTORE ) ) {
verify_required_interfaces(0);
set_global_variables(0, 0); set_global_variables(0, 0);
handle_optional_interfaces;
handle_optional_interfaces(0);
} }
emit ';;'; emit ';;';
@@ -324,19 +330,19 @@ sub generate_script_2() {
push_indent; push_indent;
} }
verify_required_interfaces(1);
set_global_variables(1,1); set_global_variables(1,1);
handle_optional_interfaces;
if ( $global_variables & NOT_RESTORE ) { if ( $global_variables & NOT_RESTORE ) {
handle_optional_interfaces(1);
emit ';;'; emit ';;';
pop_indent; pop_indent;
pop_indent; pop_indent;
emit ( 'esac' ); emit ( 'esac' );
} else {
handle_optional_interfaces(1);
} }
} else { } else {
emit( 'true' ) unless handle_optional_interfaces(1); verify_required_interfaces(1);
emit( 'true' ) unless handle_optional_interfaces;
} }
pop_indent; pop_indent;
@@ -355,7 +361,7 @@ sub generate_script_2() {
# Note: This function is not called when $command eq 'check'. So it must have no side effects other # Note: This function is not called when $command eq 'check'. So it must have no side effects other
# than those related to writing to the output script file. # than those related to writing to the output script file.
# #
sub generate_script_3($) { sub generate_script_3() {
if ( $family == F_IPV4 ) { if ( $family == F_IPV4 ) {
progress_message2 "Creating iptables-restore input..."; progress_message2 "Creating iptables-restore input...";
@@ -365,7 +371,6 @@ sub generate_script_3($) {
create_netfilter_load( $test ); create_netfilter_load( $test );
create_arptables_load( $test ) if $have_arptables; create_arptables_load( $test ) if $have_arptables;
create_chainlist_reload( $_[0] );
create_save_ipsets; create_save_ipsets;
create_load_ipsets; create_load_ipsets;
@@ -379,10 +384,10 @@ sub generate_script_3($) {
save_progress_message 'Initializing...'; save_progress_message 'Initializing...';
if ( $export || $config{EXPORTMODULES} ) { if ( $export || $config{EXPORTMODULES} ) {
my $fn = find_file( $config{LOAD_HELPERS_ONLY} ? 'helpers' : 'modules' ); my $fn = find_file( 'helpers' );
if ( -f $fn && ( $config{EXPORTMODULES} || ( $export && ! $fn =~ "^$globals{SHAREDIR}/" ) ) ) { if ( -f $fn && ( $config{EXPORTMODULES} || ( $export && ! $fn =~ "^$globals{SHAREDIR}/" ) ) ) {
emit 'echo MODULESDIR="$MODULESDIR" > ${VARDIR}/.modulesdir'; emit 'echo MODULESDIR=\"$MODULESDIR\" > ${VARDIR}/.modulesdir';
emit 'cat > ${VARDIR}/.modules << EOF'; emit 'cat > ${VARDIR}/.modules << EOF';
open_file $fn; open_file $fn;
@@ -397,16 +402,10 @@ sub generate_script_3($) {
emit 'load_kernel_modules Yes'; emit 'load_kernel_modules Yes';
} }
emit ''; emit( '' ,
'run_init_exit',
emit ( 'if [ "$COMMAND" = refresh ]; then' , '' ,
' run_refresh_exit' , 'load_ipsets' ,
'else' ,
' run_init_exit',
'fi',
'' );
emit( 'load_ipsets' ,
'' ); '' );
create_nfobjects; create_nfobjects;
@@ -464,11 +463,6 @@ sub generate_script_3($) {
dump_proxy_arp; dump_proxy_arp;
emit_unindented '__EOF__'; emit_unindented '__EOF__';
emit( '',
'if [ "$COMMAND" != refresh ]; then' );
push_indent;
emit 'cat > ${VARDIR}/zones << __EOF__'; emit 'cat > ${VARDIR}/zones << __EOF__';
dump_zone_contents; dump_zone_contents;
emit_unindented '__EOF__'; emit_unindented '__EOF__';
@@ -481,10 +475,6 @@ sub generate_script_3($) {
dump_mark_layout; dump_mark_layout;
emit_unindented '__EOF__'; emit_unindented '__EOF__';
pop_indent;
emit "fi\n";
emit '> ${VARDIR}/nat'; emit '> ${VARDIR}/nat';
add_addresses; add_addresses;
@@ -523,29 +513,12 @@ sub generate_script_3($) {
my $config_dir = $globals{CONFIGDIR}; my $config_dir = $globals{CONFIGDIR};
emit<<"EOF"; emithd <<"EOF";
set_state Started $config_dir set_state Started $config_dir
run_restored_exit run_restored_exit
elif [ \$COMMAND = refresh ]; then else
chainlist_reload setup_netfilter
EOF EOF
push_indent;
setup_load_distribution;
setup_forwarding( $family , 0 );
pop_indent;
#
# Use a parameter list rather than 'here documents' to avoid an extra blank line
#
emit( ' run_refreshed_exit',
' do_iptables -N shorewall' );
emit( ' do_iptables -A shorewall -m recent --set --name %CURRENTTIME' ) if have_capability 'RECENT_MATCH';
emit( " set_state Started $config_dir",
' [ $0 = ${VARDIR}/firewall ] || cp -f $(my_pathname) ${VARDIR}/firewall',
'else',
' setup_netfilter' );
push_indent; push_indent;
emit 'setup_arptables' if $have_arptables; emit 'setup_arptables' if $have_arptables;
setup_load_distribution; setup_load_distribution;
@@ -570,7 +543,7 @@ EOF
' run_started_exit', ' run_started_exit',
"fi\n" ); "fi\n" );
emit<<'EOF'; emithd<<'EOF';
date > ${VARDIR}/restarted date > ${VARDIR}/restarted
case $COMMAND in case $COMMAND in
@@ -580,9 +553,6 @@ case $COMMAND in
reload) reload)
mylogger kern.info "$g_product reloaded" mylogger kern.info "$g_product reloaded"
;; ;;
refresh)
mylogger kern.info "$g_product refreshed"
;;
restore) restore)
mylogger kern.info "$g_product restored" mylogger kern.info "$g_product restored"
;; ;;
@@ -617,8 +587,8 @@ sub compile_info_command() {
# #
sub compiler { sub compiler {
my ( $scriptfilename, $directory, $verbosity, $timestamp , $debug, $chains , $log , $log_verbosity, $preview, $confess , $update , $annotate , $config_path, $shorewallrc , $shorewallrc1 , $inline ) = my ( $scriptfilename, $directory, $verbosity, $timestamp , $debug, $log , $log_verbosity, $preview, $confess , $update , $annotate , $config_path, $shorewallrc , $shorewallrc1 ) =
( '', '', -1, '', 0, '', '', -1, 0, 0, 0, 0, , '' , '/usr/share/shorewall/shorewallrc', '' , 0 ); ( '', '', -1, '', 0, '', -1, 0, 0, 0, 0, , '' , '/usr/share/shorewall/shorewallrc', '' );
$export = 0; $export = 0;
$test = 0; $test = 0;
@@ -647,7 +617,6 @@ sub compiler {
timestamp => { store => \$timestamp, validate => \&validate_boolean } , timestamp => { store => \$timestamp, validate => \&validate_boolean } ,
debug => { store => \$debug, validate => \&validate_boolean } , debug => { store => \$debug, validate => \&validate_boolean } ,
export => { store => \$export , validate => \&validate_boolean } , export => { store => \$export , validate => \&validate_boolean } ,
chains => { store => \$chains },
log => { store => \$log }, log => { store => \$log },
log_verbosity => { store => \$log_verbosity, validate => \&validate_verbosity } , log_verbosity => { store => \$log_verbosity, validate => \&validate_verbosity } ,
test => { store => \$test }, test => { store => \$test },
@@ -655,7 +624,6 @@ sub compiler {
confess => { store => \$confess, validate=> \&validate_boolean } , confess => { store => \$confess, validate=> \&validate_boolean } ,
update => { store => \$update, validate=> \&validate_boolean } , update => { store => \$update, validate=> \&validate_boolean } ,
annotate => { store => \$annotate, validate=> \&validate_boolean } , annotate => { store => \$annotate, validate=> \&validate_boolean } ,
inline => { store => \$inline, validate=> \&validate_boolean } ,
config_path => { store => \$config_path } , config_path => { store => \$config_path } ,
shorewallrc => { store => \$shorewallrc } , shorewallrc => { store => \$shorewallrc } ,
shorewallrc1 => { store => \$shorewallrc1 } , shorewallrc1 => { store => \$shorewallrc1 } ,
@@ -689,9 +657,10 @@ sub compiler {
set_timestamp( $timestamp ); set_timestamp( $timestamp );
set_debug( $debug , $confess ); set_debug( $debug , $confess );
# #
# S H O R E W A L L R C ,
# S H O R E W A L L . C O N F A N D C A P A B I L I T I E S # S H O R E W A L L . C O N F A N D C A P A B I L I T I E S
# #
get_configuration( $export , $update , $annotate , $inline ); get_configuration( $export , $update , $annotate );
# #
# Chain table initialization depends on shorewall.conf and capabilities. So it must be deferred until # Chain table initialization depends on shorewall.conf and capabilities. So it must be deferred until
# now when shorewall.conf has been processed and the capabilities have been determined. # now when shorewall.conf has been processed and the capabilities have been determined.
@@ -793,13 +762,10 @@ sub compiler {
emit '}'; # End of setup_common_rules() emit '}'; # End of setup_common_rules()
} }
disable_script;
# #
# R O U T I N G _ A N D _ T R A F F I C _ S H A P I N G # R O U T I N G _ A N D _ T R A F F I C _ S H A P I N G
# (Writes the setup_routing_and_traffic_shaping() function to the compiled script) # (Writes the setup_routing_and_traffic_shaping() function to the compiled script)
# #
enable_script;
#
# Validate the TC files so that the providers will know what interfaces have TC # Validate the TC files so that the providers will know what interfaces have TC
# #
my $tcinterfaces = process_tc; my $tcinterfaces = process_tc;
@@ -817,7 +783,7 @@ sub compiler {
# #
# Setup Masquerade/SNAT # Setup Masquerade/SNAT
# #
setup_snat( $update ); setup_snat;
# #
# Setup Nat # Setup Nat
# #
@@ -898,7 +864,7 @@ sub compiler {
optimize_level0; optimize_level0;
if ( ( my $optimize = $config{OPTIMIZE} ) & 0x1E ) { if ( ( my $optimize = $config{OPTIMIZE} ) & OPTIMIZE_MASK ) {
progress_message2 'Optimizing Ruleset...'; progress_message2 'Optimizing Ruleset...';
# #
# Optimize Policy Chains # Optimize Policy Chains
@@ -920,7 +886,7 @@ sub compiler {
# N E T F I L T E R L O A D # N E T F I L T E R L O A D
# (Produces setup_netfilter(), setup_arptables(), chainlist_reload() and define_firewall() ) # (Produces setup_netfilter(), setup_arptables(), chainlist_reload() and define_firewall() )
# #
generate_script_3( $chains ); generate_script_3();
# #
# We must reinitialize Shorewall::Chains before generating the iptables-restore input # We must reinitialize Shorewall::Chains before generating the iptables-restore input
# for stopping the firewall # for stopping the firewall

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,9 @@
# #
# Shorewall 5.0 -- /usr/share/shorewall/Shorewall/IPAddrs.pm # Shorewall 5.2 -- /usr/share/shorewall/Shorewall/IPAddrs.pm
# #
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
# #
# (c) 2007-2015 - Tom Eastep (teastep@shorewall.net) # (c) 2007-2017 - Tom Eastep (teastep@shorewall.net)
# #
# Complete documentation is available at http://shorewall.net # Complete documentation is available at http://shorewall.net
# #
@@ -60,10 +60,10 @@ our @EXPORT = ( qw( ALLIPv4
decompose_net decompose_net
decompose_net_u32 decompose_net_u32
compare_nets compare_nets
loopback_address
validate_host validate_host
validate_range validate_range
ip_range_explicit ip_range_explicit
expand_port_range
allipv4 allipv4
allipv6 allipv6
allip allip
@@ -74,10 +74,6 @@ our @EXPORT = ( qw( ALLIPv4
resolve_proto resolve_proto
resolve_dnsname resolve_dnsname
proto_name proto_name
validate_port
validate_portpair
validate_portpair1
validate_port_list
validate_icmp validate_icmp
validate_icmp6 validate_icmp6
) ); ) );
@@ -103,12 +99,14 @@ our $resolve_dnsname;
our $validate_range; our $validate_range;
our $validate_host; our $validate_host;
our $family; our $family;
our $loopback_address;
use constant { ALLIPv4 => '0.0.0.0/0' , use constant { ALLIPv4 => '0.0.0.0/0' ,
ALLIPv6 => '::/0' , ALLIPv6 => '::/0' ,
NILIPv4 => '0.0.0.0' , NILIPv4 => '0.0.0.0' ,
NILIPv6 => '::' , NILIPv6 => '::' ,
IPv4_MULTICAST => '224.0.0.0/4' , IPv4_MULTICAST => '224.0.0.0/4' ,
IPv4_LOOPBACK => '127.0.0.1' ,
IPv6_MULTICAST => 'ff00::/8' , IPv6_MULTICAST => 'ff00::/8' ,
IPv6_LINKLOCAL => 'fe80::/10' , IPv6_LINKLOCAL => 'fe80::/10' ,
IPv6_SITELOCAL => 'feC0::/10' , IPv6_SITELOCAL => 'feC0::/10' ,
@@ -375,6 +373,10 @@ sub rfc1918_networks() {
@rfc1918_networks @rfc1918_networks
} }
sub loopback_address() {
$loopback_address;
}
# #
# Protocol/port validation # Protocol/port validation
# #
@@ -411,114 +413,6 @@ sub proto_name( $ ) {
$proto =~ /^(\d+)$/ ? $prototoname[ $proto ] || scalar getprotobynumber $proto : $proto $proto =~ /^(\d+)$/ ? $prototoname[ $proto ] || scalar getprotobynumber $proto : $proto
} }
sub validate_port( $$ ) {
my ($proto, $port) = @_;
my $value;
if ( $port =~ /^(\d+)$/ || $port =~ /^0x/ ) {
$port = numeric_value $port;
return $port if defined $port && $port && $port <= 65535;
} else {
$proto = proto_name $proto if $proto =~ /^(\d+)$/;
$value = getservbyname( $port, $proto );
}
return $value if defined $value;
fatal_error "The separator for a port range is ':', not '-' ($port)" if $port =~ /^\d+-\d+$/;
fatal_error "Invalid/Unknown $proto port/service ($_[1])" unless defined $value;
}
sub validate_portpair( $$ ) {
my ($proto, $portpair) = @_;
my $what;
my $pair = $portpair;
#
# Accept '-' as a port-range separator
#
$pair =~ tr/-/:/ if $pair =~ /^[-0-9]+$/;
fatal_error "Invalid port range ($portpair)" if $pair =~ tr/:/:/ > 1;
$pair = "0$pair" if substr( $pair, 0, 1 ) eq ':';
$pair = "${pair}65535" if substr( $pair, -1, 1 ) eq ':';
my @ports = split /:/, $pair, 2;
my $protonum = resolve_proto( $proto ) || 0;
$_ = validate_port( $protonum, $_) for grep $_, @ports;
if ( @ports == 2 ) {
$what = 'port range';
fatal_error "Invalid port range ($portpair)" unless $ports[0] < $ports[1];
} else {
$what = 'port';
}
fatal_error "Using a $what ( $portpair ) requires PROTO TCP, UDP, UDPLITE, SCTP or DCCP" unless
defined $protonum && ( $protonum == TCP ||
$protonum == UDP ||
$protonum == UDPLITE ||
$protonum == SCTP ||
$protonum == DCCP );
join ':', @ports;
}
sub validate_portpair1( $$ ) {
my ($proto, $portpair) = @_;
my $what;
fatal_error "Invalid port range ($portpair)" if $portpair =~ tr/-/-/ > 1;
$portpair = "1$portpair" if substr( $portpair, 0, 1 ) eq ':';
$portpair = "${portpair}65535" if substr( $portpair, -1, 1 ) eq ':';
my @ports = split /-/, $portpair, 2;
my $protonum = resolve_proto( $proto ) || 0;
$_ = validate_port( $protonum, $_) for grep $_, @ports;
if ( @ports == 2 ) {
$what = 'port range';
fatal_error "Invalid port range ($portpair)" unless $ports[0] && $ports[0] < $ports[1];
} else {
$what = 'port';
fatal_error 'Invalid port number (0)' unless $portpair;
}
fatal_error "Using a $what ( $portpair ) requires PROTO TCP, UDP, SCTP or DCCP" unless
defined $protonum && ( $protonum == TCP ||
$protonum == UDP ||
$protonum == SCTP ||
$protonum == DCCP );
join '-', @ports;
}
sub validate_port_list( $$ ) {
my $result = '';
my ( $proto, $list ) = @_;
my @list = split_list( $list, 'port' );
if ( @list > 1 && $list =~ /[:-]/ ) {
require_capability( 'XMULTIPORT' , 'Port ranges in a port list', '' );
}
$proto = proto_name $proto;
for ( @list ) {
my $value = validate_portpair( $proto , $_ );
$result = $result ? join ',', $result, $value : $value;
}
$result;
}
my %icmp_types = ( any => 'any', my %icmp_types = ( any => 'any',
'echo-reply' => 0, 'echo-reply' => 0,
'destination-unreachable' => 3, 'destination-unreachable' => 3,
@@ -572,67 +466,6 @@ sub validate_icmp( $ ) {
fatal_error "Invalid ICMP Type ($type)" fatal_error "Invalid ICMP Type ($type)"
} }
#
# Expands a port range into a minimal list of ( port, mask ) pairs.
# Each port and mask are expressed as 4 hex nibbles without a leading '0x'.
#
# Example:
#
# DB<3> @foo = Shorewall::IPAddrs::expand_port_range( 6, '110:' ); print "@foo\n"
# 006e fffe 0070 fff0 0080 ff80 0100 ff00 0200 fe00 0400 fc00 0800 f800 1000 f000 2000 e000 4000 c000 8000 8000
#
sub expand_port_range( $$ ) {
my ( $proto, $range ) = @_;
if ( $range =~ /^(.*):(.*)$/ ) {
my ( $first, $last ) = ( $1, $2);
my @result;
fatal_error "Invalid port range ($range)" unless $first ne '' or $last ne '';
#
# Supply missing first/last port number
#
$first = 0 if $first eq '';
$last = 65535 if $last eq '';
#
# Validate the ports
#
( $first , $last ) = ( validate_port( $proto, $first || 1 ) , validate_port( $proto, $last ) );
$last++; #Increment last address for limit testing.
#
# Break the range into groups:
#
# - If the first port in the remaining range is odd, then the next group is ( <first>, ffff ).
# - Otherwise, find the largest power of two P that divides the first address such that
# the remaining range has less than or equal to P ports. The next group is
# ( <first> , ~( P-1 ) ).
#
while ( ( my $ports = ( $last - $first ) ) > 0 ) {
my $mask = 0xffff; #Mask for current ports in group.
my $y = 2; #Next power of two to test
my $z = 1; #Number of ports in current group (Previous value of $y).
while ( ( ! ( $first % $y ) ) && ( $y <= $ports ) ) {
$mask <<= 1;
$z = $y;
$y <<= 1;
}
#
#
push @result, sprintf( '%04x', $first ) , sprintf( '%04x' , $mask & 0xffff );
$first += $z;
}
fatal_error "Invalid port range ($range)" unless @result; # first port > last port
@result;
} else {
( sprintf( '%04x' , validate_port( $proto, $range ) ) , 'ffff' );
}
}
sub valid_6address( $ ) { sub valid_6address( $ ) {
my $address = $_[0]; my $address = $_[0];
@@ -929,6 +762,7 @@ sub initialize( $ ) {
$nilip = NILIPv4; $nilip = NILIPv4;
@nilip = @nilipv4; @nilip = @nilipv4;
$vlsm_width = VLSMv4; $vlsm_width = VLSMv4;
$loopback_address = IPv4_LOOPBACK;
$valid_address = \&valid_4address; $valid_address = \&valid_4address;
$validate_address = \&validate_4address; $validate_address = \&validate_4address;
$validate_net = \&validate_4net; $validate_net = \&validate_4net;
@@ -941,6 +775,7 @@ sub initialize( $ ) {
$nilip = NILIPv6; $nilip = NILIPv6;
@nilip = @nilipv6; @nilip = @nilipv6;
$vlsm_width = VLSMv6; $vlsm_width = VLSMv6;
$loopback_address = IPv6_LOOPBACK;
$valid_address = \&valid_6address; $valid_address = \&valid_6address;
$validate_address = \&validate_6address; $validate_address = \&validate_6address;
$validate_net = \&validate_6net; $validate_net = \&validate_6net;

Some files were not shown because too many files have changed in this diff Show More