Compare commits

..

1089 Commits

Author SHA1 Message Date
Tom Eastep
b015bc3c0d Fix exclusion in IPv6 hosts file.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-09 17:27:56 -07:00
Tom Eastep
f73b98668d Fix ipsets in IPv6 hosts file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-09 16:16:28 -07:00
Tom Eastep
3991b44de0 Another IPv6 ipset issue (z:!+set in the DEST column)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-09 15:36:07 -07:00
Tom Eastep
769f618650 Document renaming of scripts in the Build document
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-09 15:22:01 -07:00
Tom Eastep
e20feedde8 Mention reversed interfaces in FAQ 1b.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-09 09:35:56 -07:00
Tom Eastep
eebe693c3a Correct Accounting module version
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-09 07:07:52 -07:00
Tom Eastep
b1a883ecaf Tighten up source and dest checking in expand_rule()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-09 06:50:23 -07:00
Tom Eastep
14206dde87 Correct change that tightened editing of IPv6 addresses
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-08 18:34:01 -07:00
Tom Eastep
cf9a8d51aa Another fix for IPv6 and IPSETs
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-08 16:32:03 -07:00
Tom Eastep
0e81d6c90c Correct handling of <interface>:+<ipset> in Shorewall6.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-08 15:55:58 -07:00
Tom Eastep
218fd75119 Transfer corrected problems from unreleased 4.4.20.4
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-08 08:34:32 -07:00
Tom Eastep
3974314bae Expand explaination of rate limiting
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-08 07:08:39 -07:00
Tom Eastep
b90f6e38bc Correct TPROXY/IPv6 address fix
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-07 18:11:54 -07:00
Tom Eastep
726eb0c8c0 Document fix for TPROXY and IPv6
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-07 06:37:52 -07:00
Tom Eastep
6154959d97 Allow IPv6 Address as the third argument to TPROXY
- also update the manpages to describe TPROXY

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-07 06:33:13 -07:00
Tom Eastep
0c4d6983ef Show alternative message for partial PORT or PASV reply
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-06 13:12:18 -07:00
Tom Eastep
6ab1cc4fac Version to 4.4.21
Also update the release notes to mention that the ipset modules are now
loaded by Shorewall6.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-06 10:59:00 -07:00
Tom Eastep
d279f378f8 Document fix for load/reload
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-05 12:58:50 -07:00
Tom Eastep
210f56c54e Make load and reload use the .conf file in the CWD
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-05 09:56:47 -07:00
Tom Eastep
f38eb15350 Correct check for new ipset match syntax
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-05 07:50:32 -07:00
Tom Eastep
e41126ae2f Add modules.ipset to modules INCLUDEs.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-04 16:19:07 -07:00
Tom Eastep
2ec7ac020b Correct loading of xt_ipset
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-04 16:06:27 -07:00
Tom Eastep
11688d22b2 Add semicolons in new actions.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-04 14:27:21 -07:00
Tom Eastep
10e77d8680 Correct IPv6 action.Drop
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-04 08:02:17 -07:00
Tom Eastep
c1b64e0ddd Version to RC 3
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-04 07:17:59 -07:00
Tom Eastep
27ab3c71c0 Implement parameterized default actions for IPv6
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-04 07:13:32 -07:00
Tom Eastep
f05b72327e Corrections to dropBcast/allowBcast
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-03 15:54:24 -07:00
Tom Eastep
5c716827d6 Update change log
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-03 13:11:52 -07:00
Tom Eastep
55eeee761c Don't quote the empty setting of LOGLIMIT
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-03 12:53:47 -07:00
Tom Eastep
79653e942f Version to RC 1 -- again
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-03 12:25:22 -07:00
Tom Eastep
1e5ec013b0 Make config file quoting more consistent with update
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-03 12:20:11 -07:00
Tom Eastep
5287e85eb4 Correct handling of IPv6 dropped/accepted broadcast packets
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-03 09:36:04 -07:00
Tom Eastep
7266e1bd89 Update documentation to reflect the fact that '-' is not really an empty parameter
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-03 09:21:28 -07:00
Tom Eastep
584040b413 Bump Version to RC 2 2011-07-03 09:04:35 -07:00
Tom Eastep
9691a8ceb3 Don't collapse '-' and '--' in @actparms
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-03 08:47:53 -07:00
Tom Eastep
d31e2d67ba DEFAULTS directive enforces max number of parameters
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-03 07:22:29 -07:00
Tom Eastep
62c62441bb Eliminate duplicate function definitions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-03 07:04:52 -07:00
Tom Eastep
5b06e88b3d Push/Pop comment during action processing
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-03 06:37:41 -07:00
Tom Eastep
7e3f97c154 Prepare for more parameterized actions
- Export add_commands, incr_cmd_level and decr_cmd_level by default
- Move ensure_audit_chain and require_audit from Rules.pm to Chains.pm
- Add get_action_logging() function
- Export require_capability and have_capability by default

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-03 06:22:51 -07:00
Tom Eastep
ad71faacaa Correct push_action_params()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-02 17:02:39 -07:00
Tom Eastep
42aa3724af Trace system calls when debugging
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-02 08:37:57 -07:00
Tom Eastep
46c4387397 Merge branch 'master' into 4.4.21 2011-07-02 07:02:50 -07:00
Tom Eastep
bd9bf3d43a Rename & export get_actionchain() -> get_action_chain()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-02 07:02:18 -07:00
Tom Eastep
7cc2f91e66 Revert "Simplify push_action_params()"
This reverts commit 34c788d67d.
2011-07-01 16:34:55 -07:00
Tom Eastep
c309ca3075 Revert "Simplify push_action_params()"
This reverts commit 89ee25dde2.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-01 16:23:39 -07:00
Tom Eastep
8ab45b4de3 Save current action chain along with params. Add get_action_chain()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-01 16:21:36 -07:00
Tom Eastep
7ffcca4cbd Minor rewording in the release notes.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-01 15:39:17 -07:00
Tom Eastep
34c788d67d Simplify push_action_params()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-01 15:39:11 -07:00
Tom Eastep
89ee25dde2 Simplify push_action_params()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-01 15:38:39 -07:00
Tom Eastep
981c9a9047 Minor rewording in the release notes.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-07-01 13:03:33 -07:00
Tom Eastep
ea22d79aeb Update the version of Providers.pm 2011-06-30 18:40:48 -07:00
Tom Eastep
6ff02dbaa3 Make 'fallback' and 'balance' mutually exclusive
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-30 10:00:01 -07:00
Tom Eastep
ef848a559c Correct TPROXY documentation
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-30 06:36:48 -07:00
Tom Eastep
7f255313d9 Document fix for TPROXY
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-29 20:29:18 -07:00
Tom Eastep
f09d286738 Correct script generation problem with TPROXY
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-29 20:05:27 -07:00
Tom Eastep
3e8c1f4e3c Add undocumented -c option to show and dump
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-29 11:48:23 -07:00
Tom Eastep
cbeebb6bf8 Bump version to 4.4.21.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-29 11:36:04 -07:00
Tom Eastep
20283d7151 Update Change log with RC 1 changes.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-29 11:34:53 -07:00
Tom Eastep
bd2cbfc5e2 Correct typo in the Manual Chains HOWTO
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-28 07:45:49 -07:00
Tom Eastep
ea038bcecb Correct regular expression in process_shorewall_conf()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-28 06:42:41 -07:00
Tom Eastep
dedbbf2292 Replace FILTER_LOG_LEVEL with SFILTER_LOG_LEVEL in the .conf manpages 2011-06-26 11:19:57 -07:00
Tom Eastep
fe1a0154c6 Avoid false match 2011-06-26 09:26:49 -07:00
Tom Eastep
33be910029 Avoid false match 2011-06-26 09:16:02 -07:00
Tom Eastep
05103bacd0 Don't expand single-quoted .conf option values
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-26 07:45:09 -07:00
Tom Eastep
0b431aa8c1 Minor tweaks to Config.pm
- Add/revise comments
- Rename $line -> $lineref in expand_variables()
- Collapse 3 lines into one in process_shorewall_conf()
2011-06-26 06:50:22 -07:00
Tom Eastep
7507c81882 Remove some whitespace
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-25 21:55:49 -07:00
Tom Eastep
9f37f09b28 Clean up variable expansion:
1) Centralize code in function expand_variables()
2) Eliminate %rawconfig
3) Correct logic in update_config_file() - the defect was not observable
   but the code was clearly silly
2011-06-25 21:08:32 -07:00
Tom Eastep
47c759d93c Convert %actparms to an array
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-25 11:39:13 -07:00
Tom Eastep
024c1fbd08 Validate first argument to the default actions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-25 10:51:17 -07:00
Tom Eastep
713af61380 Detect too many parameters to Drop and Reject 2011-06-25 10:38:01 -07:00
Tom Eastep
67b8a10879 Correct parameterized default action in the FAQ 2011-06-25 10:26:45 -07:00
Tom Eastep
5740b69dc6 Fix another empty parameter list issue 2011-06-25 09:46:58 -07:00
Tom Eastep
6cc2503f60 More FAQ updates
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-25 08:23:32 -07:00
Tom Eastep
961b9b5e6d More FAQ cleanup
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-25 07:44:13 -07:00
Tom Eastep
fe2ef23f04 Correct install.sh
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-24 21:16:55 -07:00
Tom Eastep
f4acb5fa2f Install annotated and un-annotated config files
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-24 15:13:40 -07:00
Tom Eastep
19c1f388a7 Modify Debian test in update
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-24 15:01:25 -07:00
Tom Eastep
8b61e4500a Documentation Updates (mostly FAQ)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-24 13:40:50 -07:00
Tom Eastep
fb2085b0c3 Support 'update' on Debian
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-24 13:40:32 -07:00
Tom Eastep
6da5380230 Update troubleshooting doc for -T option
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-24 11:48:14 -07:00
Tom Eastep
ca9276fd7e Add quotes on deprecated and obsolete options if appropriate
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-24 11:47:34 -07:00
Tom Eastep
129d1739d1 Cosmetic changes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-24 07:58:46 -07:00
Tom Eastep
7583a5c7a3 Use updated values in configuration verification
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-24 07:22:41 -07:00
Tom Eastep
7ec5f60571 Document FOREWARD->FORWARD typo correction
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-24 07:21:12 -07:00
Tom Eastep
11b847f3a4 Correct spelling in an error message (FOREWARD -> FORWARD)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-24 06:22:16 -07:00
Tom Eastep
4c9417d5f6 Add ipset support in Shorewall6 to the highlights section.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-24 06:21:42 -07:00
Tom Eastep
6f68ed5508 Initiate 4.4.21 RC 1 2011-06-23 16:23:52 -07:00
Tom Eastep
cc1b808866 Merge branch 'master' of ssh://shorewall.git.sourceforge.net/gitroot/shorewall/shorewall 2011-06-23 06:38:59 -07:00
Tom Eastep
ba9a0016a8 Move update_config_file() to before process_shorewall_conf()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-23 06:37:21 -07:00
Tom Eastep
de7d95e7ff Rename 'ipset v4' -> 'ipset v5'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-23 06:36:35 -07:00
Tom Eastep
9fa5e62d4f Rename 'ipset v4' -> 'ipset v5'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-22 17:09:23 -07:00
Tom Eastep
04d551d8ca Detect ipset V4 and use its syntax
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-22 16:43:42 -07:00
Tom Eastep
000268f50c Smarten up action.Drop and action.Reject WRT omitted parameters
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-22 15:45:14 -07:00
Tom Eastep
a5167dcd28 Update header documentation in action.Drop and action.Reject
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-22 14:27:32 -07:00
Tom Eastep
7ef7490cd6 Change the compiler's default for LEGACY_FASTSTART
- No visible effect since the compiler doesn't use this option
2011-06-22 13:56:17 -07:00
Tom Eastep
1b3d7947b8 Update the .conf file before validating ('update' command)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-22 12:31:58 -07:00
Tom Eastep
ba7d5fd720 Avoid two-stage processing of shorewall.conf when not updating.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-22 10:56:25 -07:00
Tom Eastep
106ba52362 Change signature of get_action_params
- Accepts a number of parameters rather than a list
- Change action.Drop and action.Reject accordingly
- Define correct number of parameter variables in action.Drop and action.Reject

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-22 08:27:01 -07:00
Tom Eastep
0d2e2a14d3 Document additional parameters to standard default actions and DEFAULT in macro files
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-22 08:05:13 -07:00
Tom Eastep
62a75cb98d Fix parameterization of standard default actions.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-22 07:51:42 -07:00
Tom Eastep
b43bee2c62 Streamline PERL in action.Drop and action.Reject
- Rename read_action_param => get_action_params
- Allow it to accept a list of indexes and to return a list

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-22 06:53:15 -07:00
Tom Eastep
bbf853bd1d Cleaner handling of DEFAULTS in a non-action context
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-22 06:11:20 -07:00
Tom Eastep
ece598288f Disallow DEFAULTS in the rules file 2011-06-21 21:00:08 -07:00
Tom Eastep
d51ca478bd Reverse one hunk from empty-parameter fix
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-21 11:45:32 -07:00
Tom Eastep
fe9e2ba28d Correct error message 2011-06-20 19:47:33 -07:00
Tom Eastep
063e21e69f Allow an empty parameter list in an action (e.g., "Action()")
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-20 19:45:01 -07:00
Tom Eastep
44599530ea Remove warnings about duplicate zone/interface dynamic hosts
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-20 18:27:18 -07:00
Tom Eastep
71d88b93a0 Make IPv6 Dynamic Zone set names unique
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-20 17:22:34 -07:00
Tom Eastep
7b2cbf2449 Make 'show dynamic <zone>' work correctly with new ipset program
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-20 17:22:04 -07:00
Tom Eastep
39e74911d8 Improve generated code
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-20 14:34:26 -07:00
Tom Eastep
ec28bdb5a0 Document Shorewall6 support for dynamic zones.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-20 14:33:49 -07:00
Tom Eastep
44cbfd8f27 Correct defects found while unit testing IPv6 Dynamic Zones
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-20 13:33:25 -07:00
Tom Eastep
c112f2381e Document IPv6 Dynamic Zones
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-20 10:59:14 -07:00
Tom Eastep
119d38c92b Enable dynamic zones for IPv6
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-20 10:41:29 -07:00
Tom Eastep
47264b249e Merge branch 'master' of ssh://shorewall.git.sourceforge.net/gitroot/shorewall/shorewall
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-20 07:45:21 -07:00
Tom Eastep
785de281b5 More IPv6 ipset fixes
- use 'family inet6' rather than 'family ipv6'
- Correct one more case of 'iphash' vs 'hash:ip family inet6'
- Encapsulate ipset -N into an 'ensure_ipset()' function

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-20 07:43:32 -07:00
Tom Eastep
d636c36ba7 More IPv6 ipset fixes
- use 'family inet6' rather than 'family ipv6'
- Correct one more case of 'iphash' vs 'hash:ip family inet6'

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-20 07:37:28 -07:00
Tom Eastep
4c2f12e645 Some whitespace changes 2011-06-19 19:08:32 -07:00
Tom Eastep
e4bcc12301 Use 'here documents' rather than single quotes.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-19 18:33:10 -07:00
Tom Eastep
f7322a674d Update ipset doc with Shorewall6 and Shorewall-init info.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-19 15:00:48 -07:00
Tom Eastep
2097d0f4a0 Accomodate new syntax of ipset saved commands
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-19 14:06:42 -07:00
Tom Eastep
46d64e39d1 Use correct syntax to create IPv6 ipsets.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-19 14:04:53 -07:00
Tom Eastep
be6b08f835 Be sure to detect IPSET_MATCH before OLD_IPSET_MATCH.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-19 13:29:10 -07:00
Tom Eastep
d12336ec78 Reword 'update' description.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-19 13:28:17 -07:00
Tom Eastep
ee384d03ce Allow Shorewall-init to save/restore ipset contents
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-19 10:10:59 -07:00
Tom Eastep
7753f798b0 Bump Version to Beta 3
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-19 10:09:53 -07:00
Tom Eastep
2769b09f64 Correct typeos in shorewall and shorwall6 2011-06-19 08:39:44 -07:00
Tom Eastep
a4b77d7267 Update compiler.pl documentation
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-19 07:56:03 -07:00
Tom Eastep
c264aaae6b Update module versions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-19 07:41:26 -07:00
Tom Eastep
4916610033 Rename upgrade => update
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-19 07:14:27 -07:00
Tom Eastep
6f3497e353 Update Audit.xml with parameterized standard action info
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-19 06:50:18 -07:00
Tom Eastep
df2f7ec6a5 Implement 'upgrade' and delete the '-u' and '-a' options of 'check'.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-18 17:39:44 -07:00
Tom Eastep
55242d1ed6 Add a few comments
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-18 16:55:00 -07:00
Tom Eastep
d66c7d478e Eliminate expansion of shell variables in the upgraded config file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-18 16:33:41 -07:00
Tom Eastep
e8e7215f4b Add a warning about shell variables
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-18 16:00:29 -07:00
Tom Eastep
380443f26d Eliminate %defaults
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-18 15:44:07 -07:00
Tom Eastep
faeb2da2ba Corrections to Defaults
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-18 15:38:08 -07:00
Tom Eastep
f93ac02bfc Provide default values for added entries
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-18 14:50:07 -07:00
Tom Eastep
c7be1f1b38 Remove silly "#LAST LINE" from shorewall6.conf
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-18 13:14:55 -07:00
Tom Eastep
96f6dc3558 More defined => supplied changes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-18 13:08:26 -07:00
Tom Eastep
6f2cc31dde Implement .conf file upgrade
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-18 13:03:55 -07:00
Tom Eastep
e5d8be5aa5 Bump version to Beta 2
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-18 11:23:43 -07:00
Tom Eastep
d23f932ebe Don't generate INPUT hairpin rules
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-18 06:21:36 -07:00
Tom Eastep
89529df71f Odd capitalization to make annotate.pl work correctly
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-18 06:10:32 -07:00
Tom Eastep
e7cdf75463 Correct version when :<burst> was added 2011-06-17 17:19:37 -07:00
Tom Eastep
dfcd29d930 Correct spelling error in shorewall6-interfaces(5)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-15 14:00:30 -07:00
Tom Eastep
f9ee8c494d Exempt wildcard interfaces from sfilter
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-14 06:45:22 -07:00
Tom Eastep
9aedd407cc Quell compiler warnings from Perl 5.14.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-13 06:40:03 -07:00
Tom Eastep
10ae91b600 Delete deprecated options from the .conf files
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-12 13:46:26 -07:00
Tom Eastep
8780aff7f2 Rename PLAIN->ANNOTATED 2011-06-12 09:45:50 -07:00
Tom Eastep
65d4709372 Drop IPv6 IPSET support for now 2011-06-12 09:14:33 -07:00
Tom Eastep
785bd7c987 Apply Tuomo Soini's patch
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-12 07:22:26 -07:00
Tom Eastep
a0c5647c2a Re-add IPv6 ipset support
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-12 06:22:18 -07:00
Tom Eastep
9ab901927f Use supplied() where appropriate
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-11 16:14:31 -07:00
Tom Eastep
774aac1228 Add a supplied() function
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-11 15:40:55 -07:00
Tom Eastep
99728d5695 Merge branch 'master' of ssh://shorewall.git.sourceforge.net/gitroot/shorewall/shorewall 2011-06-11 15:33:21 -07:00
Tom Eastep
b7a3142620 Document parameterized default actions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-11 15:25:48 -07:00
Tom Eastep
738c46906c Document parameterized default actions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-11 15:15:29 -07:00
Tom Eastep
a60fe6e665 Allow parameters to be specified to Default Actions in the policy file
and in shorewall.conf.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-11 14:58:54 -07:00
Tom Eastep
68bf99ec69 Parameterize the standard default actions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-11 08:34:37 -07:00
Tom Eastep
3dd363677c Implement set_action_param
Export both set_action_params and read_action_param by default

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-11 08:33:21 -07:00
Tom Eastep
8b6a7a7053 Implement read_action_param()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-11 07:49:57 -07:00
Tom Eastep
f278d05637 Rename action param functions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-11 07:46:54 -07:00
Tom Eastep
0cb98737f7 Document DEFAULTS
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-11 07:29:25 -07:00
Tom Eastep
2549982528 Fix DEFAULTS
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-11 07:23:41 -07:00
Tom Eastep
af1898b17b Document default values for parameters
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-11 07:18:11 -07:00
Tom Eastep
acefd0a75b Improvements to interfaces manpages
- Indicate when 'routefilter' cannot be used.
- Clarify use of 'sfilter'

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-11 06:44:07 -07:00
Tom Eastep
6e6be468a9 Support for DEFAULT statements in actions 2011-06-10 17:05:09 -07:00
Tom Eastep
32c7d36cd0 Make zones with multiple interfaces complex
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-10 15:37:26 -07:00
Tom Eastep
dbd30f981c Set the interface routeback option if there are any IP host groups with 'routeback'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-10 15:37:09 -07:00
Tom Eastep
79348d2b55 Correct manpages: filter->sfilter
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-10 06:04:45 -07:00
Tom Eastep
8a7ad569e4 Don't leave unused sfilter chains in the config
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-09 17:22:48 -07:00
Tom Eastep
3e9a54d404 Couple of tweaks
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-09 17:22:34 -07:00
Tom Eastep
a0b0c5bdac Jump (don't go) to sfilter1
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-09 14:24:44 -07:00
Tom Eastep
1399a8ffde Don't move rules from a chain with references
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-09 14:24:38 -07:00
Tom Eastep
9555a552c2 Fix FORWARD with ipsec dest
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-09 14:24:08 -07:00
Tom Eastep
71177c3ca3 Exempt ipsec from sfilter
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-09 07:27:06 -07:00
Tom Eastep
b17ad603ae Correct typo in the shorewall-providers manpage
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-08 14:38:56 -07:00
Tom Eastep
fa2746d469 Apply sfilter to INPUT as well as FORWARD
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-08 09:40:28 -07:00
Tom Eastep
d6ebdd3cb7 Fix tcrules manapges WRT source/dest ports
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-08 09:03:08 -07:00
Tom Eastep
35d1586672 Correct sfq handle assignment
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-07 13:58:45 -07:00
Tom Eastep
a3968beb7e Add fix inadvertently dropped from 4.4.19.4
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-07 13:57:52 -07:00
Tom Eastep
0e839f3d7b Initiate 4.4.21
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-07 09:54:35 -07:00
Tom Eastep
9fb2ab718c Have AUTOMAKE follow CONFIG_PATH
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-07 08:51:36 -07:00
Tom Eastep
9c2c562bf5 Correct autorepeat wart
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-07 06:45:50 -07:00
Tom Eastep
cf0275a049 Make FAKE_AUDIT work again 2011-06-06 16:08:29 -07:00
Tom Eastep
59c11e205b Update release notes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-06 15:48:26 -07:00
Tom Eastep
642319d706 Change annotated documentation default
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-06 15:40:21 -07:00
Tom Eastep
cfb3d6a801 Merge branch '4.4.20' 2011-06-06 14:09:26 -07:00
Tom Eastep
6136e986cf Update version to 4.4.20.1
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-06 14:08:25 -07:00
Tom Eastep
186f89f387 Merge branch '4.4.20' 2011-06-06 13:23:47 -07:00
Tom Eastep
e8f61e2109 Restate vulnerability
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-06 13:19:40 -07:00
Tom Eastep
447d0f0b2d Don't modify the .conf file installed in configfiles.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-06 09:46:52 -07:00
Tom Eastep
c42c6864b4 Don't modify the .conf file installed in configfiles.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-06 09:46:22 -07:00
Tom Eastep
2803d3ee0b Merge branch '4.4.20' 2011-06-06 07:02:57 -07:00
Tom Eastep
c2e78bfaf8 Correct address of the FSF
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-06 06:55:40 -07:00
Tom Eastep
f04a541195 Merge branch '4.4.20' 2011-06-05 18:02:03 -07:00
Tom Eastep
037a9374df Merge branch '4.4.20' 2011-06-05 17:59:19 -07:00
Tom Eastep
4436d479b4 Extend FAQ 4 2011-06-05 17:58:20 -07:00
Tom Eastep
b20156de9e Add note about 'burst' to the complex TC doc
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-05 06:33:33 -07:00
Tom Eastep
e264e42d81 Add note about 'burst' to the complex TC doc
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-05 06:33:01 -07:00
Tom Eastep
aabefe91f1 Merge branch '4.4.20' 2011-06-04 08:46:40 -07:00
Tom Eastep
f1cbfab7ac More blacklist/audit fixes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-04 08:45:23 -07:00
Tom Eastep
653a61a04a Merge branch '4.4.20' 2011-06-04 07:44:24 -07:00
Tom Eastep
a9c0824a30 Correct BLACKLIST_DISPOSITION=A_xxx with BLACKLIST_LOG_LEVEL
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-04 07:44:07 -07:00
Tom Eastep
818b927b73 Make Kernel Config article unmaintained 2011-06-04 06:31:25 -07:00
Tom Eastep
4f3b306140 Make Kernel Config article unmaintained 2011-06-03 18:26:46 -07:00
Tom Eastep
bf75c33014 Merge branch '4.4.20' 2011-06-03 07:39:24 -07:00
Tom Eastep
eba1473600 Change heading in the Documentation Index
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-03 07:39:08 -07:00
Tom Eastep
aa86b65ec3 Merge branch '4.4.20' 2011-06-02 11:44:15 -07:00
Tom Eastep
254e1ed784 Add 'I' STATE to secmarks
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-02 11:43:55 -07:00
Tom Eastep
c3b56c1e73 Merge branch '4.4.20' 2011-06-02 10:07:03 -07:00
Tom Eastep
561d461a25 Add 'NI' STATE setting in secmarks.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-02 10:06:27 -07:00
Tom Eastep
169c995940 Fix a typo in the release notes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-02 06:50:10 -07:00
Tom Eastep
1e883c2fdf Merge branch '4.4.20' 2011-06-02 06:47:09 -07:00
Tom Eastep
c3600eb814 Document -p and PLAIN
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-02 06:43:23 -07:00
Tom Eastep
086a99ea24 Don't initialize PLAIN
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-02 06:23:57 -07:00
Tom Eastep
f9c5b8b0d5 Improve some comments
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-02 06:23:37 -07:00
Tom Eastep
36aee407ef Merge branch '4.4.20' 2011-06-01 13:01:27 -07:00
Tom Eastep
5f08605adc Delete some cruft
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-01 12:26:05 -07:00
Tom Eastep
faff915dd2 Fix a typo in the release notes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-01 06:53:09 -07:00
Tom Eastep
b30d1bfc48 Merge branch '4.4.20' 2011-06-01 06:34:43 -07:00
Tom Eastep
f253bb5a11 Corrections to release notes.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-06-01 06:31:02 -07:00
Tom Eastep
7d4efd3e08 Fix IPv6 three-interface zone file 2011-06-01 05:33:28 -07:00
Tom Eastep
c1a7520527 Fix IPv6 three-interface zone file 2011-06-01 05:32:16 -07:00
Tom Eastep
243a09783c Merge branch '4.4.20' 2011-05-31 15:45:09 -07:00
Tom Eastep
7bf74bb8c9 Add new builtin targets to %builtin_target
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-31 15:43:42 -07:00
Tom Eastep
21d2c5720b Clarify 'bridge_nf_call_*'; mention that problems corrected in 4.4.19 dot releases are included
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-31 12:22:45 -07:00
Tom Eastep
468ff6efab First cut at IPSET/Dynamic-zone support in Shorewall6
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-31 11:23:43 -07:00
Tom Eastep
8df470b5f5 Version to 4.4.20 2011-05-31 09:30:18 -07:00
Tom Eastep
5ce3a1f4d1 Update release documents
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-31 07:03:56 -07:00
Tom Eastep
2f6c5fd260 Set 'bridge-nf-call-ip6?tables' if bridges are configured.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-31 06:59:43 -07:00
Tom Eastep
4f296b62ae Another fix for auditone 2011-05-30 16:37:56 -07:00
Tom Eastep
e6275ba31d Fix a bug in auditing
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-30 15:28:00 -07:00
Tom Eastep
d89a915f26 Load IPv6 libraries when processing /etc/shorewall6/params
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-30 13:24:36 -07:00
Tom Eastep
2dec3a8ecb Correct handling of AUDIT_TARGET is both cli libraries.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-30 11:39:21 -07:00
Tom Eastep
26d08b92c0 Correct use of null value as a hash
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-30 11:38:49 -07:00
Tom Eastep
b0447b8bd3 Remove another MACLIST defect 2011-05-30 08:49:41 -07:00
Tom Eastep
7c8191ddae Remove a pushd from the Shorewall6 installer 2011-05-30 08:43:34 -07:00
Tom Eastep
7b560eefe4 Allow compound options in the installers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-30 08:15:59 -07:00
Tom Eastep
60d33740f6 Fix MACLIST_DISPOSITION defect introduced earlier in this release
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-30 07:59:44 -07:00
Tom Eastep
11c209c55f Restore access to $Shorewall::Rules::family 2011-05-29 17:22:36 -07:00
Tom Eastep
2852cdeb53 Another attempt at the IPMARK fix 2011-05-29 14:42:23 -07:00
Tom Eastep
a71136fd5a Rework configuration files for Shorewall and Shorewall6
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-29 14:34:18 -07:00
Tom Eastep
d20b57f3e6 Syncronize Shorewall6 Samples 2011-05-28 20:26:15 -07:00
Tom Eastep
a7e62251a0 Syncronize Shorewall6 Samples 2011-05-28 20:22:08 -07:00
Tom Eastep
316b2b8e71 Add MACLIST_DISPOSITION shorewall6.conf manpage 2011-05-28 20:01:54 -07:00
Tom Eastep
3dcc90e4de Delete IPSET_SAVE from shorewall6.conf manpage 2011-05-28 19:58:57 -07:00
Tom Eastep
b05ed0a67d Add MACLIST_* to shorewall6.conf manpage 2011-05-28 19:56:09 -07:00
Tom Eastep
60d9f48f15 Add MACLIST_* to shorewall6.conf 2011-05-28 19:52:39 -07:00
Tom Eastep
c81b4b0aea Add LOGRATE to shorewall6.conf 2011-05-28 19:48:46 -07:00
Tom Eastep
22278188dd Add LOGBURST to shorewall6.conf 2011-05-28 19:46:47 -07:00
Tom Eastep
6a37fa89e6 Remove duplicate RESTOREFILE 2011-05-28 19:43:45 -07:00
Tom Eastep
5fb928348b Delete BIGdPORTLISTS 2011-05-28 19:15:49 -07:00
Tom Eastep
7404d912bd Add LOGRATE to */shorewall.conf 2011-05-28 19:12:34 -07:00
Tom Eastep
ec01e39479 Add LOGBURST to */shorewall.conf 2011-05-28 19:03:18 -07:00
Tom Eastep
149ce8fbf3 Delete LOCKFILE from the Sample6 files 2011-05-28 16:26:53 -07:00
Tom Eastep
bc4f6eecce Install shorewall6.conf.default 2011-05-28 16:02:31 -07:00
Tom Eastep
839909e8ea Remove LOCKFILE from shorewall6.conf 2011-05-28 15:15:54 -07:00
Tom Eastep
9dc689dd13 Sort Sample .conf files 2011-05-28 12:38:12 -07:00
Tom Eastep
6d3640dafc Alphabetize config files and sync files and manpages
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-28 10:34:54 -07:00
Tom Eastep
03ecdc8c06 Clean up shorewall.conf and its documentation
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-28 09:10:46 -07:00
Tom Eastep
243e8f1dbe Fix check for unreferenced 'sfilter' chain 2011-05-28 08:31:36 -07:00
Tom Eastep
fc34f07a7a Remove PKTTYPE option
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-28 07:11:48 -07:00
Tom Eastep
dbc21b87fe Correct wording in release notes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-28 05:52:49 -07:00
Tom Eastep
a37dbf76dc Delete 'sfilter' chain if it isn't referenced
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-27 19:56:54 -07:00
Tom Eastep
1a2c9a08e1 Don't include comment in audit chain rules
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-27 19:56:04 -07:00
Tom Eastep
5082b0701a Get release notes changes for filter->sfilter 2011-05-27 19:43:13 -07:00
Tom Eastep
bac640e731 Get changes from 4.5.0 branch 2011-05-27 19:42:09 -07:00
Tom Eastep
586a3537bf Delete 'sfiter' chain if it doesn't have referenes 2011-05-27 19:38:03 -07:00
Tom Eastep
790c96c90a Version to RC 1
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-27 09:11:47 -07:00
Tom Eastep
c6e9de65f1 Prevent duplicate 'filter' rules when combining two interface chains
into the same zone forwarding chain.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-27 06:43:47 -07:00
Tom Eastep
8a0dc9f0f6 Clean up release notes.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-27 06:42:56 -07:00
Tom Eastep
fbfe7b9f93 Don't create 'reject' and AUDIT' in the 'stopped' case.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-26 14:11:36 -07:00
Tom Eastep
0287d96aa2 Finish filtering implementation
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-26 13:38:44 -07:00
Tom Eastep
6c3163cc27 Routeback corrections
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-25 10:45:57 -07:00
Tom Eastep
e4d667ca6a Add routeback protection
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-24 17:07:31 -07:00
Tom Eastep
bbe165c3cf Bump version to Beta 5
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-24 11:40:11 -07:00
Tom Eastep
2f288a83c8 Document -T
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-24 11:39:52 -07:00
Tom Eastep
0beb327f0a Rename audited actions and Macros
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-24 11:31:42 -07:00
Tom Eastep
84b844ae79 Implement -T option for compile and check
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-24 10:21:49 -07:00
Tom Eastep
ee98772349 Add -c to the start command
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-24 09:13:02 -07:00
Tom Eastep
021048379f Additions to the Beta 4 Documentation
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-24 08:54:43 -07:00
Tom Eastep
e6c1de3829 Correct ADrop action
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-24 07:47:42 -07:00
Tom Eastep
d4b2a462a2 Add audited actions to the .spec files
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-24 07:30:46 -07:00
Tom Eastep
704f3fdd55 Document audited default actions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-24 07:24:15 -07:00
Tom Eastep
c5b38de69c Add Audited Standard IPv6 Default Actions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-24 07:17:25 -07:00
Tom Eastep
c333368243 Create Audited versions of the IPv4 standard default actions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-24 07:09:15 -07:00
Tom Eastep
f464ec5624 Fixes for AUDIT
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-23 20:59:33 -07:00
Tom Eastep
016f7d9f2a Yet more shorewall/shorewall6 unification
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-23 16:41:51 -07:00
Tom Eastep
471d405f7d Delete A_* from 'show actions' output
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-23 16:41:08 -07:00
Tom Eastep
552ab52f92 More shorewall/shorewall6 unification
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-23 16:17:09 -07:00
Tom Eastep
a64d882a36 Apply Ed W's first patch
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-23 14:36:21 -07:00
Tom Eastep
c050b29985 Factor some similar code
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-23 14:20:14 -07:00
Tom Eastep
0a11a0e2ad Add xt_AUDIT to modules.xtables
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-23 12:08:51 -07:00
Tom Eastep
3ab35c65b0 Correct LEGACY_FASTSTART error messages in shorewall and shorwall6
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-23 11:24:52 -07:00
Tom Eastep
15e9e3182d Update copyrights
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-23 10:06:56 -07:00
Tom Eastep
31e74658c8 Update copyrights
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-23 09:51:51 -07:00
Tom Eastep
0704f7ca59 Clarify the problem corrected
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-23 09:25:19 -07:00
Tom Eastep
2d574fff10 Tweak wording
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-23 06:56:54 -07:00
Tom Eastep
7c250cd5b3 Clean up release notes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-23 06:55:54 -07:00
Tom Eastep
54f9a0e671 Correct and expand the Problems Corrected section of the release notes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-23 06:43:31 -07:00
Tom Eastep
3b28fcd566 Remove documentation disclaimer from release notes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-23 06:41:32 -07:00
Tom Eastep
485a7fb29d Implement 'restart -c'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-23 06:39:26 -07:00
Tom Eastep
e95003b82a Add FAKE_AUDIT option 2011-05-22 17:42:50 -07:00
Tom Eastep
5d04c93a16 Implement LEGACY_FASTSTART option
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-22 15:36:29 -07:00
Tom Eastep
981b503fa4 Bump version to Beta 4 2011-05-22 11:05:22 -07:00
Tom Eastep
c56fe3448a Update release documents 2011-05-22 11:03:57 -07:00
Tom Eastep
e511c5a8d5 Corrections to Audit documents 2011-05-22 10:25:43 -07:00
Tom Eastep
529e256856 Assigned unused dev numbers 2011-05-22 10:18:26 -07:00
Tom Eastep
db6091f101 Avoid dependence on 'make' 2011-05-22 09:47:57 -07:00
Tom Eastep
a8fd3281d9 Add CONFIG_PATH section
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-22 08:59:05 -07:00
Tom Eastep
57d276f0b3 Add default action example 2011-05-22 08:02:23 -07:00
Tom Eastep
b844fc3107 Correct typo in Audit doc
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-22 06:10:58 -07:00
Tom Eastep
ad050763cc Documentation update 2 for AUDIT support
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-21 17:22:19 -07:00
Tom Eastep
99cb09bd84 Documentation update 1 for AUDIT supportttt
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-21 16:25:38 -07:00
Tom Eastep
83cdf78b18 Replace A_* builtin actions with builtin targets
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-21 15:02:04 -07:00
Tom Eastep
d9b095bdea Document new features 2011-05-21 12:07:23 -07:00
Tom Eastep
71ef1f48e2 Allow auditing of the builtin actions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-21 10:38:25 -07:00
Tom Eastep
82d6a00c9e Implement some extentions to AUDIT
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-21 09:25:58 -07:00
Tom Eastep
61b5dbbb95 Eliminate cruft left over from when Action.pm and Policy.pm were folded into Rules.pm - Phase II
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-20 10:48:28 -07:00
Tom Eastep
f64e171c19 Eliminate cruft left over from when Action.pm and Policy.pm were folded into Rules.pm
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-20 10:46:18 -07:00
Tom Eastep
ac2e9cce64 Shrink process_actions2 further.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-20 10:28:30 -07:00
Tom Eastep
676af32ebc Simplify a loop in process_actions2()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-20 10:11:23 -07:00
Tom Eastep
7cbf113ba0 Simplify an RE
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-20 08:33:36 -07:00
Tom Eastep
d15475efae Cleanup of AUDIT before Beta 3
- Correct merge snafus
- Rename the new actions (e.g., ADROP->A_DROP)
- Correct MACLIST_DISPOSITION logic
2011-05-20 07:47:35 -07:00
Tom Eastep
e9df13a42b Resolve merge conflicts 2011-05-19 15:10:22 -07:00
Tom Eastep
2e93b95afe Clean up release notes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-19 14:57:16 -07:00
Tom Eastep
5e68dbfa9a Complete first attempt at AUDIT support
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-19 12:06:43 -07:00
Tom Eastep
814494e277 More AUDIT changes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-19 08:35:40 -07:00
Tom Eastep
d2ab27c071 More AUDIT changes 2011-05-18 21:25:57 -07:00
Tom Eastep
ce8df2f66c Revert "Bump version to Beta 3"
This reverts commit 465e729288.
2011-05-18 17:50:12 -07:00
Tom Eastep
465e729288 Bump version to Beta 3 2011-05-18 17:08:07 -07:00
Tom Eastep
265c0e10e5 Correct a couple of cosmetic defects in the rules manpage
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-18 12:39:00 -07:00
Tom Eastep
314921f766 Revert "Set quantum in subordinate SFQ class to the MTU for HFSC parents."
This reverts commit 5ab6f8e0e5.
2011-05-18 11:13:50 -07:00
Tom Eastep
166d27f6d4 Minor tweak to blacklisting
Reverse order of tests for 'from' and 'src'.
Use equivalent logic for generating unknown option error

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-18 11:13:03 -07:00
Tom Eastep
5ab6f8e0e5 Set quantum in subordinate SFQ class to the MTU for HFSC parents.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-18 10:34:46 -07:00
Tom Eastep
0e59932b8d Correct known problems 2011-05-18 10:14:20 -07:00
Tom Eastep
568e54b50d Update version to Beta 2 2011-05-18 09:58:35 -07:00
Tom Eastep
e940f5018e Implement whitelisting.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-18 08:30:01 -07:00
Tom Eastep
8ec33cd6dd Update accounting documentation 2011-05-17 18:35:28 -07:00
Tom Eastep
cec07a6be5 Don't apply HTB quantum to HFSC 2011-05-17 18:34:41 -07:00
Tom Eastep
8d12e13ff1 Improve wording in the change log 2011-05-17 13:55:00 -07:00
Tom Eastep
495aa9b9ac Implement NFLOG accounting action.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-17 13:42:13 -07:00
Tom Eastep
fd70e73d34 Add ACCOUNTING_TABLE option
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-17 12:51:33 -07:00
Tom Eastep
680ca519ed Correct deletion of ipv6 'shorewall' chain 2011-05-17 11:33:56 -07:00
Tom Eastep
11ff245697 Don't generate refresh rules unless the command is 'refresh'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-16 13:08:32 -07:00
Tom Eastep
ffe7a1b777 Avoid inconsistencies and errors in refresh
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-16 11:34:41 -07:00
Tom Eastep
30f2fbff60 Issue warning on missing IPSET 2011-05-15 11:48:34 -07:00
Tom Eastep
8904e772df Mention exclusion in the blacklist manpages
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-15 10:57:11 -07:00
Tom Eastep
72a330cba2 Don't emit degenerate tcfilters 2011-05-15 10:57:02 -07:00
Tom Eastep
e459fbf997 Don't allow non-leaf default class
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-15 10:56:46 -07:00
Tom Eastep
3f90f00081 Issue warnings and ignore non-leaf class in tcfilters and tcrules
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-15 10:56:31 -07:00
Tom Eastep
7d25f6356b Augment a comment 2011-05-15 08:45:41 -07:00
Tom Eastep
c247140063 Restore 'our' to a couple of exported variables in the Config module 2011-05-14 14:18:22 -07:00
Tom Eastep
00add745b7 Use -o when copying routing tables 2011-05-14 13:56:39 -07:00
Tom Eastep
05e385a748 Only use 'our' when required 2011-05-14 13:21:31 -07:00
Tom Eastep
0626594cda Restore accuracy of tcclasses diagram 2011-05-14 09:27:51 -07:00
Tom Eastep
7327c24f14 Document that non-leaf tcrules and tcfilters are ignored
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-14 07:22:20 -07:00
Tom Eastep
43a21e122a Update Install doc with absolute path name info
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-14 07:20:38 -07:00
Tom Eastep
5f4d40019e Update release notes with relative/absolute path behavior.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-14 06:18:39 -07:00
Tom Eastep
f75961dc63 Ensure absolute path name in LIBEXEC and PERLLIB
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-14 05:31:19 -07:00
Tom Eastep
6d7ebb14b8 Update trunk's release notes and change log with 4.4.19.* corrections
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-13 13:14:29 -07:00
Tom Eastep
9ba9d40b77 More LIBEXEC/PERLLIB fixes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-12 07:42:09 -07:00
Tom Eastep
7994c82c1b Fix PERLLIB on Shorewall6
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-12 06:27:12 -07:00
Tom Eastep
0614f61347 Fix PERLLIB 2011-05-11 12:58:57 -07:00
Tom Eastep
63d5171ae9 Correct typo 2011-05-11 12:44:48 -07:00
Tom Eastep
539e42aa2e Correct earlier patch 2011-05-09 16:34:31 -07:00
Tom Eastep
bbab1c9682 Ensure USER/GROUP is only specified when SOURCE in $FW 2011-05-09 16:33:34 -07:00
Tom Eastep
359de906ca Refinement to fix for double exclusion
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-09 16:28:53 -07:00
Tom Eastep
1a48dd3eb9 Correct last merged patch
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-08 05:51:58 -07:00
Tom Eastep
02baf94246 Fix typo in starting/stopping doc 2011-05-08 05:44:24 -07:00
Tom Eastep
93d8b538eb Ensure route to gateway in the main table 2011-05-08 05:43:53 -07:00
Tom Eastep
a1bd664447 Fix issues with 'gawk' 2011-05-08 05:39:07 -07:00
Tom Eastep
afed909e52 Simplify the fix for double exclusion in ipset lists 2011-05-07 06:38:08 -07:00
Tom Eastep
0c59e0231d Correct double-exclusion fix 2011-05-07 06:37:37 -07:00
Tom Eastep
58c25e8517 Let tcfilters deal correctly with hex device numbers 2011-05-05 10:12:20 -07:00
Tom Eastep
59ea511201 Complain if there is no default class defined 2011-05-05 10:12:14 -07:00
Tom Eastep
48eeab0b2a Mark many tcrules columns as optional 2011-05-05 10:12:06 -07:00
Tom Eastep
91d8f39f2e Enforce limits on device and class numbers 2011-05-05 10:11:47 -07:00
Tom Eastep
349960294c Detect double exclusion in ipset expressions 2011-05-05 10:11:30 -07:00
Tom Eastep
368fe46932 Correct Comment 2011-05-05 10:11:22 -07:00
Tom Eastep
d8c2845085 Back out part of TC change 2011-05-05 10:11:13 -07:00
Tom Eastep
5ce6d7d988 Back out 0x documentation part of change
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-05 10:09:56 -07:00
Tom Eastep
9a95bad17e Don't require '0x' on devnum > 10 in tcclasses 2011-05-05 10:06:55 -07:00
Tom Eastep
4300ef3ee2 Fix another couple of bugs with device numbers > 9 2011-05-05 10:06:41 -07:00
Tom Eastep
70151d453a Update release notes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-02 10:16:23 -07:00
Tom Eastep
222c5dbf46 Normalize hex numbers before using them in string comparisons 2011-05-02 10:08:36 -07:00
Tom Eastep
e66d491f11 Correct patch for > 9 interfaces with tcfilters 2011-05-02 10:08:19 -07:00
Tom Eastep
bf10e104b7 Fix bug in tcfilters with device numbers > 9 2011-05-02 07:25:21 -07:00
Tom Eastep
d2407cb7a0 Don't allow IFB classes in tcrules 2011-05-02 07:23:28 -07:00
Tom Eastep
a0b00b4bd6 More fixes for TC 2011-05-01 21:24:52 -07:00
Tom Eastep
3bdde27bd1 Document TC Fixes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-05-01 06:42:37 -07:00
Tom Eastep
45b83658cd Another tcclasses manpage update 2011-05-01 06:40:28 -07:00
Tom Eastep
61c654634b Correct some TC issues 2011-05-01 06:40:14 -07:00
Tom Eastep
f7b6ac690e Merge branch 'master' of ssh://shorewall.git.sourceforge.net/gitroot/shorewall/shorewall 2011-04-30 22:07:25 -07:00
Tom Eastep
5ff1aca52a Augment documentation of the :I and :CI modifiers 2011-04-30 21:52:32 -07:00
Tom Eastep
4a4d74b52b Document fix for IPSETs and ORIGINAL DEST
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-29 07:25:42 -07:00
Tom Eastep
27f1c494a0 Document restoration of IPSET use in ORIGINAL DEST
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-28 12:25:07 -07:00
Tom Eastep
e2b1069c1c Support ipsets in the ORIGINAL DEST column for DNAT and REDIRECT rules.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-28 12:22:26 -07:00
Tom Eastep
59024ff49d Delete some blank lines
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-24 08:29:28 -07:00
Tom Eastep
3ec2bf621b Correct example 5 in the masq manpage 2011-04-20 16:20:42 -07:00
Tom Eastep
67e920eb53 Use del/add for provider ipv6 routes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-19 10:56:59 -07:00
Tom Eastep
1bcba8bbc7 Update version of changed Perl modules
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-19 10:02:29 -07:00
Tom Eastep
ec8bb8049a Delete/Add routes for NDP rather than replace
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-19 09:40:24 -07:00
Tom Eastep
cdf2014ce2 Apply Togan's patch with fixes
/sbin/shorewall and /sbin/shorewall6 modified
	uninstallers modified
	Additional installer changes

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-17 11:20:26 -07:00
Tom Eastep
aca5b33858 Backout my start for a fix for Togan's patch 2011-04-17 09:06:13 -07:00
Tom Eastep
97b7856380 Reverse Togan's patch -- it is woefully incomplete
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-17 07:55:30 -07:00
Tom Eastep
46191c9f87 Re-bump versions 2011-04-16 09:15:29 -07:00
Tom Eastep
1430856164 Re-apply Togun's Patch 2011-04-16 08:51:19 -07:00
Tom Eastep
1a0388080f Initiate 4.4.20
Update versions
    Update release documents
    Apply Togan Muftuoglu's change to increase installation flexibility
2011-04-16 08:31:46 -07:00
Tom Eastep
4f5970b5f2 Use 'ip route list' rather than 'ip route ls' for busybox compatability
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-15 11:15:32 -07:00
Tom Eastep
5126c439a4 Fix a progress message in the installer.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-15 11:06:45 -07:00
Tom Eastep
d42a65fd11 Correct one more default route save/restore defect
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-15 07:09:34 -07:00
Tom Eastep
0b18c37a91 Fix install.sh bug 2011-04-14 17:00:35 -07:00
Tom Eastep
f2acf4bfe5 Fix install.sh bug 2011-04-14 16:55:56 -07:00
Tom Eastep
4c1fbb67e4 Update release documents 2011-04-14 15:20:15 -07:00
Tom Eastep
8fa41771bd Merge branch 'master' into 4.4.19
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-14 12:28:10 -07:00
Tom Eastep
dff405683c Correct default route save/restore
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-14 12:25:33 -07:00
Tom Eastep
4a060a3186 Correct default route save/restore
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-14 12:17:46 -07:00
Tom Eastep
96af7bfed6 Fix the prior commit 2011-04-13 17:56:15 -07:00
Tom Eastep
9a8f411531 Update version to 4.4.19.1 and document corrected problems 2011-04-13 17:22:07 -07:00
Tom Eastep
9008cd960c Fix a silly masq bug 2011-04-13 17:01:22 -07:00
Tom Eastep
16276b9900 Don't assume that all nexthop routes are default routes 2011-04-13 13:57:22 -07:00
Tom Eastep
a0b16e2803 Delete duplicate rule
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-13 06:56:17 -07:00
Tom Eastep
5919c234f4 Update version of IPAddrs.pm 2011-04-12 07:21:24 -07:00
Tom Eastep
53571043c0 Fix another proto editing defect 2011-04-11 17:18:39 -07:00
Tom Eastep
18f4b11b09 Don't allow '\!0' in the PROTO column 2011-04-11 16:25:19 -07:00
Tom Eastep
73754521b1 Correct Perl module versions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-11 15:05:18 -07:00
Tom Eastep
68fe7c733e Correct ipset allowed characters 2011-04-11 10:02:18 -07:00
Tom Eastep
c902045348 Document method of turning off TSO/GSO 2011-04-11 09:49:48 -07:00
Tom Eastep
5734c84499 Documentation updates 2011-04-11 09:37:50 -07:00
Tom Eastep
0b17136780 Consolidate corrected problem list 2011-04-11 07:22:30 -07:00
Tom Eastep
f2d5e79684 Add link to 2011 Linuxfest Doc
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-10 15:25:52 -07:00
Tom Eastep
57165c6551 Document fix for split_line().
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-10 15:25:35 -07:00
Tom Eastep
ca46052410 Fix file name in split_line error message for proxyndp file 2011-04-10 13:19:42 -07:00
Tom Eastep
2a445aca2a Remove DNAT examples from shorewall6-rules(5) 2011-04-10 11:38:10 -07:00
Tom Eastep
512008170d Revert "Fold some long lines"
This reverts commit 3674cfd387.
2011-04-10 11:20:50 -07:00
Tom Eastep
6e7a7b7f39 Clarify what Shorewall UPnP does and does not do 2011-04-10 10:29:10 -07:00
Tom Eastep
3674cfd387 Fold some long lines 2011-04-10 10:10:00 -07:00
Tom Eastep
8abc78331b Two minor cosmetic changes 2011-04-10 09:52:00 -07:00
Tom Eastep
2a34a30b42 Update release documents 2011-04-09 10:32:18 -07:00
Tom Eastep
1be89edb49 Version to 4.4.19 2011-04-09 07:58:13 -07:00
Tom Eastep
2ee452794e Add a corrected problem (shell metacharacters in variable values) 2011-04-08 07:57:12 -07:00
Tom Eastep
92611d6789 A couple of tweaks before releasing RC1 2011-04-08 07:50:54 -07:00
Tom Eastep
cafb810b63 Update release documents 2011-04-06 17:07:05 -07:00
Tom Eastep
7ab55f4217 Ensure that the PREROUTING->dnat jump is added when a wildcard interface is present 2011-04-06 15:14:39 -07:00
Tom Eastep
755c3cfd80 Quote param values that include shell metacharacters 2011-04-06 14:52:32 -07:00
Tom Eastep
e653a34865 Fix man page typo (CLEAR_FORWARD_MARK -> FORWARD_CLEAR_MARK) 2011-04-06 10:46:47 -07:00
Tom Eastep
6626ef06fb Fix yet another optimizer bug 2011-04-06 10:10:42 -07:00
Tom Eastep
81437b2bb1 Don't mention downloads in the complex TC doc 2011-04-04 19:01:06 -07:00
Tom Eastep
159c871f18 Make simple TC work with both IPv4 and IPv6 2011-04-04 09:55:45 -07:00
Tom Eastep
a927ccf410 Correct typo in release notes 2011-04-04 09:29:45 -07:00
Tom Eastep
7466895919 Revert tcpri change 2011-04-04 09:14:46 -07:00
Tom Eastep
f62287ccbf Correct output noise in the output of 'shorewall6 show connections' - take 2 2011-04-04 09:14:22 -07:00
Tom Eastep
66dd89234f Correct output noise in the output of 'shorewall6 show connections' 2011-04-04 09:13:17 -07:00
Tom Eastep
db7ddcc492 Correct typo in shorewall6 installer 2011-04-04 08:50:25 -07:00
Tom Eastep
cdbe58a444 Move and correct EXPORTMODULES in shorewall.conf manpage 2011-04-04 08:34:06 -07:00
Tom Eastep
3730283b64 Move and correct EXPORTMODULES in shorewall6.conf manpage 2011-04-04 08:32:18 -07:00
Tom Eastep
3b0da84b8d Exit POSTROUTING early if a mark is restored 2011-04-04 08:19:58 -07:00
Tom Eastep
10cc400cfd Display mangle table in the output of 'shorewall show tc' 2011-04-04 08:19:36 -07:00
Tom Eastep
6b93ff3a91 Clarify Debian file location 2011-04-03 19:32:39 -07:00
Tom Eastep
c1160ec076 Version to RC1 2011-04-03 15:54:36 -07:00
Tom Eastep
1b9b6b6467 Correct release notes 2011-04-03 13:21:07 -07:00
Tom Eastep
8609c97d1c Version to Beta 5 2011-04-03 10:30:33 -07:00
Tom Eastep
86f4d3bad6 Revert "Set version RC1"
This reverts commit ae9558c7c6.
2011-04-03 10:28:20 -07:00
Tom Eastep
a47357a6e8 Re-add LXC doc
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-04-03 10:27:52 -07:00
Tom Eastep
ae9558c7c6 Set version RC1 2011-04-03 10:04:53 -07:00
Tom Eastep
9f5783ca26 Set version to RC1 2011-04-03 10:01:01 -07:00
Tom Eastep
cc633c5bd9 Shorewall 4.4.19 Changes 2011-04-03 09:56:30 -07:00
Tom Eastep
2029978050 Document fix for icmps in tcfilters.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-03-19 14:32:12 -07:00
Tom Eastep
26e7f86c87 Fix icmp u32 match with type/code 2011-03-19 14:29:03 -07:00
Tom Eastep
6fe64e3dfa Update to 4.4.18.1 2011-03-19 14:22:52 -07:00
Tom Eastep
0ca0e5f082 Fix the Lite installers and .specs 2011-03-19 14:14:03 -07:00
Tom Eastep
895dbfc6dc Document changed to TC_PRIOMAP editing.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-03-17 11:57:01 -07:00
Tom Eastep
742aa95660 Tighten editing of TC_PRIOMAP value 2011-03-17 11:50:13 -07:00
Tom Eastep
965ab0257f Correct fix for Tuomo's problem 2011-03-13 15:24:48 -07:00
Tom Eastep
f5d06024fc Bump version to 4.4.18.1 2011-03-13 07:56:12 -07:00
Tom Eastep
8383a6e75a Eliminate extra newline in WARNING message 2011-03-13 07:52:25 -07:00
Tom Eastep
68b15c9544 Fix for Tuomo's params issue 2011-03-13 07:47:06 -07:00
Tom Eastep
bd8dc9d381 Document fix for interfaces/tcfilters
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-03-03 07:44:37 -08:00
Tom Eastep
57f1a0fa34 Accomodate tcfilters entries for non-present interfaces
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-03-03 07:44:12 -08:00
Tom Eastep
0283a8eeec Fix for previous commit
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-03-03 07:43:37 -08:00
Tom Eastep
87240b00c9 Update version of the Tc module 2011-03-02 07:52:38 -08:00
Tom Eastep
1bbd963c3f Bump version to 4.4.18 2011-03-02 07:43:03 -08:00
Tom Eastep
f88d5f13e0 Restore <burst> functionality in tcdevices 2011-03-02 07:42:24 -08:00
Tom Eastep
329655cc66 Make burst in tcdevices IN-BANDWIDTH column work 2011-03-02 07:34:55 -08:00
Tom Eastep
d7fb4e8ed9 More corrections to Tuomo's Example 2011-03-02 07:13:14 -08:00
Tom Eastep
e4e574605e Fix an edit about duplicate device:class 2011-03-01 20:48:40 -08:00
Tom Eastep
17a7ab40a9 Remove <burst> reference form tcdevices IN-BANDWIDH description 2011-03-01 14:18:43 -08:00
Tom Eastep
e2c8d7b3e1 Correct Tuomo's workaround description 2011-03-01 14:04:06 -08:00
Tom Eastep
a85e4c264a Document fix for IPv6 address handling 2011-03-01 13:54:26 -08:00
Tom Eastep
f92349edba Correct handling of IPv6 address used in a net context 2011-03-01 13:49:19 -08:00
Tom Eastep
9f0f3ce216 Clean up release notes 2011-02-28 19:14:25 -08:00
Tom Eastep
428e898bfe Update version to RC1 2011-02-28 15:24:04 -08:00
Tom Eastep
b7b1d5a7ab Link Proxy NDP section to the Vserver example of same 2011-02-28 13:40:20 -08:00
Tom Eastep
323fef9b51 Add additional info to the Vserver NDP section 2011-02-28 13:38:03 -08:00
Tom Eastep
cb94ca821e Correct typo 2011-02-28 13:08:28 -08:00
Tom Eastep
e9a3dc85fc Add proxy NDP example to the Vserver article 2011-02-28 13:05:04 -08:00
Tom Eastep
9decf354d5 Update the version of the Config module 2011-02-24 16:50:48 -08:00
Tom Eastep
de7a0df550 Cosmetic changes to the Chains module 2011-02-24 15:56:50 -08:00
Tom Eastep
dcdfb60483 Document the <burst> option in the manpages 2011-02-24 15:49:35 -08:00
Tom Eastep
951f641a6c Cleanup of Rules file 2011-02-21 08:13:46 -08:00
Tom Eastep
fcebdc3ec2 Correct typo in Chains module 2011-02-21 08:09:33 -08:00
Tom Eastep
cf60752988 Move section processing to the Rules module where it belongs
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-02-20 15:35:58 -08:00
Tom Eastep
c03caf7c2f Combine the Policy and Rules modules 2011-02-20 11:28:47 -08:00
Tom Eastep
052bc87bd5 Set version to Beta 4 2011-02-20 09:20:43 -08:00
Tom Eastep
b90ea8a9e0 Change default for MODULE_PREFIX 2011-02-20 08:52:07 -08:00
Tom Eastep
685de1c588 Cosmetic changes to the Accounting module"
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-02-19 15:50:18 -08:00
Tom Eastep
f44b643038 Fix another bug with tri-value 2011-02-19 15:46:06 -08:00
Tom Eastep
e69de13eff Fix common-rule/action2 processing order 2011-02-19 15:44:39 -08:00
Tom Eastep
ac45a9b392 Fix typo in the Lenny->Squeeze doc 2011-02-19 09:28:09 -08:00
Tom Eastep
59ac90d717 Couple of minor issues in the Chains module 2011-02-19 09:08:43 -08:00
Tom Eastep
30768a03d1 Bump version to Beta 3 2011-02-19 08:55:28 -08:00
Tom Eastep
51dec8cf86 Document USER/GROUP accounting restriction 2011-02-19 08:33:15 -08:00
Tom Eastep
974a542585 Improve MARK column validation 2011-02-19 08:18:21 -08:00
Tom Eastep
9173b22b58 Disallow USER/GROUP anywhere but in the OUTPUT section 2011-02-19 08:00:00 -08:00
Tom Eastep
cf2d4e154f Add a comment 2011-02-18 21:05:44 -08:00
Tom Eastep
d8c36da069 Make reserved name illegal for Actions -- take 2 2011-02-18 17:46:41 -08:00
Tom Eastep
011c90e6b8 Make reserved name illegal for Actions 2011-02-18 17:44:14 -08:00
Tom Eastep
b4946dcf65 Enforce a couple of accounting restrictions 2011-02-18 16:47:12 -08:00
Tom Eastep
e47cb61c33 Introduce 'accountfwd' chain for forwarded accounting in sectioned configuration 2011-02-18 15:44:55 -08:00
Tom Eastep
da1ae7d301 Add bleve's tip to the MultiISP doc 2011-02-18 09:02:56 -08:00
Tom Eastep
2e2472a15a Tighen up an RE 2011-02-17 17:56:29 -08:00
Tom Eastep
58e480b502 Correct defects in the prior commit 2011-02-17 17:35:56 -08:00
Tom Eastep
993bdc740d Make it invalid to to use a config file name as a chain name 2011-02-17 16:31:22 -08:00
Tom Eastep
b06630091d Make procedure to delete a chain plus references to it; make exclusion chains begin with '~' 2011-02-17 14:53:39 -08:00
Tom Eastep
6f00f2127c Delete optimize_okay() and add a couple of assertions 2011-02-17 10:48:46 -08:00
Tom Eastep
5634b08e22 Don't clear dont_optimize flag in accounting in sectioned configuration 2011-02-17 10:47:57 -08:00
Tom Eastep
300d931922 Assert correctness in decrement_reference_count() 2011-02-16 13:16:42 -08:00
Tom Eastep
fa8c8f5850 Dont optimize chains with RETURN 2011-02-16 13:15:29 -08:00
Tom Eastep
030839e4a4 Remove recursive_delete_references 2011-02-16 12:49:04 -08:00
Tom Eastep
2974167f06 Finally fix issue with copy_rules() 2011-02-16 10:08:11 -08:00
Tom Eastep
b03e3b94ef More optimization fixes 2011-02-15 19:24:14 -08:00
Tom Eastep
99f38bfca1 Make the source-net and dest-match routines more readable 2011-02-14 20:11:38 -08:00
Tom Eastep
32f341c279 Correct optimization fix 2011-02-14 16:54:27 -08:00
Tom Eastep
6a9ca303d1 Remove masking declaration 2011-02-14 15:56:02 -08:00
Tom Eastep
4ad9a83996 Centralize handling of MACs in the Chains module 2011-02-14 15:34:11 -08:00
Tom Eastep
0fa027802f Don't allow accounting or manual changes to have the name of a builtin target 2011-02-14 10:50:04 -08:00
Tom Eastep
e67d8e6402 Document optimizer fix
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-02-14 10:30:18 -08:00
Tom Eastep
3b7232a5fa Fix a bug in the optimizer 2011-02-14 10:00:28 -08:00
Tom Eastep
59e361e93e Split the 'restriction' member into two members 2011-02-14 09:22:27 -08:00
Tom Eastep
e64070f9e1 Restore loop detection in sectioned accounting rules 2011-02-13 16:38:01 -08:00
Tom Eastep
dd81eedb42 Fix another accounting sectioning bug 2011-02-13 14:32:11 -08:00
Tom Eastep
46a99a7cd9 Correct Config.pm version again 2011-02-13 11:46:56 -08:00
Tom Eastep
567824b7e2 Correct Config.pm version 2011-02-13 11:45:46 -08:00
Tom Eastep
983f6a231e Version to Beta 2 2011-02-13 11:43:37 -08:00
Tom Eastep
95f8100696 Cosmetic change 2011-02-13 11:34:53 -08:00
Tom Eastep
b1abb3f554 Don't do unref/loop detection when accounting file is sectioned 2011-02-13 11:13:43 -08:00
Tom Eastep
e9b2013f91 Document fix for IPv6 providers 2011-02-13 10:52:59 -08:00
Tom Eastep
a1eefea224 Fix FORWARD chain jumps with sectioning 2011-02-13 08:23:48 -08:00
Tom Eastep
1438332bbe Remove hard-coded 0.0.0.0/0 from Providers.pm 2011-02-13 08:13:22 -08:00
Tom Eastep
e5fb8b0a35 Add Simple TC warning to the Lenny->Squeeze article 2011-02-12 20:02:54 -08:00
Tom Eastep
5c0b592934 Section the accounting file 2011-02-12 12:47:15 -08:00
Tom Eastep
195903444d Insist that SECTION headers have exactly two columns 2011-02-12 07:54:20 -08:00
Tom Eastep
677bd08d5d Add more targets 2011-02-11 17:13:48 -08:00
Tom Eastep
4acdc5314a Add 'NG' value for ACCOUNTING 2011-02-11 17:01:10 -08:00
Tom Eastep
9e921beb49 Fix a tri-value bug 2011-02-11 16:53:49 -08:00
Tom Eastep
af363888ab Alphabetize the builtin target list 2011-02-10 16:55:04 -08:00
Tom Eastep
64614b7464 Add CLASSIFY to the builtin targets 2011-02-10 16:46:44 -08:00
Tom Eastep
27add33ff3 Add 'show ipa' to Accounting doc 2011-02-10 13:54:51 -08:00
Tom Eastep
2885081d86 Add more keywords to %builtin_targets 2011-02-10 13:11:58 -08:00
Tom Eastep
3ea333c915 Fix broken link in the shorewall[6] manpages 2011-02-09 20:53:22 -08:00
Tom Eastep
a3232516bb Detect loops in accounting chain jumps 2011-02-09 15:43:19 -08:00
Tom Eastep
88244dc132 Don't allow MAC addresses in the accounting file 2011-02-07 17:12:43 -08:00
Tom Eastep
f5a39a4aa8 Updates for new release model 2011-02-07 16:32:51 -08:00
Tom Eastep
b4b59119ef Don't allow non-accounting chain in the CHAIN accounting column 2011-02-07 16:32:38 -08:00
Tom Eastep
5ae9bd0d84 Correct syntax error in Shorewall6-lite install.sh: 2011-02-06 10:15:29 -08:00
Tom Eastep
ab8951f9d8 Correct syntax error in Shorewall6 install.sh: 2011-02-06 09:39:30 -08:00
Tom Eastep
6e66736d28 Make IPv6 logic safer; cosmetic improvements in the generated script 2011-02-06 08:57:48 -08:00
Tom Eastep
2c2fdab0fe Rename USE_LOCAL_MODULES to EXPORTMODULES
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-02-06 08:42:35 -08:00
Tom Eastep
44f7a4daf3 Update release docs for USE_LOCAL_MODULES -> EXPORTMODULES rename
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-02-06 08:41:29 -08:00
Tom Eastep
fb0a90e463 Update manpages for USE_LOCAL_MODULES
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-02-06 08:28:19 -08:00
Tom Eastep
2b8579c090 Tweak USE_LOCAL_MODULES change
Make the "Other than /usr/share" test dependent on export

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-02-06 08:28:10 -08:00
Tom Eastep
946602bc1c Modules file breakup for IPv6
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-02-06 08:15:50 -08:00
Tom Eastep
106f23634c Make use of USE_LOCAL_MODULES independent of export
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-02-06 08:15:16 -08:00
Tom Eastep
28eca3fb21 Include the modules.* files in the Shorewall-lite RPM 2011-02-05 18:48:18 -08:00
Tom Eastep
42bdc0a19a Install the modules.* files with Shorewall-lite 2011-02-05 18:19:04 -08:00
Tom Eastep
ca23069f56 Tweak release notes 2011-02-05 18:10:34 -08:00
Tom Eastep
e74ae3b9e1 Document the first stage of modules breakup
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-02-05 17:58:17 -08:00
Tom Eastep
d99df29995 Fix some modules bugs 2011-02-05 17:43:00 -08:00
Tom Eastep
7a462d3ed5 Correct install file 2011-02-05 17:34:28 -08:00
Tom Eastep
6a078b9cda Install modules.* files 2011-02-05 17:25:44 -08:00
Tom Eastep
88bce4100a Initiate 4.4.18 2011-02-05 16:41:34 -08:00
Tom Eastep
92d5ed3824 Add note about file security to the release notes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-02-05 16:23:24 -08:00
Tom Eastep
cb0fbe8e51 Break up modules file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-02-05 16:13:06 -08:00
Tom Eastep
06803b6e5f Properly secure helper and modules files
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-02-05 16:12:43 -08:00
Tom Eastep
68ccac08cd Add sch_tbf to modules and add several modles to the Shorewall6 modules file 2011-02-04 10:46:40 -08:00
Tom Eastep
c557ec3740 Bump version of Tc module 2011-02-04 07:46:35 -08:00
Tom Eastep
98e3827246 Remove rant in getting started doc 2011-02-04 06:45:53 -08:00
Tom Eastep
ea2c72d1b1 Prepare for 4.4.17 2011-02-04 06:44:02 -08:00
Tom Eastep
b61ad28897 Add threat to GettingStarted doc 2011-02-03 20:38:41 -08:00
Tom Eastep
838c7ac57b Change a comment 2011-02-03 17:22:04 -08:00
Tom Eastep
748e7f3a19 Correct typos 2011-02-03 13:28:50 -08:00
Tom Eastep
ac13be4ed4 Add rate-limiting example to rules manpages 2011-02-03 13:26:41 -08:00
Tom Eastep
475b811171 Document accounting fixes 2011-02-03 09:57:59 -08:00
Tom Eastep
23eef3b215 Normalize IPv6 addresses in decompose_net 2011-02-03 09:57:47 -08:00
Tom Eastep
4ed4443abb Do a fancier job of comparing networks 2011-02-03 09:44:46 -08:00
Tom Eastep
27684908c4 Catch mis-matched nets in per-IP accounting rules 2011-02-03 09:25:13 -08:00
Tom Eastep
d68d40ee1c Correct an optimization bug involving empty/unreferenced chains 2011-02-03 09:12:50 -08:00
Tom Eastep
98ad7e15b0 Don't optimize the accounting chain 2011-02-03 08:45:54 -08:00
Tom Eastep
c44283d088 Add IPv6 tcfilters file 2011-02-03 08:40:39 -08:00
Tom Eastep
9d9c6c4a99 Document complex TC fixes 2011-02-03 08:37:19 -08:00
Tom Eastep
953c0b48de Fix several issues with IPv6 tcfilters 2011-02-03 08:28:00 -08:00
Tom Eastep
27a2b32e9e Update release notes 2011-02-02 10:46:47 -08:00
Tom Eastep
ff48a78eac Rename 'ipaccount' to 'ipa' 2011-02-01 17:15:49 -08:00
Tom Eastep
2ef674dc40 Add 'show iptaccount' command 2011-02-01 16:47:20 -08:00
Tom Eastep
8b2ed47f58 Don't use blockquote in shorewall-accounting (5) 2011-02-01 14:15:42 -08:00
Tom Eastep
d83b531af0 Use blockquote rather than simplelist in shorewall-accounting (5) 2011-02-01 14:02:50 -08:00
Tom Eastep
207db033b8 Disallow '.' in accounting and manual chain names 2011-02-01 12:58:05 -08:00
Tom Eastep
3dd674a738 Convert a simplelist to a variablelist in the Accounting manpage 2011-02-01 12:20:57 -08:00
Tom Eastep
4e7f656a5b Better ACCOUNT(...) parsing 2011-01-31 20:17:56 -08:00
Tom Eastep
f8e6c80ca0 Tighen up editing of ACCOUNT(...) 2011-01-31 10:14:10 -08:00
Tom Eastep
ae4d675d0d Document chain name length restriction 2011-01-31 07:07:10 -08:00
Tom Eastep
fbdd4b5ede Ensure that accounting and manual chains aren't too long 2011-01-31 06:56:38 -08:00
Tom Eastep
87d628e23d Add OpenSuSE 11.3 to distros tested with per-IP accounting 2011-01-31 06:56:12 -08:00
Tom Eastep
a9f5721851 Add OpenSuSE 11.3 to distros tested with per-IP accounting 2011-01-31 06:55:59 -08:00
Tom Eastep
ca73bd4846 Correct release notes statement about Lenny
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-01-30 16:20:59 -08:00
Tom Eastep
a026ffabe1 Add iptaccount -l example with output 2011-01-30 14:04:26 -08:00
Tom Eastep
749b71e704 Fix typo in the Accounting manpage 2011-01-30 13:51:55 -08:00
Tom Eastep
5f76de3bda Fix Config version 2011-01-30 12:35:31 -08:00
Tom Eastep
6fc8152464 Update version to RC 1 2011-01-30 11:30:45 -08:00
Tom Eastep
29966ea353 Reword a comment in the release notes 2011-01-30 11:27:56 -08:00
Tom Eastep
beab8fc481 Mention the iptaccount --help command 2011-01-30 10:47:25 -08:00
Tom Eastep
2cf3d15d45 Mention the iptaccount --help command 2011-01-30 10:46:35 -08:00
Tom Eastep
303afe8c7e Some accounting fixes (code and docs) 2011-01-30 09:39:14 -08:00
Tom Eastep
2af846ef9e A couple of fixes for the accounting manpages 2011-01-30 08:55:43 -08:00
Tom Eastep
b1f6895a1f Correct a couple of versions 2011-01-30 08:41:33 -08:00
Tom Eastep
26cea4336e Document per-IP accounting 2011-01-30 08:33:06 -08:00
Tom Eastep
70fc8bdfb6 Add support for per-IP accounting
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-01-30 07:20:05 -08:00
Tom Eastep
4cc8e5422d Add ACCOUNT target detection 2011-01-30 07:14:08 -08:00
Tom Eastep
4a040135e5 Document module loading defect corrections 2011-01-29 12:50:44 -08:00
Tom Eastep
1c48a9dbd3 Fix a couple of defects in module loading 2011-01-29 12:42:22 -08:00
Tom Eastep
7555a0953d Add conditional logic for optional run-time address variables
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-01-29 12:15:34 -08:00
Tom Eastep
47cdbd04db Fix typo in release file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-01-29 09:21:14 -08:00
Tom Eastep
ce5e218195 Document fix for IPv6 address scanning 2011-01-29 09:05:07 -08:00
Tom Eastep
1b87405d96 Fix silly bug in expand_rule() 2011-01-29 08:45:20 -08:00
Tom Eastep
a391916236 Correct typos in the release notes 2011-01-29 08:42:58 -08:00
Tom Eastep
ab39b977e0 Version to Beta 3 2011-01-28 16:52:22 -08:00
Tom Eastep
7421a679ba Bump version of the Nat module 2011-01-28 16:46:36 -08:00
Tom Eastep
f3aedcf805 Allow runtime address variables in the ADDRESS column of the masq file 2011-01-28 16:32:53 -08:00
Tom Eastep
156b04c380 Implement Run-time Address Variables
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-01-26 09:08:48 -08:00
Tom Eastep
17a1cd3c57 Add 'dhcp' option to interfaces6 manpage 2011-01-24 08:22:04 -08:00
Tom Eastep
4098535a43 Revise info about mis-using Vserver zones 2011-01-23 12:47:13 -08:00
Tom Eastep
d5b0a39b45 Add some info about mis-using Vserver zones 2011-01-23 09:45:06 -08:00
Tom Eastep
a7dd95d394 Add some info about mis-using Vserver zones 2011-01-23 09:43:35 -08:00
Tom Eastep
82913abeca Specify 'mpu' when creating TBF 2011-01-23 09:23:17 -08:00
Tom Eastep
228eeabb7d More explainations in the Simple TC doc 2011-01-23 08:36:45 -08:00
Tom Eastep
7b73323301 Add more introductory material to the Simple TC document 2011-01-23 07:53:56 -08:00
Tom Eastep
a2b440b093 Add USE_LOCAL_MODULES option 2011-01-22 08:13:17 -08:00
Tom Eastep
985fd990c6 Update Shorewall-4 with info about shorewall-init 2011-01-22 07:30:40 -08:00
Tom Eastep
cf02781461 Document fix to modules file - take 2 2011-01-21 16:20:38 -08:00
Tom Eastep
a5f027a2a0 Document fix to modules file 2011-01-21 16:20:21 -08:00
Tom Eastep
9b7b39ca52 Add sch_prio to modules file 2011-01-21 16:10:59 -08:00
Tom Eastep
d0858f6034 Add module-loading section to Shorewall-lite doc 2011-01-21 15:49:28 -08:00
Tom Eastep
c0d5a32d11 Fix typo in alignment patch 2011-01-21 06:56:30 -08:00
Tom Eastep
3a5d664305 Fix 'check -r' output when OPTIMIZE=8 or OPTIMIZE=9 2011-01-21 06:52:58 -08:00
Tom Eastep
20cd9848f6 Align some assignments in the Config Module 2011-01-21 06:51:35 -08:00
Tom Eastep
24412c9498 Fix empty variable handling when /bin/sh is bash 2011-01-20 08:19:42 -08:00
Tom Eastep
878e5d66ae Document fix for empty shell variables with bash 2011-01-20 08:19:05 -08:00
Tom Eastep
e21e8c0576 Move fix description to proper beta release 2011-01-20 07:18:27 -08:00
Tom Eastep
9d06125129 Bump Version to Beta 2 2011-01-19 15:38:51 -08:00
Tom Eastep
d5f3b31032 Handle lines containing only 'INCLUDE' 2011-01-18 14:58:56 -08:00
Tom Eastep
cdd897e620 More tweaks to the release notes 2011-01-17 09:03:34 -08:00
Tom Eastep
8cd903fad0 Reword sentence in the release notes 2011-01-17 08:07:21 -08:00
Tom Eastep
b7733941fa Update release documents with updaterc.d fix 2011-01-17 07:57:18 -08:00
Tom Eastep
e9b3cd5b57 Run updaterc.d out of uninstall on Debian-based systems 2011-01-16 13:09:02 -08:00
Tom Eastep
1e92e46bf9 EXPORTPARAMS=No in Universal samples 2011-01-16 10:28:34 -08:00
Tom Eastep
cbb27662b9 Correct inconsistent terminology in Release Notes 2011-01-16 10:22:15 -08:00
Tom Eastep
eaa08ab76f Fix typo that broke ULOG 2011-01-16 09:45:49 -08:00
Tom Eastep
e8bedcae93 Update release notes 2011-01-16 09:45:37 -08:00
Tom Eastep
3074d3009f Tom being anal 2011-01-15 20:59:59 -08:00
Tom Eastep
4ea02a5e72 Eliminate silly duplication 2011-01-15 19:20:24 -08:00
Tom Eastep
370cd04408 Remove unneeded line of code in export_params() 2011-01-15 15:56:37 -08:00
Tom Eastep
3a2da73808 Document INCLUDE changes in the basics doc 2011-01-15 15:56:20 -08:00
Tom Eastep
265ca85d02 Allow INCLUDE in extension scripts 2011-01-15 15:43:45 -08:00
Tom Eastep
5c4da0b581 Use open_file()/close_file() in copy1 2011-01-15 14:33:16 -08:00
Tom Eastep
978e8e3849 Only issue 'done.' progress message on success
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-01-14 11:46:38 -08:00
Tom Eastep
12eaf81dcc Add some comments 2011-01-13 19:59:17 -08:00
Tom Eastep
4a69ad35ee Resolve conflicts -- take 2 2011-01-13 19:24:15 -08:00
Tom Eastep
edde07fd85 Resolve conflects 2011-01-13 19:01:44 -08:00
Tom Eastep
fce558d97e Correct 'shorewall-common' references in the quickstart guides 2011-01-13 18:53:03 -08:00
Roberto C. Sanchez
28682a2428 eliminate obsolete references to shorewall-common 2011-01-13 20:02:19 -05:00
Tom Eastep
8da9f4183a Tweaks to 4.4.17 2011-01-10 19:35:45 -08:00
Tom Eastep
2be63c9406 Delete unneeded exports 2011-01-10 19:30:38 -08:00
Tom Eastep
10ae1c7dde Don't export read_a_line1() 2011-01-10 19:14:10 -08:00
Tom Eastep
a04e854f21 Simplify exception processing in process_rules1() 2011-01-10 17:02:12 -08:00
Tom Eastep
fd6afa7742 Minor fixes to comments 2011-01-09 15:56:01 -08:00
Tom Eastep
3392312cef Automate the maintenance of the hash of compiler-defined entries in %params 2011-01-09 13:12:36 -08:00
Tom Eastep
0dc4cd7937 Don't quote param values unnecessarily; add a comment to the emitted params 2011-01-09 12:14:48 -08:00
Tom Eastep
3bb67423c3 Tweak release notes 2011-01-09 11:31:38 -08:00
Tom Eastep
08f09d7de0 Deprecate EXPORTPARAMS 2011-01-09 10:12:36 -08:00
Tom Eastep
14c4bd99aa Don't lookup standard target if target is an action, macro, or chain 2011-01-09 10:10:27 -08:00
Tom Eastep
97672455b2 Correct typo in the FAQ 2011-01-09 09:18:21 -08:00
Tom Eastep
97bba29c07 Add lookup hash for standard targets 2011-01-08 15:29:10 -08:00
Tom Eastep
8dc60e788f Avoid early return in process_action() 2011-01-08 14:05:27 -08:00
Tom Eastep
6143c7ddbd Improve readability of logging logic in expand_rule() 2011-01-08 09:07:32 -08:00
Tom Eastep
bdbc9ab29d Initiate 4.4.17 2011-01-08 08:00:56 -08:00
Tom Eastep
3c4336da58 Enhance DNAT documentation again 2011-01-07 10:27:35 -08:00
Tom Eastep
ad57272c7f Fix tag handling in Limit() 2011-01-05 17:21:50 -08:00
Tom Eastep
a8084370b6 Correct bridge example in the OPENVPN doc 2011-01-05 06:57:42 -08:00
Tom Eastep
974aeb9e39 Reword a comment 2011-01-03 18:48:09 -08:00
Tom Eastep
e3c16b8233 Different way to catch empty parameter lists 2011-01-03 17:56:07 -08:00
Tom Eastep
014d0eb607 Don't recognize an empty param list 2011-01-03 17:06:54 -08:00
Tom Eastep
b7a9a48508 Handle COUNT:<level> correctly 2011-01-03 14:29:10 -08:00
Tom Eastep
8400a2ab31 Handle ':' in a param 2011-01-03 12:18:04 -08:00
Tom Eastep
33b54e4ebe Version to 4.4.16 2011-01-03 09:00:39 -08:00
Tom Eastep
fe86964fd6 Move and reword an error message
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-01-02 08:42:09 -08:00
Tom Eastep
f6228ca31b Two error messages:
- Disallow server port in ACTION rule.
- Add server IP address in message re: REDIRECT

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2011-01-02 08:20:28 -08:00
Tom Eastep
9777f4989f Update release notes 2011-01-02 07:12:25 -08:00
Tom Eastep
b3598f3766 Validate action names 2011-01-02 07:09:42 -08:00
Tom Eastep
faa541ee1f Update release notes 2011-01-01 18:58:08 -08:00
Tom Eastep
cb372cf2cd Change a couple of comments 2011-01-01 16:13:38 -08:00
Tom Eastep
d64edf3470 Clone a small function 2011-01-01 11:19:53 -08:00
Tom Eastep
8f0d0ac5a7 Use external representation in recursive call message 2011-01-01 09:18:10 -08:00
Tom Eastep
d71c11791f Report normalized action names in recursive call message 2011-01-01 09:06:11 -08:00
Tom Eastep
4da682365d Restore ability to detect recursive action invocations 2011-01-01 08:58:00 -08:00
Tom Eastep
ed3b336a81 Correct prototype 2011-01-01 06:55:10 -08:00
Tom Eastep
fc2d76aa7a Move a function; don't export %policy_actions 2010-12-31 16:58:06 -08:00
Tom Eastep
e1b4e345fb Add Eclipse files to project 2010-12-31 15:19:56 -08:00
Tom Eastep
8e6fdceeb5 Back out useless change 2010-12-31 14:30:31 -08:00
Tom Eastep
b36ad0d065 Change several more compiler progress messages 2010-12-31 14:19:31 -08:00
Tom Eastep
f8e04b4110 Change a couple of compiler progress messages 2010-12-31 14:12:57 -08:00
Tom Eastep
e0d2eb997d Restore the name 'process_rule1' 2010-12-31 12:41:01 -08:00
Tom Eastep
1bdaf862d3 Populate %targets out of new_action() 2010-12-31 10:36:07 -08:00
Tom Eastep
6c14c76ab5 Another comment 2010-12-31 08:37:56 -08:00
Tom Eastep
aa6754cb40 Add a comment 2010-12-31 07:51:15 -08:00
Tom Eastep
d4d1bb7b41 Bump version of the Zones module 2010-12-30 13:14:07 -08:00
Tom Eastep
a5cce67fc2 Remove fly speck form .spec file 2010-12-30 12:36:10 -08:00
Tom Eastep
33ff6db6bc Whitespace changes 2010-12-30 12:25:22 -08:00
Tom Eastep
3f9cd713c3 Correct known problems 2010-12-30 12:01:46 -08:00
Tom Eastep
aaf2834917 Update known problems 2010-12-30 11:47:25 -08:00
Tom Eastep
c1cae8a1aa Update release notes 2010-12-30 11:45:40 -08:00
Tom Eastep
cd7f94dbdb Merge branch 'master' into 4.4.16 2010-12-30 10:37:15 -08:00
Tom Eastep
746c2a5163 Correct comment about the action member of the chain structure 2010-12-30 10:36:03 -08:00
Tom Eastep
cb751bd225 Remove extraneous change log entries 2010-12-30 10:02:39 -08:00
Tom Eastep
91227b6d13 Don't log jumps to NAT actions 2010-12-30 09:56:44 -08:00
Tom Eastep
d8541e4a58 Update problems corrected 2010-12-30 08:05:04 -08:00
Tom Eastep
527ea7de3f A couple of more version changes 2010-12-30 07:34:09 -08:00
Tom Eastep
e3d1032ab3 Set version to Beta 8 2010-12-30 07:32:30 -08:00
Tom Eastep
ad32ce6986 Update release file 2010-12-30 07:04:38 -08:00
Tom Eastep
3c4cddeeeb Eliminate process_action3() 2010-12-30 06:56:21 -08:00
Tom Eastep
d767d9fea3 Better Editing of BLACKLIST_DISPOSITION 2010-12-29 18:43:14 -08:00
Tom Eastep
1c55143524 Allow parameterized Limit to use log tags 2010-12-29 12:20:18 -08:00
Tom Eastep
230d284980 Correct a couple of comments 2010-12-29 11:36:59 -08:00
Tom Eastep
b7d936dd8e Merge levels in process_action2() 2010-12-29 08:23:44 -08:00
Tom Eastep
a4bf11c7d5 Some cosmetic cleanup 2010-12-28 17:18:43 -08:00
Tom Eastep
d90d56161c Improve readability 2010-12-28 16:42:28 -08:00
Tom Eastep
7d41e4b38c Restore level merge behavior with nested actions 2010-12-28 16:04:55 -08:00
Tom Eastep
17ed14a895 Update comments in the Rules module
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-28 16:02:10 -08:00
Tom Eastep
2805d16246 Update change log
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-28 16:01:30 -08:00
Tom Eastep
c135a7e594 Update change log 2010-12-28 14:06:02 -08:00
Tom Eastep
17a3ca62d5 Eliminate the Actions module 2010-12-28 13:51:45 -08:00
Tom Eastep
3d4aaad0eb Remove a couple of superfluous tests 2010-12-28 12:53:16 -08:00
Tom Eastep
4a8f724f9b Handle duplicate chain name for action chain 2010-12-28 12:18:42 -08:00
Tom Eastep
6f7a1c7fd0 Update release docs 2010-12-28 07:49:55 -08:00
Tom Eastep
50a3b76e40 Rename a variable; reformat an error message 2010-12-28 07:49:35 -08:00
Tom Eastep
cc30fc4dbb Eliminate max nest level on actions 2010-12-27 17:16:34 -08:00
Tom Eastep
0c3ed598ca Improve diagnostic 2010-12-27 17:02:06 -08:00
Tom Eastep
297df02047 Catch loops in action invocation graph 2010-12-27 16:41:53 -08:00
Tom Eastep
6a7dad5e18 Merge branch 'master' into 4.4.16
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-27 12:32:28 -08:00
Tom Eastep
6a1487d628 Correct existing optimization issue 2010-12-27 12:31:34 -08:00
Tom Eastep
215c05d12b Add some comments -- fix logging with NAT actions 2010-12-27 09:05:44 -08:00
Tom Eastep
d5ac12a8ff Bump version to RC 1 2010-12-27 07:49:52 -08:00
Tom Eastep
311797e0bf Create nat chain during pre-processing of nat action 2010-12-27 07:47:16 -08:00
Tom Eastep
79cbfd0126 Allow '--' to specify '-' as an action parameter 2010-12-26 17:03:05 -08:00
Tom Eastep
4111432a52 Implement optional action parameters 2010-12-26 16:13:53 -08:00
Tom Eastep
d8bcbffb88 Dead code removal 2010-12-26 12:08:10 -08:00
Tom Eastep
d1d9518c42 Move process_action2() 2010-12-26 11:44:15 -08:00
Tom Eastep
088480e5d9 Fix a couple of bugs 2010-12-26 11:34:58 -08:00
Tom Eastep
8f9d5a967b Simplify variable substitution 2010-12-26 11:07:00 -08:00
Tom Eastep
d4d285af39 Revert version to Beta 7 2010-12-26 09:01:15 -08:00
Tom Eastep
31bd00e42e Document parameterized actions 2010-12-26 08:59:31 -08:00
Tom Eastep
4fdec73808 Fix target of <action(params)> 2010-12-26 07:58:20 -08:00
Tom Eastep
758a50fa84 Extantiate params during module processing 2010-12-25 14:48:14 -08:00
Tom Eastep
bdc3ca16a4 Finish revision of action processing 2010-12-25 14:28:57 -08:00
Tom Eastep
8218cb3444 Pass normalized action name to process_rule_common() 2010-12-25 10:15:08 -08:00
Tom Eastep
39f4f03b60 Segregate process_action1() from process_actions1() 2010-12-25 08:21:32 -08:00
Tom Eastep
1285b73d52 Simplify detection of action self-invocation 2010-12-25 08:10:23 -08:00
Tom Eastep
6240d41754 Add new progress message 2010-12-25 07:41:18 -08:00
Tom Eastep
29da130eef Add a note about the SOURCE and DEST columns 2010-12-24 14:03:55 -08:00
Tom Eastep
ce8f33b623 Add a comment
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-23 15:38:47 -08:00
Tom Eastep
5e642a1406 Update a comment 2010-12-23 15:34:07 -08:00
Tom Eastep
b100991cfa Add a couple of comments; move a declaration; simplify a statement 2010-12-23 14:17:22 -08:00
Tom Eastep
8ad7300165 Fix NONAT and NATONLY rules in an action 2010-12-23 07:49:20 -08:00
Tom Eastep
37a383ea4d Used normalized names in requires list 2010-12-22 16:57:59 -08:00
Tom Eastep
a51eac91b0 Add documentation for parameterized actions 2010-12-22 15:09:54 -08:00
Tom Eastep
c6e35be8bc Update version to RC 1 2010-12-22 14:37:10 -08:00
Tom Eastep
350f20fc7e Add a comment 2010-12-22 14:35:19 -08:00
Tom Eastep
e8de4ce563 Add an <action> member to the chain table 2010-12-22 10:59:02 -08:00
Tom Eastep
e52feb7da7 Fix another bug 2010-12-21 17:50:35 -08:00
Tom Eastep
f3abf56cac Restore proper NAT in action handling 2010-12-21 15:20:19 -08:00
Tom Eastep
b8d5e09b58 Put a couple of routines back in the Rules module 2010-12-21 14:57:46 -08:00
Tom Eastep
7052738cd0 Remove param manipulation routines for now 2010-12-21 13:38:10 -08:00
Tom Eastep
ffbcd1b1fe Catch an action that invokes itself 2010-12-21 13:20:44 -08:00
Tom Eastep
ac42fddbce Finish (unpublished) parameterized actions 2010-12-21 12:29:52 -08:00
Tom Eastep
6263689c3e Allow Limit to accept parameters 2010-12-21 11:38:54 -08:00
Tom Eastep
7989f5094e Implement a better solution to down shared gateways 2010-12-21 11:15:41 -08:00
Tom Eastep
9a78a0242f Revise wildcard fix description in the release notes.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-21 10:01:45 -08:00
Tom Eastep
25e93b4df3 Change dummy MAC address.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-21 09:22:58 -08:00
Tom Eastep
242a9f5a98 Remove trailing whitespace 2010-12-20 15:16:20 -08:00
Tom Eastep
ef9caf3588 Update module versions 2010-12-20 15:10:23 -08:00
Tom Eastep
7b8522f756 Supply dummy MAC for unreachable gateway 2010-12-20 15:07:53 -08:00
Tom Eastep
c63bb70585 Bump version to Beta 6 2010-12-20 13:17:35 -08:00
Tom Eastep
708e7672a3 More wildcard optimization 2010-12-20 13:00:48 -08:00
Tom Eastep
7061997324 Optimize wildcard resolution.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-20 12:22:26 -08:00
Tom Eastep
ebbf381e27 Rename %logactionchains -> %usedactions 2010-12-20 10:32:04 -08:00
Tom Eastep
8c8e4d1654 Unconditionally cache interface lookup results 2010-12-20 10:31:14 -08:00
Tom Eastep
7a1a303265 Unconditionally cache the result of wildcard lookups 2010-12-20 10:07:19 -08:00
Tom Eastep
433b3fbd87 Add some insurance against wildcard interfaces 2010-12-20 08:45:10 -08:00
Tom Eastep
5c890938ed Document fixes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-20 08:01:55 -08:00
Tom Eastep
b56b81ef74 Elmininate export of %usedactions 2010-12-19 18:18:37 -08:00
Tom Eastep
262b4044f8 Fix more physical name issues 2010-12-19 16:38:24 -08:00
Tom Eastep
44f001388a Only call normalized_action_name() when needed 2010-12-19 13:32:08 -08:00
Tom Eastep
7be3ed33d5 Fix undef access out of notrack file 2010-12-19 13:30:02 -08:00
Tom Eastep
c302e82233 Disallow wildcard interfaces in additional contexts 2010-12-19 10:46:35 -08:00
Tom Eastep
54c57e3bc7 Disallow wildcard interfaces in additional contexts 2010-12-19 10:43:03 -08:00
Tom Eastep
308831b3ff Clarify '+' in wildcard interfaces 2010-12-19 10:02:02 -08:00
Tom Eastep
55452c6e59 Disallow wildcards in the proxyarp file 2010-12-19 08:55:03 -08:00
Tom Eastep
8526dafc5d Don't allow interface that is identical to the root of a wildcard 2010-12-19 08:10:41 -08:00
Tom Eastep
45faba0b7c Enable parameters for actions 2010-12-18 16:29:29 -08:00
Tom Eastep
4b22bbd90d Add logic for parameterized actions 2010-12-18 16:16:29 -08:00
Tom Eastep
4573b5ba8e Generate normalized name in process_rule_common() 2010-12-18 13:32:53 -08:00
Tom Eastep
21166e07f3 Add action normalization routines 2010-12-18 12:31:37 -08:00
Tom Eastep
c659f05491 Make generate_matrix locals more obvious 2010-12-17 20:16:09 -08:00
Tom Eastep
b9a086c7f2 Fix fly-speck in prog.header 2010-12-16 09:55:31 -08:00
Tom Eastep
9d0bff62fa Finish code re-org
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-15 12:57:55 -08:00
Tom Eastep
92894a7482 Step 1 of module re-org 2010-12-15 11:57:51 -08:00
Tom Eastep
9db42bf3da Update wording in the release notes 2010-12-14 11:28:46 -08:00
Tom Eastep
880a94e42f Update documentation regarding Hack removal 2010-12-14 11:19:17 -08:00
Tom Eastep
999ef7105b Eliminate process_macro1() and process_action1()
They are replaced with process_macro() and process_rule_common() respectively.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-14 08:55:30 -08:00
Tom Eastep
6506fe8cb7 Update action.template for 4.4.16 2010-12-13 21:11:38 -08:00
Tom Eastep
94faafd662 Reorg export list 2010-12-13 21:05:21 -08:00
Tom Eastep
9e684a80c1 Move more code from Rules.pm to Actions.pm 2010-12-13 17:54:53 -08:00
Tom Eastep
5b0d8922e7 Consolidate definitions of rule exception command handling 2010-12-13 17:29:22 -08:00
Tom Eastep
0ec68c7407 Prune the Actions.pm export list 2010-12-13 16:55:00 -08:00
Tom Eastep
09bb5bb9b3 Use $macro_commands when splitting action file records 2010-12-13 16:46:40 -08:00
Tom Eastep
aba63d5c9b More action/macro documentation
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-13 09:06:29 -08:00
Tom Eastep
9ba8823011 Document Action Changes in the release documents
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-13 08:45:58 -08:00
Tom Eastep
c18154cedc NAT in Actions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-13 08:26:24 -08:00
Tom Eastep
e8b26236e2 Shuffle the Compiled Program article 2010-12-12 19:00:15 -08:00
Tom Eastep
ff402dcf09 Add a comment to the params for process_rule_common()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-12 13:02:27 -08:00
Tom Eastep
2e7dd0de97 Use process_rule_common() to process entries in action files.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-12 12:55:32 -08:00
Tom Eastep
444a38ae2e Add a chain reference argument to process_rule_common()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-12 12:22:12 -08:00
Tom Eastep
dfa47cc300 Implement format-2 Actions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-12 12:09:48 -08:00
Tom Eastep
1bbe95ead8 Allow wide macros in actions 2010-12-12 10:14:47 -08:00
Tom Eastep
acbbdc1690 Bump version in the Proxyarp module 2010-12-12 08:56:12 -08:00
Tom Eastep
b786da4abb Document lack of configfiles/ in Debian
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-12 08:45:54 -08:00
Tom Eastep
13c4d21762 Replace a couple of lists of scalars with arrays; document move of process_rules1() 2010-12-12 07:29:46 -08:00
Tom Eastep
138e49276d Rename process_rule1() to process_rule_common() 2010-12-11 17:19:43 -08:00
Tom Eastep
7b86c699b6 Move process_rule1() from Rules.pm to Actions.pm 2010-12-11 17:16:50 -08:00
Tom Eastep
48b00d719e Complete Proxy NDP implementation 2010-12-11 10:04:07 -08:00
Tom Eastep
c2d2a4ab65 Rename proxyndp manpage source 2010-12-11 08:22:08 -08:00
Tom Eastep
293e79f00b Add proxyndp manpage 2010-12-11 08:20:53 -08:00
Tom Eastep
147e4da223 Ensure that interfaces listed in the tcinterfaces file are known 2010-12-11 07:39:16 -08:00
Tom Eastep
0344cdb294 Correct handling of proxyndp 2010-12-11 07:10:50 -08:00
Tom Eastep
1f4b218cde Ensure that interfaces listed in the proxyarp (proxyndp) file are known 2010-12-11 07:10:23 -08:00
Tom Eastep
caa4a54e38 Implement IPv6 proxyndp 2010-12-10 19:06:44 -08:00
Tom Eastep
2ae809888c Document fix for logical naming
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-10 12:19:43 -08:00
Tom Eastep
0a4e098c69 Fix broken logical naming in Proxy ARP
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-10 07:52:54 -08:00
Tom Eastep
fc6dbb3d56 Bump version to Beta 4
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-10 06:53:36 -08:00
Tom Eastep
2f70c0b71a Add Optional/Required interface section to the config basics doc 2010-12-09 10:04:52 -08:00
Tom Eastep
d97a249d6f Factor out common code and fix some bugs 2010-12-09 07:22:14 -08:00
Tom Eastep
4cc485c9f3 Fix rpm install on SuSE 2010-12-05 09:34:39 -08:00
Tom Eastep
05d1862d81 Fix syntax error in .spec 2010-12-05 09:22:19 -08:00
Tom Eastep
6d65100457 Add PPP support in RedHat and SuSE
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-05 09:11:08 -08:00
Tom Eastep
443cf98539 Fix install on Debian 2010-12-04 16:01:16 -08:00
Tom Eastep
c37e2c40aa Fix product list generation 2010-12-04 12:16:30 -08:00
Tom Eastep
4bcfb8dea6 Shorewall-init ppp support on Debian 2010-12-04 12:06:05 -08:00
Tom Eastep
5ad06291c8 Add an INTERFACE variable to ifupdown.sh 2010-12-04 11:42:27 -08:00
Tom Eastep
b9ee064284 Update version to Beta 4 2010-12-04 11:40:34 -08:00
Tom Eastep
19f40ab721 Bump version to Beta 3 2010-12-03 13:43:46 -08:00
Tom Eastep
2e35ad0a1b Fix params parsing on older distros 2010-12-03 13:40:11 -08:00
Tom Eastep
5458d9367f Bump version and document bug catcher 2010-12-03 09:17:26 -08:00
Tom Eastep
8ce1755f8e Add bug-catcher to get_params() 2010-12-03 08:05:11 -08:00
Tom Eastep
04537b8f2d Add some comments 2010-12-02 16:10:35 -08:00
Tom Eastep
79c87b2c72 Document fixes.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-02 12:26:58 -08:00
Tom Eastep
4cd77bf9aa Correct handling of params file opens.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-12-02 10:14:45 -08:00
Tom Eastep
ec75c8aa86 Redirect params output to stderr 2010-12-01 15:04:33 -08:00
Tom Eastep
f68bfde86f Continue to fine-tune params processing 2010-12-01 13:57:16 -08:00
Tom Eastep
d33491d6c6 Continue to enhance params procesing 2010-12-01 13:18:10 -08:00
Tom Eastep
627733d925 Mention DHCPfwd in the DHCP doc - TAKE 2 2010-12-01 11:39:48 -08:00
Tom Eastep
b573826226 Mention DHCPfwd in the DHCP doc 2010-12-01 11:37:40 -08:00
Tom Eastep
49cdc5d9eb Make new get_params work with bash 2010-12-01 10:41:49 -08:00
Tom Eastep
22580c5be0 More parameter processing improvements 2010-12-01 10:11:02 -08:00
Tom Eastep
901a986b18 Update release notes regarding suppressed warning 2010-12-01 09:21:46 -08:00
Tom Eastep
b224eb80d5 Omit warning message 2010-12-01 09:21:23 -08:00
Tom Eastep
cdb75bfd96 Better solution to multi-line exported symbols issue 2010-12-01 09:14:09 -08:00
Tom Eastep
5761bfd7d1 Document change to params processing 2010-12-01 08:16:41 -08:00
Tom Eastep
0455673bcb Remove fly speck from release notes 2010-12-01 07:27:31 -08:00
Tom Eastep
cae5ddc7e0 Initiate 4.4.16 2010-11-30 17:30:11 -08:00
Tom Eastep
6ef0f0f9d3 Document addition of startup_error()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-11-29 16:02:35 -08:00
Tom Eastep
b6e4f2d6c0 Add startup_error() function to the -lite CLIs 2010-11-29 15:44:03 -08:00
Tom Eastep
6dc65e2811 Update Rules.pm version 2010-11-28 19:21:31 -08:00
Tom Eastep
c0ba395276 Update IPSEC title
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-11-28 10:00:31 -08:00
Tom Eastep
81cc39049c Cosmetic change 2010-11-28 09:22:03 -08:00
Tom Eastep
f45af8ff0a Localize $current_params 2010-11-28 09:14:52 -08:00
Tom Eastep
ecb71f7791 Eliminate @param_stack
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-11-28 08:06:58 -08:00
Tom Eastep
195c0cdaca Document fix of root cause 2010-11-28 07:48:03 -08:00
Tom Eastep
4db68697b2 Fix root cause of macro.JAP failure 2010-11-28 07:42:12 -08:00
Tom Eastep
d5b5e7fa75 Document correction to macro.JAP
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-11-28 07:07:58 -08:00
Tom Eastep
3a8634934a Correct macro.JAP 2010-11-28 07:05:18 -08:00
Tom Eastep
095345f95c Mention 'weak host model' in the Fool's firewall article 2010-11-27 11:14:51 -08:00
Tom Eastep
681529b664 Clarify 'switch' in the Fool's firewall article 2010-11-27 11:01:20 -08:00
Tom Eastep
b771ce2925 Clarify 'switch' in the Fool's firewall article 2010-11-27 10:28:44 -08:00
Tom Eastep
1ae9a3185a Disallow standard providers in the routes file 2010-11-26 16:41:30 -08:00
Tom Eastep
053da3a2c0 Fix undefined value on HEADER_MATCH 2010-11-26 16:41:07 -08:00
Tom Eastep
d5fc0150d0 Set version to 4.4.15 2010-11-26 09:49:40 -08:00
Tom Eastep
81622fe63b Add new Macros 2010-11-26 08:32:54 -08:00
Tom Eastep
00cedeeda3 Update macro template for HEADERS column 2010-11-24 11:23:37 -08:00
Tom Eastep
9d93b44da2 Merge branch 'master' into 4.4.15 2010-11-24 10:53:54 -08:00
Tom Eastep
2702d7f208 Implement header matching 2010-11-24 10:46:06 -08:00
Tom Eastep
5e48faad9e Update manpages 2010-11-23 15:03:39 -08:00
Tom Eastep
bcdecdd3f5 Update manpages 2010-11-23 15:01:20 -08:00
Tom Eastep
70453f2648 Avoid regression in fixing syn flood chain names 2010-11-22 14:34:58 -08:00
Tom Eastep
f2f2ef713d Update version of a couple of Perl Modules 2010-11-22 13:23:15 -08:00
Tom Eastep
93d165d3ec Document Munin Macro 2010-11-22 13:04:21 -08:00
Tom Eastep
6f6b417232 Add Munin Macro 2010-11-22 13:01:38 -08:00
Tom Eastep
9427510e8f Update version to RC 1 2010-11-22 13:01:12 -08:00
Tom Eastep
972d00c300 Add another SNAT virtual alias example 2010-11-22 12:04:20 -08:00
Tom Eastep
93f9e8914c Add another SNAT virtual alias example 2010-11-22 11:59:59 -08:00
Tom Eastep
a84b01e191 Cosmetic change to -lite .conf files 2010-11-22 09:14:50 -08:00
Tom Eastep
a53be66e41 Delete references to LOGFORMAT from -lite products 2010-11-22 08:35:54 -08:00
Tom Eastep
9b31906c6c Update bogus link in the features page 2010-11-21 21:40:56 -08:00
Tom Eastep
6083693181 Tweak FAQ 16c - LOGFILE 2010-11-21 19:37:54 -08:00
Tom Eastep
fdd1500971 Add FAQ 16c - LOGFILE 2010-11-21 12:05:28 -08:00
Tom Eastep
a17c47b017 Add FAQ 16b - dmesg 2010-11-21 10:48:23 -08:00
Tom Eastep
2e4da207de Update version to Beta 3 2010-11-21 09:52:34 -08:00
Tom Eastep
f75e5c642f Fix anachronisms in the masq manpage 2010-11-21 09:49:38 -08:00
Tom Eastep
5fdd506b17 Fix anachronisms in the masq manpage 2010-11-21 08:48:12 -08:00
Tom Eastep
4875be99c2 Move version_command() to where it belongs 2010-11-21 08:18:18 -08:00
Tom Eastep
befdbb4a04 Move version_command() to where it belongs 2010-11-21 07:41:29 -08:00
Tom Eastep
eac128b5e2 Add routes file to manpage indexes; modify links in the features page 2010-11-20 13:51:16 -08:00
Tom Eastep
d08f8d6ac3 Update release documents 2010-11-19 17:53:58 -08:00
Tom Eastep
3ca3d64efe Generate correct name for synflood chains 2010-11-18 20:32:20 -08:00
Tom Eastep
407b92829f Another Perl 5.12 issue 2010-11-18 20:12:13 -08:00
Tom Eastep
63e5f6aff9 Correct handling of family switch in tcfilters processing 2010-11-18 06:56:07 -08:00
Tom Eastep
e052951890 More /etc/shorewall/routes documentation 2010-11-17 17:27:48 -08:00
Tom Eastep
63fd81f9ec Simplify getparams 2010-11-17 17:26:41 -08:00
Tom Eastep
5e1c8f8d2a Add DEVICE column to routes file 2010-11-17 08:35:20 -08:00
Tom Eastep
421b1e745d Update release documents with /etc/shorewall/routes information 2010-11-16 21:02:50 -08:00
Tom Eastep
f523113ca7 Add manpages for the routes files 2010-11-16 20:51:11 -08:00
Tom Eastep
71eb783fcd Implement explicit provider routing 2010-11-16 20:38:54 -08:00
Tom Eastep
4ca1098e3e Be more explicit about route rules with SOURCE lo 2010-11-15 21:03:53 -08:00
Tom Eastep
81e6e0889c Initiate Beta 2 2010-11-15 15:09:22 -08:00
Tom Eastep
17cc0bad45 Mention IPv6 in the tcfilters section 2010-11-15 12:38:28 -08:00
Tom Eastep
3c5cadb02c Add another variable to the preceding optimization 2010-11-15 08:42:58 -08:00
Tom Eastep
64e49229f8 Simply variable initialization 2010-11-15 08:14:31 -08:00
Tom Eastep
7507f67d9a Now that I've RTFM, simplify the rule for skipping over the IPv6 header 2010-11-15 07:40:50 -08:00
Tom Eastep
94e827862e Fix typo in release notes 2010-11-15 07:40:18 -08:00
Tom Eastep
31bcb8727e Update release documents 2010-11-14 15:54:58 -08:00
Tom Eastep
c9737930a2 Complete Shared TC documentation 2010-11-14 14:48:16 -08:00
Tom Eastep
a4bff9a2fa Update manpages for IPv6 tcfilters 2010-11-14 13:50:18 -08:00
Tom Eastep
5d0e719d03 Prevent suprious 'fi' in filter output 2010-11-14 10:51:42 -08:00
Tom Eastep
0e5dc41d31 Fix 'Shared' traffic shaping 2010-11-14 09:31:00 -08:00
Tom Eastep
997a697a65 Fix required/optional interface with physical eq '+' 2010-11-14 08:43:20 -08:00
Tom Eastep
9568a6ef59 Add getparams to the .spec file - Take 2 2010-11-14 08:10:05 -08:00
Tom Eastep
59f6b10a55 Add getparams to the .spec file 2010-11-14 08:03:14 -08:00
Tom Eastep
2d8785d574 Add 'TC_ENABLED=Shared' support 2010-11-14 07:52:51 -08:00
Tom Eastep
5bae689fe1 Generate distinct progress messages for IPv4 and IPv6 filters 2010-11-14 07:38:01 -08:00
Tom Eastep
ff571cb83b Give IPv6 filters a distinct priority 2010-11-14 06:55:09 -08:00
Tom Eastep
1d93a18b8d IPV6 now working -- BOTH still broken 2010-11-13 18:08:19 -08:00
Tom Eastep
3f6cce10d2 Protect against accidental output from params file 2010-11-13 16:16:58 -08:00
Tom Eastep
19122512d0 Fix new params file processing for INCLUDE 2010-11-13 10:59:09 -08:00
Tom Eastep
b20ed2d4de Simply another RE
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-11-11 14:03:00 -08:00
Tom Eastep
775bee278a Fix for unexpected /usr/share/shorewall/init
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-11-11 13:03:00 -08:00
Tom Eastep
a1e3683651 Documentation updates
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-11-10 14:38:55 -08:00
Tom Eastep
ff61d4dba4 Correct documentation of NULL_ROUTE_RFC1918 fix
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-11-10 14:18:33 -08:00
Tom Eastep
0602b619bd Fix NULL_ROUTE_RFC1918=Yes 2010-11-09 15:20:23 -08:00
Tom Eastep
8a9aaff4e8 Change shell variable resolution order 2010-11-07 13:28:03 -08:00
Tom Eastep
1e6b7c8130 Simplify an RE 2010-11-06 20:25:46 -07:00
Tom Eastep
092f032b8e Realign precedence of environment inheritance 2010-11-06 19:02:14 -07:00
Tom Eastep
25397e8284 Document params file processing change 2010-11-06 18:33:41 -07:00
Tom Eastep
69c3600107 Modernize processing of params file 2010-11-06 17:12:05 -07:00
Tom Eastep
8c1bdc803b Fix typo in address-type section; add faq 94 2010-11-04 09:57:33 -07:00
Tom Eastep
e9b7b8acad Add address-type info to config file basics doc 2010-11-03 16:31:50 -07:00
Tom Eastep
5b7a2f002a Add helpers file to advice about modifying loaded modules
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-11-03 12:47:50 -07:00
Tom Eastep
7c4bc900d6 Belated update to Perl module versions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-30 10:45:14 -07:00
Tom Eastep
dcf2d633b1 Don't save ipsets if there are no dynamic zones or ipset rules 2010-10-30 10:35:52 -07:00
Tom Eastep
d4f857f877 Update version to 4.4.15-Beta1 2010-10-30 07:12:03 -07:00
Tom Eastep
4daf4c372e Initialize release documents for 4.4.15
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-29 08:28:58 -07:00
Tom Eastep
1db13849ab Clear VERBOSE and VERBOSITY at CLI startup
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-28 15:17:37 -07:00
Tom Eastep
6a3216deb5 Merge branch '4.4.14'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-28 11:57:40 -07:00
Tom Eastep
5cf0cd2c33 Document VERBOSITY fix.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-28 11:41:38 -07:00
Tom Eastep
8758d3a834 Insure that VERBOSITY=0 when interrogating compiled script version
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-28 11:25:56 -07:00
Tom Eastep
20bb781874 Document fix for 10+ TC interfaces
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-28 10:33:17 -07:00
Tom Eastep
bc406b39bc Fix > 10 TC interfaces 2010-10-28 10:27:55 -07:00
Tom Eastep
dad5c9d2dd Fix > 10 TC interfaces 2010-10-28 10:26:38 -07:00
Tom Eastep
d3f729c56e Clarify applications running on the firewall section 2010-10-27 15:51:29 -07:00
Tom Eastep
54fdce9e22 Fix typos in Introduction 2010-10-26 07:32:50 -07:00
Tom Eastep
75765c9fd1 Fix split_list() 2010-10-26 07:00:11 -07:00
Tom Eastep
6c90046ab5 Document fix for split_list() 2010-10-26 06:55:01 -07:00
Tom Eastep
f2ab068044 Fix split_list() 2010-10-26 06:49:55 -07:00
Tom Eastep
1060b201dd Update version to 4.4.14 2010-10-23 21:40:22 -07:00
Tom Eastep
0f1370f265 Correct typo in upgrade issues 2010-10-21 07:57:39 -07:00
Tom Eastep
4a85d7f642 Correct typo in upgrade issues 2010-10-21 07:56:33 -07:00
Tom Eastep
ded852e0ee Fix compilation warning 2010-10-19 08:42:35 -07:00
Tom Eastep
3ec6185f72 Run update-rc.d on Debian
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-13 08:42:35 -07:00
Tom Eastep
959b8f5167 Revise Vserver article 2010-10-10 08:29:19 -07:00
Tom Eastep
8041569f14 Revise Vserver article 2010-10-10 08:28:38 -07:00
Tom Eastep
28e473d9a1 Document change to FORWARD_CLEAR_MARK default
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-10 07:49:17 -07:00
Tom Eastep
7d66dcae52 Document change to FORWARD_CLEAR_MARK default
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-10 07:44:00 -07:00
Tom Eastep
aad8a7b213 Clear FORWARD_CLEAR_MARK setting in the remaining config files 2010-10-09 11:31:19 -07:00
Tom Eastep
3733f2f132 Don't specify FORWARD_CLEAR_MARK=Yes in the Universal configuration 2010-10-09 11:30:50 -07:00
Tom Eastep
11f2c7772a Clear FORWARD_CLEAR_MARK setting in the remaining config files 2010-10-09 11:28:13 -07:00
Tom Eastep
a3df46443e Don't specify FORWARD_CLEAR_MARK=Yes in the Universal configuration 2010-10-09 09:53:42 -07:00
Tom Eastep
17860cacd8 Move dump_command() to a more logical place in the file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-07 14:36:05 -07:00
Tom Eastep
033d43b014 Implement undocumented dumpfilter extension file 2010-10-07 14:35:51 -07:00
Tom Eastep
78aa00d6d2 Move dump_command() to a more logical place in the file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-07 14:35:03 -07:00
Tom Eastep
520608dd66 Implement undocumented dumpfilter extension file 2010-10-07 14:19:09 -07:00
Tom Eastep
f0ef27b3e5 Update version to RC1 2010-10-06 16:16:37 -07:00
Tom Eastep
b9602d9a6a Correct typo in the release notes 2010-10-06 11:24:45 -07:00
Tom Eastep
3d90c63528 Improve validation and reporting in the net list processing.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-05 16:20:07 -07:00
Tom Eastep
da886142f9 Update manpages for ipset lists
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-05 13:45:50 -07:00
Tom Eastep
a10ced2da2 Make exclusion of set lists more consistent
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-05 12:22:27 -07:00
Tom Eastep
7767d30c7c Improve error message
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-05 11:25:18 -07:00
Tom Eastep
587dacdae0 Allow set lists with "!"
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-05 08:38:30 -07:00
Tom Eastep
8fd221ef30 Refine source/dest network parsing in expand_rule()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-04 18:57:11 -07:00
Tom Eastep
e74f48410f Correct handling of exclusion with ipset lists
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-04 14:29:50 -07:00
Tom Eastep
d02bc69cd9 Document PKTTYPE as "Obsolete"
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-04 07:50:00 -07:00
Tom Eastep
38851fe446 Delete obsolete options from shorewall.conf
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-04 07:44:28 -07:00
Tom Eastep
ac8c7ed7d4 Updating bridge documents 2010-10-03 14:12:38 -07:00
Tom Eastep
2599e44fca More Tweaks to FAQ 93
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-03 13:03:11 -07:00
Tom Eastep
4c1c63617b Tweak FAQ 93 2010-10-03 12:56:09 -07:00
Tom Eastep
e62033ed13 Add FAQ 93 re bridging.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-03 12:52:46 -07:00
Tom Eastep
cee05d9763 Refine -lite handling of scfilter.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-03 12:52:30 -07:00
Tom Eastep
b3d0447ef2 Reword scfilter -lite explaination
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-03 11:00:51 -07:00
Tom Eastep
432534a650 Eliminate need to restart -lite to extract scfilter
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-03 10:56:55 -07:00
Tom Eastep
994ea3cce6 Document -lite log reading fix.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-03 08:35:17 -07:00
Tom Eastep
a56a9d77d1 Fix log reading in the -lite packages
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-02 07:47:38 -07:00
Tom Eastep
f9af35ffbe Document -lite fixes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-02 07:22:37 -07:00
Tom Eastep
87dbf42bad Clamp VERBOSITY to valid range
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-01 13:56:44 -07:00
Tom Eastep
38ea8159d4 Correct Debian Lite init scripts
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-01 13:56:06 -07:00
Tom Eastep
b27fd07e9f Don't indent the embedded scfilter file.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-01 13:20:36 -07:00
Tom Eastep
5b86cbdabf Document scfilter in the Extensions Scripts Doc
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-01 12:29:41 -07:00
Tom Eastep
ac71868cc1 Package the scfilter along with the generated script for -lite
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-01 10:59:15 -07:00
Tom Eastep
91dbae9476 Remove requirement that scfilter be executable
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-01 09:53:54 -07:00
Tom Eastep
6e9fc12517 Update version to Beta 4
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-01 09:31:11 -07:00
Tom Eastep
468af44876 Add support for 'scfilter' script
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-01 09:15:58 -07:00
Tom Eastep
2fa7e11976 Add 'scfilter' extension script
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-10-01 07:38:14 -07:00
Tom Eastep
3898edfddb Make 'show connections' work on ancient distros 2010-09-30 17:18:58 -07:00
Tom Eastep
077aa18a2d Update release notes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-30 15:03:02 -07:00
Tom Eastep
e795a9995b Update release documents
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-30 14:17:51 -07:00
Tom Eastep
1218ccf0cb More optimization performance improvements
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-30 14:15:19 -07:00
Tom Eastep
252a9f2205 More speedup of optimization level 8
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-29 13:30:10 -07:00
Tom Eastep
46f1074422 Reduce the cost of optimization substantially.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-29 11:54:39 -07:00
Tom Eastep
8017f603a0 Add progress message for each optimization pass.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-28 12:20:35 -07:00
Tom Eastep
6171d938f7 Correction to last change -- move two declarations to an outer block.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-28 12:20:06 -07:00
Tom Eastep
48c3200a5a Issue error message when required file is missing or has zero size.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-28 11:22:47 -07:00
Tom Eastep
68f537ac5b Bypass processing logic when an optional config file is absent.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-28 10:48:44 -07:00
Tom Eastep
47fbc83419 Don't add trailing whitespace to DNAT/REDIRECT target
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-28 09:27:42 -07:00
Tom Eastep
468c918121 Correct grammar in FAQ 92 2010-09-28 08:05:18 -07:00
Tom Eastep
a7be406fb9 Add FAQ 92 2010-09-28 08:04:02 -07:00
Tom Eastep
91aabfc078 Revise fix for extraneous progress messages 2010-09-27 16:18:11 -07:00
Tom Eastep
0109b8113a Prevent random progress messages during compilation.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-27 15:56:22 -07:00
Tom Eastep
75d50d126c Make zones with 'mss' complex.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-27 13:57:56 -07:00
Tom Eastep
489364a1a0 Correct zone manpages re: blacklist vs zone type
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-27 13:57:03 -07:00
Tom Eastep
f7eb3c3d8c Periodic elimination of trailing white space
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-27 11:16:18 -07:00
Tom Eastep
f33912d5f7 Correct/update release notes.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-27 09:11:17 -07:00
Tom Eastep
ac646930a3 Tighter validation of ipset names in the hosts file.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-26 08:36:27 -07:00
Tom Eastep
066c772fcd Correct minor issue with previous error message improvement change
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-26 08:28:25 -07:00
Tom Eastep
0becb39202 Bump version to Beta 3
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-26 08:15:32 -07:00
Tom Eastep
2828b65326 Improve error message generated when a token beginning with '+' reaches validate_net()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-26 07:56:55 -07:00
Tom Eastep
74f1cb2443 Mention maclist file in shorewall-ipsets(5) 2010-09-25 16:07:56 -07:00
Tom Eastep
f07ec1e9d3 Clean up untidiness where Shorewall6 tries to start on a system with an old kernel
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-25 08:46:14 -07:00
Tom Eastep
a79a8d4acc Document that ipset multi-match may not be used in the hosts file 2010-09-24 15:44:44 -07:00
Tom Eastep
e018ee6adc Don't create <zone>_frwd when unnecessary
- Set the zone {complex} flag based on ipsec options rather than the presense of any options.
- Generate forwarding blacklist rules in lieu of creating<zone>_frwd

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-24 15:25:57 -07:00
Tom Eastep
b5fdb089bc Fix syntax error in blacklist fix 2010-09-24 13:42:05 -07:00
Tom Eastep
0768235278 Correct blacklisting in simple configurations
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-24 13:41:54 -07:00
Tom Eastep
03161ed57d Bump version to 4.4.14 Beta 2 2010-09-23 19:33:37 -07:00
Tom Eastep
0f4d8eb929 Use 'conntrack' for 'show connections' 2010-09-23 19:08:40 -07:00
Tom Eastep
611c33e052 Add rule order warning to secmark manpages 2010-09-23 11:31:56 -07:00
Tom Eastep
6702fbbd40 Make timestamps in log uniform 2010-09-23 07:40:27 -07:00
Tom Eastep
2c7b1b5d7b Add more comments 2010-09-22 15:26:01 -07:00
Tom Eastep
9d5642aedd Update Version to 4.4.14-Beta1 2010-09-21 11:34:26 -07:00
Tom Eastep
26ec7cee1d Update ipset doc with multiple match syntax 2010-09-21 06:59:55 -07:00
Tom Eastep
dbd7914ee6 More fiddling with move_rules()
- Assert that the chain being moved has no blacklist jumps
- delete duplicate rules in case the destination chain has such a jump
2010-09-20 18:00:39 -07:00
Tom Eastep
c21a4d786d add ipset manpage to the index 2010-09-20 16:00:19 -07:00
Tom Eastep
6069d8d509 Add shorewall-ipsets(5) to See Also 2010-09-20 15:37:42 -07:00
Tom Eastep
b44a35edbd Add shorewall-ipsets manpage
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-20 15:34:04 -07:00
Tom Eastep
271154ed60 Rename DESTIFAC_DISALLOW -> DESTIFACE_DISALLOW
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-20 09:45:48 -07:00
Tom Eastep
bde0a297f9 Misc cleanup for 4.4.13
1. Replace statement with equivalent function call in promote_blacklist_rules()
2. Bump version of Tunnels.pm
3. Fix typo in comment in Zones.pm

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-20 09:45:38 -07:00
Tom Eastep
7baa1839cf Tighen up parsing of bracketed lists -- Take 2 2010-09-20 07:24:22 -07:00
Tom Eastep
f64993fe40 Tighen up parsing of bracketed lists 2010-09-20 07:05:23 -07:00
Tom Eastep
0ed33a0552 Document fix for '*' in interface names 2010-09-19 15:55:09 -07:00
Tom Eastep
9335ef5745 Don't allow '*' in interface names 2010-09-19 15:10:21 -07:00
Tom Eastep
25ca73ca54 Support alternative syntax for ipet lists
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2010-09-19 13:22:12 -07:00
Tom Eastep
0c6882c3a8 Merge branch '4.4.13' 2010-09-19 12:55:08 -07:00
Tom Eastep
9111540a7f Support ipset lists 2010-09-19 12:36:20 -07:00
272 changed files with 21465 additions and 10426 deletions

View File

@@ -1,6 +1,6 @@
###############################################################################
#
# Shorewall Version 4 -- /etc/shorewall/shorewall.conf
# Shorewall Version 4.4 -- /etc/shorewall/shorewall.conf
#
# For information about the settings in this file, type "man shorewall.conf"
#
@@ -18,188 +18,180 @@ STARTUP_ENABLED=Yes
VERBOSITY=1
###############################################################################
# L O G G I N G
# L O G G I N G
###############################################################################
LOGFILE=
BLACKLIST_LOGLEVEL=
STARTUP_LOG=/var/log/shorewall-init.log
LOG_MARTIANS=Yes
LOG_VERBOSITY=2
LOGALLNEW=
LOGFILE=/var/log/messages
LOGFORMAT="Shorewall:%s:%s:"
LOGTAGONLY=No
LOGLIMIT=
LOGALLNEW=
BLACKLIST_LOGLEVEL=
MACLIST_LOG_LEVEL=info
TCP_FLAGS_LOG_LEVEL=info
SFILTER_LOG_LEVEL=info
SMURF_LOG_LEVEL=info
LOG_MARTIANS=Yes
STARTUP_LOG=/var/log/shorewall-init.log
TCP_FLAGS_LOG_LEVEL=info
###############################################################################
# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S
###############################################################################
CONFIG_PATH=/etc/shorewall:/usr/share/shorewall
IPTABLES=
IP=
TC=
IPSET=
MODULESDIR=
PERL=/usr/bin/perl
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
RESTOREFILE=restore
SHOREWALL_SHELL=/bin/sh
SUBSYSLOCK=
MODULESDIR=
CONFIG_PATH=/etc/shorewall:/usr/share/shorewall
RESTOREFILE=
IPSECFILE=zones
LOCKFILE=
TC=
###############################################################################
# D E F A U L T A C T I O N S / M A C R O S
###############################################################################
DROP_DEFAULT="Drop"
REJECT_DEFAULT="Reject"
ACCEPT_DEFAULT="none"
QUEUE_DEFAULT="none"
DROP_DEFAULT="Drop"
NFQUEUE_DEFAULT="none"
QUEUE_DEFAULT="none"
REJECT_DEFAULT="Reject"
###############################################################################
# R S H / R C P C O M M A N D S
###############################################################################
RSH_COMMAND='ssh ${root}@${system} ${command}'
RCP_COMMAND='scp ${files} ${root}@${system}:${destination}'
RSH_COMMAND='ssh ${root}@${system} ${command}'
###############################################################################
# F I R E W A L L O P T I O N S
###############################################################################
IP_FORWARDING=On
ACCOUNTING=Yes
ACCOUNTING_TABLE=filter
ADD_IP_ALIASES=No
ADD_SNAT_ALIASES=No
ADMINISABSENTMINDED=Yes
AUTO_COMMENT=Yes
AUTOMAKE=No
BLACKLISTNEWONLY=Yes
CLAMPMSS=No
CLEAR_TC=Yes
COMPLETE=Yes
DISABLE_IPV6=No
DELETE_THEN_ADD=Yes
DETECT_DNAT_IPADDRS=No
DONT_LOAD=
DYNAMIC_BLACKLIST=Yes
EXPAND_POLICIES=Yes
EXPORTMODULES=Yes
FASTACCEPT=Yes
FORWARD_CLEAR_MARK=
IMPLICIT_CONTINUE=No
HIGH_ROUTE_MARKS=No
IP_FORWARDING=On
KEEP_RT_TABLES=No
LOAD_HELPERS_ONLY=Yes
LEGACY_FASTSTART=No
MACLIST_TABLE=filter
MACLIST_TTL=
MANGLE_ENABLED=Yes
MAPOLDACTIONS=No
MARK_IN_FORWARD_CHAIN=No
MODULE_SUFFIX=ko
MULTICAST=No
MUTEX_TIMEOUT=60
NULL_ROUTE_RFC1918=No
OPTIMIZE=15
OPTIMIZE_ACCOUNTING=No
REQUIRE_INTERFACE=Yes
RESTORE_DEFAULT_ROUTE=Yes
RETAIN_ALIASES=No
ROUTE_FILTER=No
SAVE_IPSETS=No
TC_ENABLED=Internal
TC_EXPERT=No
TC_PRIOMAP="2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2"
CLEAR_TC=Yes
MARK_IN_FORWARD_CHAIN=No
CLAMPMSS=No
ROUTE_FILTER=No
DETECT_DNAT_IPADDRS=No
MUTEX_TIMEOUT=60
ADMINISABSENTMINDED=Yes
BLACKLISTNEWONLY=Yes
DELAYBLACKLISTLOAD=No
MODULE_SUFFIX=ko
DISABLE_IPV6=No
BRIDGING=No
DYNAMIC_ZONES=No
PKTTYPE=Yes
NULL_ROUTE_RFC1918=No
MACLIST_TABLE=filter
MACLIST_TTL=
SAVE_IPSETS=No
MAPOLDACTIONS=No
FASTACCEPT=Yes
IMPLICIT_CONTINUE=No
HIGH_ROUTE_MARKS=No
USE_ACTIONS=Yes
OPTIMIZE=15
EXPORTPARAMS=Yes
EXPAND_POLICIES=Yes
KEEP_RT_TABLES=No
DELETE_THEN_ADD=Yes
MULTICAST=No
DONT_LOAD=
AUTO_COMMENT=Yes
MANGLE_ENABLED=Yes
TRACK_PROVIDERS=Yes
USE_DEFAULT_RT=No
RESTORE_DEFAULT_ROUTE=Yes
AUTOMAKE=No
WIDE_TC_MARKS=Yes
TRACK_PROVIDERS=Yes
ZONE2ZONE=2
ACCOUNTING=Yes
DYNAMIC_BLACKLIST=Yes
OPTIMIZE_ACCOUNTING=No
LOAD_HELPERS_ONLY=Yes
REQUIRE_INTERFACE=Yes
FORWARD_CLEAR_MARK=Yes
COMPLETE=Yes
###############################################################################
# P A C K E T D I S P O S I T I O N
###############################################################################
@@ -208,6 +200,17 @@ BLACKLIST_DISPOSITION=DROP
MACLIST_DISPOSITION=REJECT
SMURF_DISPOSITION=DROP
SFILTER_DISPOSITION=DROP
TCP_FLAGS_DISPOSITION=DROP
################################################################################
# L E G A C Y O P T I O N
# D O N O T D E L E T E O R A L T E R
################################################################################
IPSECFILE=zones
#LAST LINE -- DO NOT REMOVE

View File

@@ -29,188 +29,180 @@ STARTUP_ENABLED=No
VERBOSITY=1
###############################################################################
# L O G G I N G
# L O G G I N G
###############################################################################
LOGFILE=/var/log/messages
BLACKLIST_LOGLEVEL=
STARTUP_LOG=/var/log/shorewall-init.log
LOG_MARTIANS=Yes
LOG_VERBOSITY=2
LOGALLNEW=
LOGFILE=/var/log/messages
LOGFORMAT="Shorewall:%s:%s:"
LOGTAGONLY=No
LOGLIMIT=
LOGALLNEW=
BLACKLIST_LOGLEVEL=
MACLIST_LOG_LEVEL=info
TCP_FLAGS_LOG_LEVEL=info
SFILTER_LOG_LEVEL=info
SMURF_LOG_LEVEL=info
LOG_MARTIANS=Yes
STARTUP_LOG=/var/log/shorewall-init.log
TCP_FLAGS_LOG_LEVEL=info
###############################################################################
# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S
###############################################################################
CONFIG_PATH=/etc/shorewall:/usr/share/shorewall
IPTABLES=
IP=
TC=
IPSET=
MODULESDIR=
PERL=/usr/bin/perl
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
RESTOREFILE=restore
SHOREWALL_SHELL=/bin/sh
SUBSYSLOCK=
MODULESDIR=
CONFIG_PATH=/etc/shorewall:/usr/share/shorewall
RESTOREFILE=
IPSECFILE=zones
LOCKFILE=
TC=
###############################################################################
# D E F A U L T A C T I O N S / M A C R O S
###############################################################################
DROP_DEFAULT="Drop"
REJECT_DEFAULT="Reject"
ACCEPT_DEFAULT="none"
QUEUE_DEFAULT="none"
DROP_DEFAULT="Drop"
NFQUEUE_DEFAULT="none"
QUEUE_DEFAULT="none"
REJECT_DEFAULT="Reject"
###############################################################################
# R S H / R C P C O M M A N D S
###############################################################################
RSH_COMMAND='ssh ${root}@${system} ${command}'
RCP_COMMAND='scp ${files} ${root}@${system}:${destination}'
RSH_COMMAND='ssh ${root}@${system} ${command}'
###############################################################################
# F I R E W A L L O P T I O N S
###############################################################################
IP_FORWARDING=Off
ACCOUNTING=Yes
ACCOUNTING_TABLE=filter
ADD_IP_ALIASES=No
ADD_SNAT_ALIASES=No
ADMINISABSENTMINDED=Yes
AUTO_COMMENT=Yes
AUTOMAKE=No
BLACKLISTNEWONLY=Yes
CLAMPMSS=No
CLEAR_TC=Yes
COMPLETE=No
DISABLE_IPV6=No
DELETE_THEN_ADD=Yes
DETECT_DNAT_IPADDRS=No
DONT_LOAD=
DYNAMIC_BLACKLIST=Yes
EXPAND_POLICIES=Yes
EXPORTMODULES=Yes
FASTACCEPT=No
FORWARD_CLEAR_MARK=
IMPLICIT_CONTINUE=No
HIGH_ROUTE_MARKS=No
IP_FORWARDING=Off
KEEP_RT_TABLES=No
LOAD_HELPERS_ONLY=Yes
LEGACY_FASTSTART=No
MACLIST_TABLE=filter
MACLIST_TTL=
MANGLE_ENABLED=Yes
MAPOLDACTIONS=No
MARK_IN_FORWARD_CHAIN=No
MODULE_SUFFIX=ko
MULTICAST=No
MUTEX_TIMEOUT=60
NULL_ROUTE_RFC1918=No
OPTIMIZE=1
OPTIMIZE_ACCOUNTING=No
REQUIRE_INTERFACE=No
RESTORE_DEFAULT_ROUTE=Yes
RETAIN_ALIASES=No
ROUTE_FILTER=No
SAVE_IPSETS=No
TC_ENABLED=Internal
TC_EXPERT=No
TC_PRIOMAP="2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2"
CLEAR_TC=Yes
MARK_IN_FORWARD_CHAIN=No
CLAMPMSS=No
ROUTE_FILTER=No
DETECT_DNAT_IPADDRS=No
MUTEX_TIMEOUT=60
ADMINISABSENTMINDED=Yes
BLACKLISTNEWONLY=Yes
DELAYBLACKLISTLOAD=No
MODULE_SUFFIX=ko
DISABLE_IPV6=No
BRIDGING=No
DYNAMIC_ZONES=No
PKTTYPE=Yes
NULL_ROUTE_RFC1918=No
MACLIST_TABLE=filter
MACLIST_TTL=
SAVE_IPSETS=No
MAPOLDACTIONS=No
FASTACCEPT=No
IMPLICIT_CONTINUE=No
HIGH_ROUTE_MARKS=No
USE_ACTIONS=Yes
OPTIMIZE=1
EXPORTPARAMS=No
EXPAND_POLICIES=Yes
KEEP_RT_TABLES=No
DELETE_THEN_ADD=Yes
MULTICAST=No
DONT_LOAD=
AUTO_COMMENT=Yes
MANGLE_ENABLED=Yes
TRACK_PROVIDERS=Yes
USE_DEFAULT_RT=No
RESTORE_DEFAULT_ROUTE=Yes
AUTOMAKE=No
WIDE_TC_MARKS=Yes
TRACK_PROVIDERS=Yes
ZONE2ZONE=2
ACCOUNTING=Yes
DYNAMIC_BLACKLIST=Yes
OPTIMIZE_ACCOUNTING=No
LOAD_HELPERS_ONLY=Yes
REQUIRE_INTERFACE=No
FORWARD_CLEAR_MARK=Yes
COMPLETE=No
###############################################################################
# P A C K E T D I S P O S I T I O N
###############################################################################
@@ -219,6 +211,17 @@ BLACKLIST_DISPOSITION=DROP
MACLIST_DISPOSITION=REJECT
SMURF_DISPOSITION=DROP
SFILTER_DISPOSITION=DROP
TCP_FLAGS_DISPOSITION=DROP
################################################################################
# L E G A C Y O P T I O N
# D O N O T D E L E T E O R A L T E R
################################################################################
IPSECFILE=zones
#LAST LINE -- DO NOT REMOVE

View File

@@ -3,6 +3,7 @@
# Shorewall version 4.0 - Sample shorewall.conf for three-interface
# configuration.
# Copyright (C) 2006 by the Shorewall Team
# 2011 by Thomas M. Eastep
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -17,9 +18,6 @@
# http://shorewall.net/manpages/shorewall.conf.html
#
###############################################################################
# S T A R T U P E N A B L E D
###############################################################################
STARTUP_ENABLED=No
###############################################################################
@@ -29,188 +27,180 @@ STARTUP_ENABLED=No
VERBOSITY=1
###############################################################################
# L O G G I N G
# L O G G I N G
###############################################################################
LOGFILE=/var/log/messages
BLACKLIST_LOGLEVEL=
STARTUP_LOG=/var/log/shorewall-init.log
LOG_MARTIANS=Yes
LOG_VERBOSITY=2
LOGALLNEW=
LOGFILE=/var/log/messages
LOGFORMAT="Shorewall:%s:%s:"
LOGTAGONLY=No
LOGLIMIT=
LOGALLNEW=
BLACKLIST_LOGLEVEL=
MACLIST_LOG_LEVEL=info
TCP_FLAGS_LOG_LEVEL=info
SFILTER_LOG_LEVEL=info
SMURF_LOG_LEVEL=info
LOG_MARTIANS=Yes
STARTUP_LOG=/var/log/shorewall-init.log
TCP_FLAGS_LOG_LEVEL=info
###############################################################################
# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S
###############################################################################
CONFIG_PATH=/etc/shorewall:/usr/share/shorewall
IPTABLES=
IP=
TC=
IPSET=
MODULESDIR=
PERL=/usr/bin/perl
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
RESTOREFILE=restore
SHOREWALL_SHELL=/bin/sh
SUBSYSLOCK=
MODULESDIR=
CONFIG_PATH=/etc/shorewall:/usr/share/shorewall
RESTOREFILE=
IPSECFILE=zones
LOCKFILE=
TC=
###############################################################################
# D E F A U L T A C T I O N S / M A C R O S
###############################################################################
DROP_DEFAULT="Drop"
REJECT_DEFAULT="Reject"
ACCEPT_DEFAULT="none"
QUEUE_DEFAULT="none"
DROP_DEFAULT="Drop"
NFQUEUE_DEFAULT="none"
QUEUE_DEFAULT="none"
REJECT_DEFAULT="Reject"
###############################################################################
# R S H / R C P C O M M A N D S
###############################################################################
RSH_COMMAND='ssh ${root}@${system} ${command}'
RCP_COMMAND='scp ${files} ${root}@${system}:${destination}'
RSH_COMMAND='ssh ${root}@${system} ${command}'
###############################################################################
# F I R E W A L L O P T I O N S
###############################################################################
IP_FORWARDING=On
ACCOUNTING=Yes
ACCOUNTING_TABLE=filter
ADD_IP_ALIASES=No
ADD_SNAT_ALIASES=No
ADMINISABSENTMINDED=Yes
AUTO_COMMENT=Yes
AUTOMAKE=No
BLACKLISTNEWONLY=Yes
CLAMPMSS=Yes
CLEAR_TC=Yes
COMPLETE=No
DISABLE_IPV6=No
DELETE_THEN_ADD=Yes
DETECT_DNAT_IPADDRS=No
DONT_LOAD=
DYNAMIC_BLACKLIST=Yes
EXPAND_POLICIES=Yes
EXPORTMODULES=Yes
FASTACCEPT=No
FORWARD_CLEAR_MARK=
IMPLICIT_CONTINUE=No
HIGH_ROUTE_MARKS=No
IP_FORWARDING=On
KEEP_RT_TABLES=No
LOAD_HELPERS_ONLY=Yes
LEGACY_FASTSTART=No
MACLIST_TABLE=filter
MACLIST_TTL=
MANGLE_ENABLED=Yes
MAPOLDACTIONS=No
MARK_IN_FORWARD_CHAIN=No
MODULE_SUFFIX=ko
MULTICAST=No
MUTEX_TIMEOUT=60
NULL_ROUTE_RFC1918=No
OPTIMIZE=1
OPTIMIZE_ACCOUNTING=No
REQUIRE_INTERFACE=No
RESTORE_DEFAULT_ROUTE=Yes
RETAIN_ALIASES=No
ROUTE_FILTER=No
SAVE_IPSETS=No
TC_ENABLED=Internal
TC_EXPERT=No
TC_PRIOMAP="2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2"
CLEAR_TC=Yes
MARK_IN_FORWARD_CHAIN=No
CLAMPMSS=Yes
ROUTE_FILTER=No
DETECT_DNAT_IPADDRS=No
MUTEX_TIMEOUT=60
ADMINISABSENTMINDED=Yes
BLACKLISTNEWONLY=Yes
DELAYBLACKLISTLOAD=No
MODULE_SUFFIX=ko
DISABLE_IPV6=No
BRIDGING=No
DYNAMIC_ZONES=No
PKTTYPE=Yes
NULL_ROUTE_RFC1918=No
MACLIST_TABLE=filter
MACLIST_TTL=
SAVE_IPSETS=No
MAPOLDACTIONS=No
FASTACCEPT=No
IMPLICIT_CONTINUE=No
HIGH_ROUTE_MARKS=No
USE_ACTIONS=Yes
OPTIMIZE=1
EXPORTPARAMS=No
EXPAND_POLICIES=Yes
KEEP_RT_TABLES=No
DELETE_THEN_ADD=Yes
MULTICAST=No
DONT_LOAD=
AUTO_COMMENT=Yes
MANGLE_ENABLED=Yes
TRACK_PROVIDERS=Yes
USE_DEFAULT_RT=No
RESTORE_DEFAULT_ROUTE=Yes
AUTOMAKE=No
WIDE_TC_MARKS=Yes
TRACK_PROVIDERS=Yes
ZONE2ZONE=2
ACCOUNTING=Yes
DYNAMIC_BLACKLIST=Yes
OPTIMIZE_ACCOUNTING=No
LOAD_HELPERS_ONLY=Yes
REQUIRE_INTERFACE=No
FORWARD_CLEAR_MARK=Yes
COMPLETE=No
###############################################################################
# P A C K E T D I S P O S I T I O N
###############################################################################
@@ -219,6 +209,17 @@ BLACKLIST_DISPOSITION=DROP
MACLIST_DISPOSITION=REJECT
SMURF_DISPOSITION=DROP
SFILTER_DISPOSITION=DROP
TCP_FLAGS_DISPOSITION=DROP
################################################################################
# L E G A C Y O P T I O N
# D O N O T D E L E T E O R A L T E R
################################################################################
IPSECFILE=zones
#LAST LINE -- DO NOT REMOVE

View File

@@ -3,6 +3,7 @@
# Shorewall version 4.0 - Sample shorewall.conf for two-interface
# configuration.
# Copyright (C) 2006,2007 by the Shorewall Team
# 2011 by Thomas M. Eastep
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -29,195 +30,180 @@ STARTUP_ENABLED=No
VERBOSITY=1
###############################################################################
# C O M P I L E R
# (setting this to 'perl' requires installation of Shorewall-perl)
# L O G G I N G
###############################################################################
SHOREWALL_COMPILER=
BLACKLIST_LOGLEVEL=
###############################################################################
# L O G G I N G
###############################################################################
LOGFILE=/var/log/messages
STARTUP_LOG=/var/log/shorewall-init.log
LOG_MARTIANS=Yes
LOG_VERBOSITY=2
LOGALLNEW=
LOGFILE=/var/log/messages
LOGFORMAT="Shorewall:%s:%s:"
LOGTAGONLY=No
LOGLIMIT=
LOGALLNEW=
BLACKLIST_LOGLEVEL=
MACLIST_LOG_LEVEL=info
TCP_FLAGS_LOG_LEVEL=info
SFILTER_LOG_LEVEL=info
SMURF_LOG_LEVEL=info
LOG_MARTIANS=Yes
STARTUP_LOG=/var/log/shorewall-init.log
TCP_FLAGS_LOG_LEVEL=info
###############################################################################
# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S
###############################################################################
CONFIG_PATH=/etc/shorewall:/usr/share/shorewall
IPTABLES=
IP=
TC=
IPSET=
MODULESDIR=
PERL=/usr/bin/perl
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
RESTOREFILE=restore
SHOREWALL_SHELL=/bin/sh
SUBSYSLOCK=
MODULESDIR=
CONFIG_PATH=/etc/shorewall:/usr/share/shorewall
RESTOREFILE=
IPSECFILE=zones
LOCKFILE=
TC=
###############################################################################
# D E F A U L T A C T I O N S / M A C R O S
###############################################################################
DROP_DEFAULT="Drop"
REJECT_DEFAULT="Reject"
ACCEPT_DEFAULT="none"
QUEUE_DEFAULT="none"
DROP_DEFAULT="Drop"
NFQUEUE_DEFAULT="none"
QUEUE_DEFAULT="none"
REJECT_DEFAULT="Reject"
###############################################################################
# R S H / R C P C O M M A N D S
###############################################################################
RSH_COMMAND='ssh ${root}@${system} ${command}'
RCP_COMMAND='scp ${files} ${root}@${system}:${destination}'
RSH_COMMAND='ssh ${root}@${system} ${command}'
###############################################################################
# F I R E W A L L O P T I O N S
###############################################################################
IP_FORWARDING=On
ACCOUNTING=Yes
ACCOUNTING_TABLE=filter
ADD_IP_ALIASES=No
ADD_SNAT_ALIASES=No
ADMINISABSENTMINDED=Yes
AUTO_COMMENT=Yes
AUTOMAKE=No
BLACKLISTNEWONLY=Yes
CLAMPMSS=Yes
CLEAR_TC=Yes
COMPLETE=No
DISABLE_IPV6=No
DELETE_THEN_ADD=Yes
DETECT_DNAT_IPADDRS=No
DONT_LOAD=
DYNAMIC_BLACKLIST=Yes
EXPAND_POLICIES=Yes
EXPORTMODULES=Yes
FASTACCEPT=No
FORWARD_CLEAR_MARK=
IMPLICIT_CONTINUE=No
HIGH_ROUTE_MARKS=No
IP_FORWARDING=On
KEEP_RT_TABLES=No
LOAD_HELPERS_ONLY=Yes
LEGACY_FASTSTART=No
MACLIST_TABLE=filter
MACLIST_TTL=
MANGLE_ENABLED=Yes
MAPOLDACTIONS=No
MARK_IN_FORWARD_CHAIN=No
MODULE_SUFFIX=ko
MULTICAST=No
MUTEX_TIMEOUT=60
NULL_ROUTE_RFC1918=No
OPTIMIZE=1
OPTIMIZE_ACCOUNTING=No
REQUIRE_INTERFACE=No
RESTORE_DEFAULT_ROUTE=Yes
RETAIN_ALIASES=No
ROUTE_FILTER=No
SAVE_IPSETS=No
TC_ENABLED=Internal
TC_EXPERT=No
TC_PRIOMAP="2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2"
CLEAR_TC=Yes
MARK_IN_FORWARD_CHAIN=No
CLAMPMSS=Yes
ROUTE_FILTER=No
DETECT_DNAT_IPADDRS=No
MUTEX_TIMEOUT=60
ADMINISABSENTMINDED=Yes
BLACKLISTNEWONLY=Yes
DELAYBLACKLISTLOAD=No
MODULE_SUFFIX=ko
DISABLE_IPV6=No
BRIDGING=No
DYNAMIC_ZONES=No
PKTTYPE=Yes
NULL_ROUTE_RFC1918=No
MACLIST_TABLE=filter
MACLIST_TTL=
SAVE_IPSETS=No
MAPOLDACTIONS=No
FASTACCEPT=No
IMPLICIT_CONTINUE=No
HIGH_ROUTE_MARKS=No
USE_ACTIONS=Yes
OPTIMIZE=1
EXPORTPARAMS=No
EXPAND_POLICIES=Yes
KEEP_RT_TABLES=No
DELETE_THEN_ADD=Yes
MULTICAST=No
DONT_LOAD=
AUTO_COMMENT=Yes
MANGLE_ENABLED=Yes
TRACK_PROVIDERS=Yes
USE_DEFAULT_RT=No
RESTORE_DEFAULT_ROUTE=Yes
AUTOMAKE=No
WIDE_TC_MARKS=Yes
TRACK_PROVIDERS=Yes
ZONE2ZONE=2
ACCOUNTING=Yes
DYNAMIC_BLACKLIST=Yes
OPTIMIZE_ACCOUNTING=No
LOAD_HELPERS_ONLY=Yes
REQUIRE_INTERFACE=No
FORWARD_CLEAR_MARK=Yes
COMPLETE=No
###############################################################################
# P A C K E T D I S P O S I T I O N
###############################################################################
@@ -226,6 +212,17 @@ BLACKLIST_DISPOSITION=DROP
MACLIST_DISPOSITION=REJECT
SMURF_DISPOSITION=DROP
SFILTER_DISPOSITION=DROP
TCP_FLAGS_DISPOSITION=DROP
################################################################################
# L E G A C Y O P T I O N
# D O N O T D E L E T E O R A L T E R
################################################################################
IPSECFILE=zones
#LAST LINE -- DO NOT REMOVE

View File

@@ -22,147 +22,163 @@ VERBOSITY=1
# L O G G I N G
###############################################################################
LOGFILE=
STARTUP_LOG=/var/log/shorewall6-init.log
BLACKLIST_LOGLEVEL=
LOG_VERBOSITY=2
LOGFORMAT="Shorewall:%s:%s:"
LOGALLNEW=
LOGTAGONLY=No
LOGFILE=
LOGFORMAT="Shorewall:%s:%s:"
LOGLIMIT=
LOGALLNEW=
LOGTAGONLY=No
BLACKLIST_LOGLEVEL=
MACLIST_LOG_LEVEL=info
TCP_FLAGS_LOG_LEVEL=info
SFILTER_LOG_LEVEL=info
SMURF_LOG_LEVEL=info
STARTUP_LOG=/var/log/shorewall6-init.log
TCP_FLAGS_LOG_LEVEL=info
###############################################################################
# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S
###############################################################################
CONFIG_PATH=/etc/shorewall6:/usr/share/shorewall6:/usr/share/shorewall
IP6TABLES=
IP=
TC=
IPSET=
MODULESDIR=
PERL=/usr/bin/perl
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
RESTOREFILE=
SHOREWALL_SHELL=/bin/sh
SUBSYSLOCK=
MODULESDIR=
CONFIG_PATH=/usr/share/shorewall6:/usr/share/shorewall
RESTOREFILE=
LOCKFILE=
TC=
###############################################################################
# D E F A U L T A C T I O N S / M A C R O S
###############################################################################
DROP_DEFAULT="Drop"
REJECT_DEFAULT="Reject"
ACCEPT_DEFAULT="none"
QUEUE_DEFAULT="none"
DROP_DEFAULT="Drop"
NFQUEUE_DEFAULT="none"
QUEUE_DEFAULT="none"
REJECT_DEFAULT="Reject"
###############################################################################
# R S H / R C P C O M M A N D S
###############################################################################
RSH_COMMAND='ssh ${root}@${system} ${command}'
RCP_COMMAND='scp ${files} ${root}@${system}:${destination}'
RSH_COMMAND='ssh ${root}@${system} ${command}'
###############################################################################
# F I R E W A L L O P T I O N S
###############################################################################
ACCOUNTING=Yes
ACCOUNTING_TABLE=filter
ADMINISABSENTMINDED=Yes
AUTO_COMMENT=Yes
AUTOMAKE=No
BLACKLISTNEWONLY=Yes
CLAMPMSS=No
CLEAR_TC=Yes
COMPLETE=Yes
DELETE_THEN_ADD=Yes
DONT_LOAD=
DYNAMIC_BLACKLIST=Yes
EXPAND_POLICIES=Yes
EXPORTMODULES=Yes
FASTACCEPT=Yes
FORWARD_CLEAR_MARK=
HIGH_ROUTE_MARKS=No
IMPLICIT_CONTINUE=No
IP_FORWARDING=Off
KEEP_RT_TABLES=Yes
LEGACY_FASTSTART=No
LOAD_HELPERS_ONLY=Yes
MACLIST_TABLE=filter
MACLIST_TTL=
MANGLE_ENABLED=Yes
MARK_IN_FORWARD_CHAIN=No
MODULE_SUFFIX=ko
MUTEX_TIMEOUT=60
OPTIMIZE=15
OPTIMIZE_ACCOUNTING=No
REQUIRE_INTERFACE=Yes
TC_ENABLED=No
TC_EXPERT=No
TC_PRIOMAP="2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2"
CLEAR_TC=Yes
MARK_IN_FORWARD_CHAIN=No
CLAMPMSS=No
MUTEX_TIMEOUT=60
ADMINISABSENTMINDED=Yes
BLACKLISTNEWONLY=Yes
MODULE_SUFFIX=ko
FASTACCEPT=Yes
IMPLICIT_CONTINUE=No
HIGH_ROUTE_MARKS=No
OPTIMIZE=15
EXPORTPARAMS=Yes
EXPAND_POLICIES=Yes
KEEP_RT_TABLES=Yes
DELETE_THEN_ADD=Yes
DONT_LOAD=
AUTO_COMMENT=Yes
MANGLE_ENABLED=Yes
AUTOMAKE=No
TRACK_PROVIDERS=Yes
WIDE_TC_MARKS=Yes
TRACK_PROVIDERS=Yes
ZONE2ZONE=2
ACCOUNTING=Yes
OPTIMIZE_ACCOUNTING=No
DYNAMIC_BLACKLIST=Yes
LOAD_HELPERS_ONLY=Yes
REQUIRE_INTERFACE=Yes
FORWARD_CLEAR_MARK=Yes
COMPLETE=Yes
###############################################################################
# P A C K E T D I S P O S I T I O N
###############################################################################
BLACKLIST_DISPOSITION=DROP
MACLIST_DISPOSITION=REJECTTTT
SFILTER_DISPOSITION=DROP
SMURF_DISPOSITION=DROP
TCP_FLAGS_DISPOSITION=DROP
#LAST LINE -- DO NOT REMOVE

View File

@@ -1,19 +1,11 @@
###############################################################################
#
# Shorewall6 version 4 - Sample shorewall.conf for one-interface configuration.
# Copyright (C) 2006,2008 by the Shorewall Team
# Shorewall Version 4 -- /etc/shorewall6/shorewall6.conf
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# For information about the settings in this file, type "man shorewall6.conf"
#
# See the file README.txt for further details.
#
# For information about the settings in this file, type "man shorewall6.conf"
#
# The manpage is also online at
# http://shorewall.net/manpages6/shorewall6.conf.html
# Manpage also online at
# http://www.shorewall.net/manpages6/shorewall6.conf.html
###############################################################################
# S T A R T U P E N A B L E D
###############################################################################
@@ -30,141 +22,163 @@ VERBOSITY=1
# L O G G I N G
###############################################################################
LOGFILE=/var/log/messages
STARTUP_LOG=/var/log/shorewall6-init.log
BLACKLIST_LOGLEVEL=
LOG_VERBOSITY=2
LOGFORMAT="Shorewall:%s:%s:"
LOGALLNEW=
LOGTAGONLY=No
LOGFILE=
LOGFORMAT="Shorewall:%s:%s:"
LOGLIMIT=
LOGALLNEW=
LOGTAGONLY=No
BLACKLIST_LOGLEVEL=
MACLIST_LOG_LEVEL=info
TCP_FLAGS_LOG_LEVEL=info
SFILTER_LOG_LEVEL=info
SMURF_LOG_LEVEL=info
STARTUP_LOG=/var/log/shorewall6-init.log
TCP_FLAGS_LOG_LEVEL=info
###############################################################################
# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S
###############################################################################
CONFIG_PATH=/etc/shorewall6:/usr/share/shorewall6:/usr/share/shorewall
IP6TABLES=
IP=
IPSET=
MODULESDIR=
PERL=/usr/bin/perl
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
RESTOREFILE=
SHOREWALL_SHELL=/bin/sh
SUBSYSLOCK=
MODULESDIR=
CONFIG_PATH=/etc/shorewall6:/usr/share/shorewall6:/usr/share/shorewall
RESTOREFILE=
LOCKFILE=
TC=
###############################################################################
# D E F A U L T A C T I O N S / M A C R O S
###############################################################################
DROP_DEFAULT="Drop"
REJECT_DEFAULT="Reject"
ACCEPT_DEFAULT="none"
QUEUE_DEFAULT="none"
DROP_DEFAULT="Drop"
NFQUEUE_DEFAULT="none"
QUEUE_DEFAULT="none"
REJECT_DEFAULT="Reject"
###############################################################################
# R S H / R C P C O M M A N D S
###############################################################################
RSH_COMMAND='ssh ${root}@${system} ${command}'
RCP_COMMAND='scp ${files} ${root}@${system}:${destination}'
RSH_COMMAND='ssh ${root}@${system} ${command}'
###############################################################################
# F I R E W A L L O P T I O N S
###############################################################################
ACCOUNTING=Yes
ACCOUNTING_TABLE=filter
ADMINISABSENTMINDED=Yes
AUTO_COMMENT=Yes
AUTOMAKE=No
BLACKLISTNEWONLY=Yes
CLAMPMSS=No
CLEAR_TC=Yes
COMPLETE=No
DELETE_THEN_ADD=Yes
DONT_LOAD=
DYNAMIC_BLACKLIST=Yes
EXPAND_POLICIES=No
EXPORTMODULES=Yes
FASTACCEPT=No
FORWARD_CLEAR_MARK=
HIGH_ROUTE_MARKS=No
IMPLICIT_CONTINUE=No
IP_FORWARDING=Off
KEEP_RT_TABLES=Yes
LEGACY_FASTSTART=No
LOAD_HELPERS_ONLY=Yes
MACLIST_TABLE=filter
MACLIST_TTL=
MANGLE_ENABLED=Yes
MARK_IN_FORWARD_CHAIN=No
MODULE_SUFFIX=ko
MUTEX_TIMEOUT=60
OPTIMIZE=1
OPTIMIZE_ACCOUNTING=No
REQUIRE_INTERFACE=No
TC_ENABLED=No
TC_EXPERT=No
TC_PRIOMAP="2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2"
CLEAR_TC=Yes
MARK_IN_FORWARD_CHAIN=No
CLAMPMSS=No
MUTEX_TIMEOUT=60
ADMINISABSENTMINDED=Yes
BLACKLISTNEWONLY=Yes
MODULE_SUFFIX=ko
FASTACCEPT=No
IMPLICIT_CONTINUE=No
HIGH_ROUTE_MARKS=No
OPTIMIZE=1
EXPORTPARAMS=No
EXPAND_POLICIES=No
KEEP_RT_TABLES=Yes
DELETE_THEN_ADD=Yes
DONT_LOAD=
AUTO_COMMENT=Yes
MANGLE_ENABLED=Yes
AUTOMAKE=No
TRACK_PROVIDERS=Yes
WIDE_TC_MARKS=Yes
TRACK_PROVIDERS=Yes
ZONE2ZONE=2
ACCOUNTING=Yes
DYNAMIC_BLACKLIST=Yes
OPTIMIZE_ACCOUNTING=No
LOAD_HELPERS_ONLY=Yes
REQUIRE_INTERFACE=No
FORWARD_CLEAR_MARK=Yes
COMPLETE=No
##############################################################################
###############################################################################
# P A C K E T D I S P O S I T I O N
###############################################################################
BLACKLIST_DISPOSITION=DROP
MACLIST_DISPOSITION=REJECT
SFILTER_DISPOSITION=DROP
SMURF_DISPOSITION=DROP
TCP_FLAGS_DISPOSITION=DROP
#LAST LINE -- DO NOT REMOVE

View File

@@ -1,19 +1,11 @@
###############################################################################
#
# Shorewall6 version 4 - Sample shorewall.conf for one-interface configuration.
# Copyright (C) 2006,2008 by the Shorewall Team
# Shorewall Version 4 -- /etc/shorewall6/shorewall6.conf
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# For information about the settings in this file, type "man shorewall6.conf"
#
# See the file README.txt for further details.
#
# For information about the settings in this file, type "man shorewall6.conf"
#
# The manpage is also online at
# http://shorewall.net/manpages6/shorewall6.conf.html
# Manpage also online at
# http://www.shorewall.net/manpages6/shorewall6.conf.html
###############################################################################
# S T A R T U P E N A B L E D
###############################################################################
@@ -30,141 +22,163 @@ VERBOSITY=1
# L O G G I N G
###############################################################################
LOGFILE=/var/log/messages
STARTUP_LOG=/var/log/shorewall6-init.log
BLACKLIST_LOGLEVEL=
LOG_VERBOSITY=2
LOGFORMAT="Shorewall:%s:%s:"
LOGALLNEW=
LOGTAGONLY=No
LOGFILE=/var/log/messages
LOGFORMAT="Shorewall:%s:%s:"
LOGLIMIT=
LOGALLNEW=
LOGTAGONLY=No
BLACKLIST_LOGLEVEL=
MACLIST_LOG_LEVEL=info
TCP_FLAGS_LOG_LEVEL=info
SFILTER_LOG_LEVEL=info
SMURF_LOG_LEVEL=info
STARTUP_LOG=/var/log/shorewall6-init.log
TCP_FLAGS_LOG_LEVEL=info
###############################################################################
# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S
###############################################################################
CONFIG_PATH=/etc/shorewall6:/usr/share/shorewall6:/usr/share/shorewall
IP6TABLES=
IP=
IPSET=
MODULESDIR=
PERL=/usr/bin/perl
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
RESTOREFILE=
SHOREWALL_SHELL=/bin/sh
SUBSYSLOCK=
MODULESDIR=
CONFIG_PATH=/etc/shorewall6/:/usr/share/shorewall6:/usr/share/shorewall
RESTOREFILE=
LOCKFILE=
TC=
###############################################################################
# D E F A U L T A C T I O N S / M A C R O S
###############################################################################
DROP_DEFAULT="Drop"
REJECT_DEFAULT="Reject"
ACCEPT_DEFAULT="none"
QUEUE_DEFAULT="none"
DROP_DEFAULT="Drop"
NFQUEUE_DEFAULT="none"
QUEUE_DEFAULT="none"
REJECT_DEFAULT="Reject"
###############################################################################
# R S H / R C P C O M M A N D S
###############################################################################
RSH_COMMAND='ssh ${root}@${system} ${command}'
RCP_COMMAND='scp ${files} ${root}@${system}:${destination}'
RSH_COMMAND='ssh ${root}@${system} ${command}'
###############################################################################
# F I R E W A L L O P T I O N S
###############################################################################
ACCOUNTING=Yes
ACCOUNTING_TABLE=filter
ADMINISABSENTMINDED=Yes
AUTO_COMMENT=Yes
AUTOMAKE=No
BLACKLISTNEWONLY=Yes
CLAMPMSS=No
CLEAR_TC=Yes
COMPLETE=No
DELETE_THEN_ADD=Yes
DONT_LOAD=
DYNAMIC_BLACKLIST=Yes
EXPAND_POLICIES=Yes
EXPORTMODULES=Yes
FASTACCEPT=No
FORWARD_CLEAR_MARK=
HIGH_ROUTE_MARKS=No
IMPLICIT_CONTINUE=No
IP_FORWARDING=On
KEEP_RT_TABLES=Yes
LEGACY_FASTSTART=No
LOAD_HELPERS_ONLY=Yes
MACLIST_TABLE=filter
MACLIST_TTL=
MANGLE_ENABLED=Yes
MARK_IN_FORWARD_CHAIN=No
MODULE_SUFFIX=ko
MUTEX_TIMEOUT=60
OPTIMIZE=1
OPTIMIZE_ACCOUNTING=No
REQUIRE_INTERFACE=No
TC_ENABLED=No
TC_EXPERT=No
TC_PRIOMAP="2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2"
CLEAR_TC=Yes
MARK_IN_FORWARD_CHAIN=No
CLAMPMSS=No
MUTEX_TIMEOUT=60
ADMINISABSENTMINDED=Yes
BLACKLISTNEWONLY=Yes
MODULE_SUFFIX=ko
FASTACCEPT=No
IMPLICIT_CONTINUE=No
HIGH_ROUTE_MARKS=No
OPTIMIZE=1
EXPORTPARAMS=No
EXPAND_POLICIES=Yes
KEEP_RT_TABLES=Yes
DELETE_THEN_ADD=Yes
DONT_LOAD=
AUTO_COMMENT=Yes
MANGLE_ENABLED=Yes
AUTOMAKE=No
TRACK_PROVIDERS=Yes
WIDE_TC_MARKS=Yes
TRACK_PROVIDERS=Yes
ZONE2ZONE=2
ACCOUNTING=Yes
DYNAMIC_BLACKLIST=Yes
OPTIMIZE_ACCOUNTING=No
LOAD_HELPERS_ONLY=Yes
REQUIRE_INTERFACE=No
FORWARD_CLEAR_MARK=Yes
COMPLETE=No
###############################################################################
# P A C K E T D I S P O S I T I O N
###############################################################################
BLACKLIST_DISPOSITION=DROP
MACLIST_DISPOSITION=REJECT
SFILTER_DISPOSITION=DROP
SMURF_DISPOSITION=DROP
TCP_FLAGS_DISPOSITION=DROP
#LAST LINE -- DO NOT REMOVE

View File

@@ -15,6 +15,6 @@
#ZONE TYPE OPTIONS IN OUT
# OPTIONS OPTIONS
fw firewall
net ipv4
loc ipv4
dmz ipv4
net ipv6
loc ipv6
dmz ipv6

View File

@@ -1,19 +1,11 @@
###############################################################################
#
# Shorewall version 4.4 - Sample shorewall.conf for one-interface configuration.
# Copyright (C) 2006 by the Shorewall Team
# Shorewall Version 4 -- /etc/shorewall6/shorewall6.conf
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# For information about the settings in this file, type "man shorewall6.conf"
#
# See the file README.txt for further details.
#
# For information about the settings in this file, type "man shorewall6.conf"
#
# The manpage is also online at
# http://shorewall.net/manpages6/shorewall6.conf.html
# Manpage also online at
# http://www.shorewall.net/manpages6/shorewall6.conf.html
###############################################################################
# S T A R T U P E N A B L E D
###############################################################################
@@ -30,141 +22,163 @@ VERBOSITY=1
# L O G G I N G
###############################################################################
LOGFILE=/var/log/messages
STARTUP_LOG=/var/log/shorewall6-init.log
BLACKLIST_LOGLEVEL=
LOG_VERBOSITY=2
LOGFORMAT="Shorewall:%s:%s:"
LOGALLNEW=
LOGTAGONLY=No
LOGFILE=/var/log/messages
LOGFORMAT="Shorewall:%s:%s:"
LOGLIMIT=
LOGALLNEW=
LOGTAGONLY=No
BLACKLIST_LOGLEVEL=
MACLIST_LOG_LEVEL=info
TCP_FLAGS_LOG_LEVEL=info
SFILTER_LOG_LEVEL=info
SMURF_LOG_LEVEL=info
STARTUP_LOG=/var/log/shorewall6-init.log
TCP_FLAGS_LOG_LEVEL=info
###############################################################################
# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S
###############################################################################
CONFIG_PATH=/etc/shorewall6:/usr/share/shorewall6:/usr/share/shorewall
IP6TABLES=
IP=
IPSET=
MODULESDIR=
PERL=/usr/bin/perl
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
RESTOREFILE=
SHOREWALL_SHELL=/bin/sh
SUBSYSLOCK=
MODULESDIR=
CONFIG_PATH=/etc/shorewall6/:/usr/share/shorewall6:/usr/share/shorewall/
RESTOREFILE=
LOCKFILE=
TC=
###############################################################################
# D E F A U L T A C T I O N S / M A C R O S
###############################################################################
DROP_DEFAULT="Drop"
REJECT_DEFAULT="Reject"
ACCEPT_DEFAULT="none"
QUEUE_DEFAULT="none"
DROP_DEFAULT="Drop"
NFQUEUE_DEFAULT="none"
QUEUE_DEFAULT="none"
REJECT_DEFAULT="Reject"
###############################################################################
# R S H / R C P C O M M A N D S
###############################################################################
RSH_COMMAND='ssh ${root}@${system} ${command}'
RCP_COMMAND='scp ${files} ${root}@${system}:${destination}'
RSH_COMMAND='ssh ${root}@${system} ${command}'
###############################################################################
# F I R E W A L L O P T I O N S
###############################################################################
ACCOUNTING=Yes
ACCOUNTING_TABLE=filter
ADMINISABSENTMINDED=Yes
AUTO_COMMENT=Yes
AUTOMAKE=No
BLACKLISTNEWONLY=Yes
CLAMPMSS=No
CLEAR_TC=Yes
COMPLETE=No
DELETE_THEN_ADD=Yes
DONT_LOAD=
DYNAMIC_BLACKLIST=Yes
EXPAND_POLICIES=No
EXPORTMODULES=Yes
FASTACCEPT=No
FORWARD_CLEAR_MARK=
HIGH_ROUTE_MARKS=No
IMPLICIT_CONTINUE=No
IP_FORWARDING=On
KEEP_RT_TABLES=Yes
LEGACY_FASTSTART=No
LOAD_HELPERS_ONLY=Yes
MACLIST_TABLE=filter
MACLIST_TTL=
MANGLE_ENABLED=Yes
MARK_IN_FORWARD_CHAIN=No
MODULE_SUFFIX=ko
MUTEX_TIMEOUT=60
OPTIMIZE=1
OPTIMIZE_ACCOUNTING=No
REQUIRE_INTERFACE=No
TC_ENABLED=No
TC_EXPERT=No
TC_PRIOMAP="2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2"
CLEAR_TC=Yes
MARK_IN_FORWARD_CHAIN=No
CLAMPMSS=No
MUTEX_TIMEOUT=60
ADMINISABSENTMINDED=Yes
BLACKLISTNEWONLY=Yes
MODULE_SUFFIX=ko
FASTACCEPT=No
IMPLICIT_CONTINUE=No
HIGH_ROUTE_MARKS=No
OPTIMIZE=1
EXPORTPARAMS=No
EXPAND_POLICIES=No
KEEP_RT_TABLES=Yes
DELETE_THEN_ADD=Yes
DONT_LOAD=
AUTO_COMMENT=Yes
MANGLE_ENABLED=Yes
AUTOMAKE=No
TRACK_PROVIDERS=Yes
WIDE_TC_MARKS=Yes
TRACK_PROVIDERS=Yes
ZONE2ZONE=2
ACCOUNTING=Yes
DYNAMIC_BLACKLIST=Yes
OPTIMIZE_ACCOUNTING=No
LOAD_HELPERS_ONLY=Yes
REQUIRE_INTERFACE=No
FORWARD_CLEAR_MARK=Yes
COMPLETE=No
###############################################################################
# P A C K E T D I S P O S I T I O N
###############################################################################
BLACKLIST_DISPOSITION=DROP
MACLIST_DISPOSITION=REJECT
SFILTER_DISPOSITION=DROP
SMURF_DISPOSITION=DROP
TCP_FLAGS_DISPOSITION=DROP
#LAST LINE -- DO NOT REMOVE

View File

@@ -2,7 +2,8 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

View File

@@ -22,6 +22,52 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
Debian_SuSE_ppp() {
NEWPRODUCTS=
INTERFACE="$1"
case $0 in
/etc/ppp/ip-*)
#
# IPv4
#
for product in $PRODUCTS; do
case $product in
shorewall|shorewall-lite)
NEWPRODUCTS="$NEWPRODUCTS $product";
;;
esac
done
;;
/etc/ppp/ipv6-*)
#
# IPv6
#
for product in $PRODUCTS; do
case $product in
shorewall6|shorewall6-lite)
NEWPRODUCTS="$NEWPRODUCTS $product";
;;
esac
done
;;
*)
exit 0
;;
esac
PRODUCTS="$NEWPRODUCTS"
case $0 in
*up/*)
COMMAND=up
;;
*)
COMMAND=down
;;
esac
}
IFUPDOWN=0
PRODUCTS=
@@ -34,57 +80,103 @@ fi
[ "$IFUPDOWN" = 1 -a -n "$PRODUCTS" ] || exit 0
if [ -f /etc/debian_version ]; then
#
# Debian ifupdown system
#
if [ "$MODE" = start ]; then
COMMAND=up
elif [ "$MODE" = stop ]; then
COMMAND=down
else
exit 0
fi
case $0 in
/etc/ppp*)
#
# Debian ppp
#
Debian_SuSE_ppp
;;
*)
#
# Debian ifupdown system
#
INTERFACE="$IFACE"
case "$PHASE" in
pre-*)
exit 0
if [ "$MODE" = start ]; then
COMMAND=up
elif [ "$MODE" = stop ]; then
COMMAND=down
else
exit 0
fi
case "$PHASE" in
pre-*)
exit 0
;;
esac
;;
esac
elif [ -f /etc/SuSE-release ]; then
#
# SuSE ifupdown system
#
IFACE="$2"
case $0 in
*if-up.d*)
COMMAND=up
;;
*if-down.d*)
COMMAND=down
/etc/ppp*)
#
# SUSE ppp
#
Debian_SuSE_ppp
;;
*)
exit 0
#
# SuSE ifupdown system
#
INTERFACE="$2"
case $0 in
*if-up.d*)
COMMAND=up
;;
*if-down.d*)
COMMAND=down
;;
*)
exit 0
;;
esac
;;
esac
else
#
# Assume RedHat/Fedora/CentOS/Foobar/...
#
IFACE="$1"
case $0 in
*ifup*)
COMMAND=up
;;
*ifdown*)
COMMAND=down
;;
*dispatcher.d*)
COMMAND="$2"
case $0 in
/etc/ppp*)
INTERFACE="$1"
case $0 in
*ip-up.local)
COMMAND=up
;;
*ip-down.local)
COMMAND=down
;;
*)
exit 0
;;
esac
;;
*)
exit 0
#
# RedHat ifup/down system
#
INTERFACE="$1"
case $0 in
*ifup*)
COMMAND=up
;;
*ifdown*)
COMMAND=down
;;
*dispatcher.d*)
COMMAND="$2"
;;
*)
exit 0
;;
esac
;;
esac
fi
@@ -95,7 +187,7 @@ for PRODUCT in $PRODUCTS; do
if [ -x $VARDIR/firewall ]; then
( . /usr/share/$PRODUCT/lib.base
mutex_on
${VARDIR}/firewall -V0 $COMMAND $IFACE || echo_notdone
${VARDIR}/firewall -V0 $COMMAND $INTERFACE || echo_notdone
mutex_off
)
fi

View File

@@ -29,7 +29,7 @@
# Required-start: $local_fs
# Required-stop: $local_fs
# Default-Start: 2 3 5
# Default-Stop:
# Default-Stop: 6
# Short-Description: Initialize the firewall at boot time
# Description: Place the firewall in a safe state at boot time
# prior to bringing up the network.
@@ -69,6 +69,10 @@ shorewall_start () {
fi
done
if [ -n "$SAVE_IPSETS" -a -f "$SAVE_IPSETS" ]; then
ipset -R < "$SAVE_IPSETS"
fi
return 0
}
@@ -86,6 +90,13 @@ shorewall_stop () {
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"
fi
fi
return 0
}

View File

@@ -4,7 +4,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 2000-2011 - Tom Eastep (teastep@shorewall.net)
# (c) 2010 - Roberto C. Sanchez (roberto@connexer.com)
#
# Shorewall documentation is available at http://shorewall.net
@@ -23,7 +23,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
VERSION=4.4.13.1
VERSION=4.4.21
usage() # $1 = exit status
{
@@ -88,9 +88,6 @@ install_file() # $1 = source $2 = target $3 = mode
[ -n "$DESTDIR" ] || DESTDIR="$PREFIX"
#
# Parse the run line
#
# DEST is the SysVInit script directory
# INIT is the name of the script in the $DEST directory
# ARGS is "yes" if we've already parsed an argument
@@ -124,6 +121,16 @@ done
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
[ -n "${LIBEXEC:=/usr/share}" ]
case "$LIBEXEC" in
/*)
;;
*)
LIBEXEC=/usr/${LIBEXEC}
;;
esac
#
# Determine where to install the firewall script
#
@@ -259,9 +266,9 @@ fi
# Install the ifupdown script
#
mkdir -p ${DESTDIR}/usr/share/shorewall-init
mkdir -p ${DESTDIR}${LIBEXEC}/shorewall-init
install_file ifupdown.sh ${DESTDIR}/usr/share/shorewall-init/ifupdown 0544
install_file ifupdown.sh ${DESTDIR}${LIBEXEC}/shorewall-init/ifupdown 0544
if [ -d ${DESTDIR}/etc/NetworkManager ]; then
install_file ifupdown.sh ${DESTDIR}/etc/NetworkManager/dispatcher.d/01-shorewall 0544
@@ -285,11 +292,8 @@ fi
if [ -z "$DESTDIR" ]; then
if [ -n "$first_install" ]; then
if [ -n "$DEBIAN" ]; then
if [ -x /sbin/insserv ]; then
insserv /etc/init.d/shorewall-init
else
ln -sf ../init.d/shorewall-init /etc/rcS.d/S38shorewall-init
fi
update-rc.d shorewall-init defaults
echo "Shorewall Init will start automatically at boot"
else
@@ -315,6 +319,7 @@ if [ -z "$DESTDIR" ]; then
elif [ "$INIT" != rc.firewall ]; then #Slackware starts this automatically
cant_autostart
fi
fi
fi
else
@@ -330,6 +335,32 @@ else
fi
fi
if [ -f ${DESTDIR}/etc/ppp ]; then
if [ -n "$DEBIAN" ] -o -n "$SUSE" ]; then
for directory in ip-up.d ip-down.d ipv6-up.d ipv6-down.d; do
mkdir -p ${DESTDIR}/etc/ppp/$directory #SuSE doesn't create the IPv6 directories
cp -fp ${DESTDIR}${LIBEXEC}/shorewall-init/ifupdown ${DESTDIR}/etc/ppp/$directory/shorewall
done
elif [ -n "$REDHAT" ]; then
#
# Must use the dreaded ip_xxx.local file
#
for file in ip-up.local ip-down.local; do
FILE=${DESTDIR}/etc/ppp/$file
if [ -f $FILE ]; then
if fgrep -q Shorewall-based $FILE ; then
cp -fp ${DESTDIR}${LIBEXEC}/shorewall-init/ifupdown $FILE
else
echo "$FILE already exists -- ppp devices will not be handled"
break
fi
else
cp -fp ${DESTDIR}${LIBEXEC}/shorewall-init/ifupdown $FILE
fi
done
fi
fi
#
# Report Success
#

View File

@@ -1,6 +1,6 @@
%define name shorewall-init
%define version 4.4.13
%define release 1
%define version 4.4.21
%define release 0base
Summary: Shorewall-init adds functionality to Shoreline Firewall (Shorewall).
Name: %{name}
@@ -53,6 +53,12 @@ fi
if [ -f /etc/SuSE-release ]; then
cp -pf /usr/share/shorewall-init/ifupdown /etc/sysconfig/network/if-up.d/shorewall
cp -pf /usr/share/shorewall-init/ifupdown /etc/sysconfig/network/if-down.d/shorewall
if [ -d /etc/ppp ]; then
for directory in ip-up.d ip-down.d ipv6-up.d ipv6-down.d; do
mkdir -p /etc/ppp/$directory
cp -pf /usr/share/shorewall-init/ifupdown /etc/ppp/$directory/shorewall
done
fi
else
if [ -f /sbin/ifup-local -o -f /sbin/ifdown-local ]; then
if ! grep -q Shorewall /sbin/ifup-local || ! grep -q Shorewall /sbin/ifdown-local; then
@@ -66,6 +72,17 @@ else
cp -pf /usr/share/shorewall-init/ifupdown /sbin/ifdown-local
fi
if [ -d /etc/ppp ]; then
if [ -f /etc/ppp/ip-up.local -o -f /etc/ppp/ip-down.local ]; then
if ! grep -q Shorewall-based /etc/ppp/ip-up.local || ! grep -q Shorewall-based /etc/ppp//ip-down.local; then
echo "WARNING: /etc/ppp/ip-up.local and/or /etc/ppp/ip-down.local already exist; ppp devices will not be handled" >&2
fi
else
cp -pf /usr/share/shorewall-init/ifupdown /etc/ppp/ip-up.local
cp -pf /usr/share/shorewall-init/ifupdown /etc/ppp/ip-down.local
fi
fi
if [ -d /etc/NetworkManager/dispatcher.d/ ]; then
cp -pf /usr/share/shorewall-init/ifupdown /etc/NetworkManager/dispatcher.d/01-shorewall
fi
@@ -83,6 +100,9 @@ if [ $1 -eq 0 ]; then
[ -f /sbin/ifup-local ] && grep -q Shorewall /sbin/ifup-local && rm -f /sbin/ifup-local
[ -f /sbin/ifdown-local ] && grep -q Shorewall /sbin/ifdown-local && rm -f /sbin/ifdown-local
[ -f /etc/ppp/ip-up.local ] && grep -q Shorewall-based /etc/ppp/ip-up.local && rm -f /etc/ppp/ip-up.local
[ -f /etc/ppp/ip-down.local ] && grep -q Shorewall-based /etc/ppp/ip-down.local && rm -f /etc/ppp/ip-down.local
rm -f /etc/NetworkManager/dispatcher.d/01-shorewall
fi
@@ -99,10 +119,110 @@ fi
%doc COPYING changelog.txt releasenotes.txt
%changelog
* Wed Sep 22 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.13-1
* Mon Sep 20 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.13-0base
* Wed Jul 06 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0base
* Mon Jul 04 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0RC3
* Sun Jul 03 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0RC2
* Thu Jun 23 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0RC1
* Sun Jun 19 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0Beta3
* Sat Jun 18 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0Beta2
* Tue Jun 07 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0Beta1
* Mon Jun 06 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-1
* Tue May 31 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0base
* Fri May 27 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0RC1
* Tue May 24 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0Beta5
* Sun May 22 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0Beta4
* Wed May 18 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0Beta3
* Wed May 18 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0Beta2
* Sat Apr 16 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-1
* Sat Apr 09 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-0base
* Sun Apr 03 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-0RC1
* Sun Apr 03 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-0Beta5
* Sat Apr 02 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-0Beta4
* Sat Mar 26 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-0Beta3
* Sat Mar 05 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-0Beta1
* Wed Mar 02 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.18-0base
* Mon Feb 28 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.18-0RC1
* Sun Feb 20 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.18-0Beta4
* Sat Feb 19 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.18-0Beta3
* Sun Feb 13 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.18-0Beta2
* Sat Feb 05 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.18-0Beta1
* Fri Feb 04 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.17-0base
* Sun Jan 30 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.17-0RC1
* Fri Jan 28 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.17-0Beta3
* Wed Jan 19 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.17-0Beta2
* Sat Jan 08 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.17-0Beta1
* Mon Jan 03 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0base
* Thu Dec 30 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0RC1
* Thu Dec 30 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta8
* Sun Dec 26 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta7
* Mon Dec 20 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta6
* Fri Dec 10 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta5
* Sat Dec 04 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta4
* Fri Dec 03 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta3
* Fri Dec 03 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta2
* Tue Nov 30 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta1
* Fri Nov 26 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.15-0base
* Mon Nov 22 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.15-0RC1
* Mon Nov 15 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.15-0Beta2
* Sat Oct 30 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.15-0Beta1
* Sat Oct 23 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.14-0base
* Wed Oct 06 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.14-0RC1
* Fri Oct 01 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.14-0Beta4
* Sun Sep 26 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.14-0Beta3
* Thu Sep 23 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.14-0Beta2
* Tue Sep 21 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.14-0Beta1
* Fri Sep 17 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.13-0RC1
* Fri Sep 17 2010 Tom Eastep tom@shorewall.net

View File

@@ -10,3 +10,9 @@ PRODUCTS=""
# ifup/ifdown and NetworkManager events
#
IFUPDOWN=0
#
# Set this to the name of the file that is to hold
# ipset contents. Shorewall-init will load those ipsets
# during 'start' and will save them there during 'stop'.
#
SAVE_IPSETS=""

View File

@@ -1,10 +1,10 @@
#!/bin/sh
\#!/bin/sh
#
# Script to back uninstall Shoreline Firewall
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 2000-2011 - Tom Eastep (teastep@shorewall.net)
#
# Shorewall documentation is available at http://shorewall.sourceforge.net
#
@@ -26,7 +26,7 @@
# You may only use this script to uninstall the version
# shown below. Simply run this script to remove Shorewall Firewall
VERSION=4.4.13.1
VERSION=4.4.21
usage() # $1 = exit status
{
@@ -60,12 +60,16 @@ else
VERSION=""
fi
[ -n "${LIBEXEC:=/usr/share}" ]
echo "Uninstalling Shorewall Init $VERSION"
INITSCRIPT=/etc/init.d/shorewall-init
if [ -n "$INITSCRIPT" ]; then
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
if [ -x /usr/sbin/updaterc.d ]; then
updaterc.d shorewall-init remove
elif [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
insserv -r $INITSCRIPT
elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
chkconfig --del $(basename $INITSCRIPT)
@@ -90,7 +94,20 @@ remove_file /etc/network/if-down.d/shorewall
remove_file /etc/sysconfig/network/if-up.d/shorewall
remove_file /etc/sysconfig/network/if-down.d/shorewall
if [ -d /etc/ppp ]; then
for directory in ip-up.d ip-down.d ipv6-up.d ipv6-down.d; do
remove_file /etc/ppp/$directory/shorewall
done
for file in if-up.local if-down.local; do
if fgrep -q Shorewall-based /etc/ppp/$FILE; then
remove_file /etc/ppp/$FILE
fi
done
fi
rm -rf /usr/share/shorewall-init
rm -rf ${LIBEXEC}/shorewall-init
echo "Shorewall Init Uninstalled"

View File

@@ -2,7 +2,8 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

View File

@@ -17,10 +17,9 @@ SRWL=/sbin/shorewall-lite
SRWL_OPTS="-tvv"
test -n ${INITLOG:=/var/log/shorewall-lite-init.log}
[ "$INITLOG" eq "/dev/null" && SHOREWALL_INIT_SCRIPT=1 || SHOREWALL_INIT_SCRIPT=0
[ "$INITLOG" = "/dev/null" ] && SHOREWALL_INIT_SCRIPT=1 || SHOREWALL_INIT_SCRIPT=0
export SHOREWALL_INIT_SCRIPT
test -x $SRWL || exit 0
test -x $WAIT_FOR_IFUP || exit 0
test -n "$INITLOG" || {

View File

@@ -4,7 +4,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 2000-2011 - Tom Eastep (teastep@shorewall.net)
#
# Shorewall documentation is available at http://shorewall.net
#
@@ -22,7 +22,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
VERSION=4.4.13.1
VERSION=4.4.21
usage() # $1 = exit status
{
@@ -123,6 +123,16 @@ done
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
[ -n "${LIBEXEC:=/usr/share}" ]
case "$LIBEXEC" in
/*)
;;
*)
LIBEXEC=/usr/${LIBEXEC}
;;
esac
#
# Determine where to install the firewall script
#
@@ -189,6 +199,7 @@ else
rm -rf ${DESTDIR}/etc/shorewall-lite
rm -rf ${DESTDIR}/usr/share/shorewall-lite
rm -rf ${DESTDIR}/var/lib/shorewall-lite
[ "$LIBEXEC" = share ] || rm -rf /usr/share/shorewall-lite/shorecap /usr/share/shorecap
fi
#
@@ -204,6 +215,8 @@ delete_file ${DESTDIR}/usr/share/shorewall-lite/xmodules
install_file shorewall-lite ${DESTDIR}/sbin/shorewall-lite 0544
eval sed -i \'``s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/shorewall-lite
echo "Shorewall Lite control program installed in ${DESTDIR}/sbin/shorewall-lite"
#
@@ -225,6 +238,7 @@ echo "Shorewall Lite script installed in ${DESTDIR}${DEST}/$INIT"
#
mkdir -p ${DESTDIR}/etc/shorewall-lite
mkdir -p ${DESTDIR}/usr/share/shorewall-lite
mkdir -p ${DESTDIR}${LIBEXEC}/shorewall-lite
mkdir -p ${DESTDIR}/var/lib/shorewall-lite
chmod 755 ${DESTDIR}/etc/shorewall-lite
@@ -277,24 +291,24 @@ echo "Common functions linked through ${DESTDIR}/usr/share/shorewall-lite/functi
# Install Shorecap
#
install_file shorecap ${DESTDIR}/usr/share/shorewall-lite/shorecap 0755
install_file shorecap ${DESTDIR}${LIBEXEC}/shorewall-lite/shorecap 0755
echo
echo "Capability file builder installed in ${DESTDIR}/usr/share/shorewall-lite/shorecap"
echo "Capability file builder installed in ${DESTDIR}${LIBEXEC}/shorewall-lite/shorecap"
#
# Install wait4ifup
#
if [ -f wait4ifup ]; then
install_file wait4ifup ${DESTDIR}/usr/share/shorewall-lite/wait4ifup 0755
install_file wait4ifup ${DESTDIR}${LIBEXEC}/shorewall-lite/wait4ifup 0755
echo
echo "wait4ifup installed in ${DESTDIR}/usr/share/shorewall-lite/wait4ifup"
echo "wait4ifup installed in ${DESTDIR}${LIBEXEC}/shorewall-lite/wait4ifup"
fi
#
# Install the Modules file
# Install the Modules files
#
if [ -f modules ]; then
@@ -302,6 +316,16 @@ if [ -f modules ]; then
echo "Modules file installed as ${DESTDIR}/usr/share/shorewall-lite/modules"
fi
if [ -f helpers ]; then
run_install $OWNERSHIP -m 0600 helpers ${DESTDIR}/usr/share/shorewall-lite
echo "Helper modules file installed as ${DESTDIR}/usr/share/shorewall-lite/helpers"
fi
for f in modules.*; do
run_install $OWNERSHIP -m 0644 $f ${DESTDIR}/usr/share/shorewall-lite/$f
echo "Module file $f installed as ${DESTDIR}/usr/share/shorewall-lite/$f"
done
#
# Install the Man Pages
#
@@ -355,6 +379,8 @@ if [ -z "$DESTDIR" ]; then
if [ -n "$DEBIAN" ]; then
run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall-lite
update-rc.d shorewall-lite defaults
if [ -x /sbin/insserv ]; then
insserv /etc/init.d/shorewall-lite
else

View File

@@ -1,10 +1,10 @@
#!/bin/sh
#
# Shorewall Lite Packet Filtering Firewall Control Program - V4.1
# Shorewall Lite Packet Filtering Firewall Control Program - V4.4
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2006,2007,2008,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 2006,2007,2008,2009,2010,2011 - Tom Eastep (teastep@shorewall.net)
#
# This file should be placed in /sbin/shorewall-lite.
#
@@ -94,9 +94,9 @@ get_config() {
[ -z "$LOGFILE" ] && LOGFILE=/var/log/messages
if ( ps ax 2> /dev/null | grep -v grep | qt grep 'syslogd.*-C' ) ; then
LOGREAD="logread | tac"
g_logread="logread | tac"
elif [ -r $LOGFILE ]; then
LOGREAD="tac $LOGFILE"
g_logread="tac $LOGFILE"
else
echo "LOGFILE ($LOGFILE) does not exist!" >&2
exit 2
@@ -113,10 +113,6 @@ get_config() {
[ -n "$FW" ] || FW=fw
[ -n "LOGFORMAT" ] && LOGFORMAT="${LOGFORMAT%%%*}"
[ -n "$LOGFORMAT" ] || LOGFORMAT="Shorewall:"
if [ -n "$IPTABLES" ]; then
if [ ! -x "$IPTABLES" ]; then
echo " ERROR: The program specified in IPTABLES does not exist or is not executable" >&2
@@ -145,6 +141,12 @@ get_config() {
[ -n "$g_use_verbosity" ] && VERBOSITY=$g_use_verbosity || VERBOSITY=$(($g_verbose_offset + $VERBOSITY))
if [ $VERBOSITY -lt -1 ]; then
VERBOSITY=-1
elif [ $VERBOSITY -gt 2 ]; then
VERBOSITY=2
fi
g_hostname=$(hostname 2> /dev/null)
IP=$(mywhich ip 2> /dev/null)
@@ -175,6 +177,15 @@ verify_firewall_script() {
fi
}
#
# Fatal error
#
startup_error() {
echo " ERROR: $@" >&2
kill $$
exit 1
}
#
# Start Command Executor
#
@@ -463,6 +474,13 @@ g_use_verbosity=
g_noroutes=
g_timestamp=
g_recovering=
g_logread=
#
# Make sure that these variables are cleared
#
VERBOSE=
VERBOSITY=
finished=0
@@ -552,6 +570,7 @@ MUTEX_TIMEOUT=
SHAREDIR=/usr/share/shorewall-lite
CONFDIR=/etc/shorewall-lite
g_product="Shorewall Lite"
g_libexec=share
[ -f ${CONFDIR}/vardir ] && . ${CONFDIR}/vardir ]

View File

@@ -21,6 +21,7 @@
###############################################################################
# V E R B O S I T Y
###############################################################################
VERBOSITY=
###############################################################################
@@ -29,8 +30,6 @@ VERBOSITY=
LOGFILE=
LOGFORMAT=
###############################################################################
# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S
###############################################################################

View File

@@ -1,6 +1,6 @@
%define name shorewall-lite
%define version 4.4.13
%define release 1
%define version 4.4.21
%define release 0base
Summary: Shoreline Firewall Lite is an iptables-based firewall for Linux systems.
Name: %{name}
@@ -90,7 +90,8 @@ fi
%attr(0644,root,root) /usr/share/shorewall-lite/lib.base
%attr(0644,root,root) /usr/share/shorewall-lite/lib.cli
%attr(0644,root,root) /usr/share/shorewall-lite/lib.common
%attr(0644,root,root) /usr/share/shorewall-lite/modules
%attr(0644,root,root) /usr/share/shorewall-lite/modules*
%attr(0644,root,root) /usr/share/shorewall-lite/helpers
%attr(0544,root,root) /usr/share/shorewall-lite/shorecap
%attr(0755,root,root) /usr/share/shorewall-lite/wait4ifup
@@ -102,10 +103,112 @@ fi
%doc COPYING changelog.txt releasenotes.txt
%changelog
* Wed Sep 22 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.13-1
* Mon Sep 20 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.13-0base
* Wed Jul 06 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0base
* Mon Jul 04 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0RC3
* Sun Jul 03 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0RC2
* Thu Jun 23 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0RC1
* Sun Jun 19 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0Beta3
* Sat Jun 18 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0Beta2
* Tue Jun 07 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0Beta1
* Mon Jun 06 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-1
* Tue May 31 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0base
* Fri May 27 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0RC1
* Tue May 24 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0Beta5
* Sun May 22 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0Beta4
* Thu May 19 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0Beta3
* Wed May 18 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0Beta2
* Sat Apr 16 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0Beta1
* Wed Apr 13 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-1
* Sat Apr 09 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-0base
* Sun Apr 03 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-0RC1
* Sun Apr 03 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-0Beta5
* Sat Apr 02 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-0Beta4
* Sat Mar 26 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-0Beta3
* Sat Mar 05 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-0Beta1
* Wed Mar 02 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.18-0base
* Mon Feb 28 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.18-0RC1
* Sun Feb 20 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.18-0Beta4
* Sat Feb 19 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.18-0Beta3
* Sun Feb 13 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.18-0Beta2
* Sat Feb 05 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.18-0Beta1
* Fri Feb 04 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.17-0base
* Sun Jan 30 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.17-0RC1
* Fri Jan 28 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.17-0Beta3
* Wed Jan 19 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.17-0Beta2
* Sat Jan 08 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.17-0Beta1
* Mon Jan 03 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0base
* Thu Dec 30 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0RC1
* Thu Dec 30 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta8
* Sun Dec 26 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta7
* Mon Dec 20 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta6
* Fri Dec 10 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta5
* Sat Dec 04 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta4
* Fri Dec 03 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta3
* Fri Dec 03 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta2
* Tue Nov 30 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta1
* Fri Nov 26 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.15-0base
* Mon Nov 22 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.15-0RC1
* Mon Nov 15 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.15-0Beta2
* Sat Oct 30 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.15-0Beta1
* Sat Oct 23 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.14-0base
* Wed Oct 06 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.14-0RC1
* Fri Oct 01 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.14-0Beta4
* Sun Sep 26 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.14-0Beta3
* Thu Sep 23 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.14-0Beta2
* Tue Sep 21 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.14-0Beta1
* Fri Sep 17 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.13-0RC1
* Fri Sep 17 2010 Tom Eastep tom@shorewall.net

View File

@@ -4,7 +4,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 2000-2011 - Tom Eastep (teastep@shorewall.net)
#
# Shorewall documentation is available at http://shorewall.sourceforge.net
#
@@ -26,7 +26,7 @@
# You may only use this script to uninstall the version
# shown below. Simply run this script to remove Shorewall Firewall
VERSION=4.4.13.1
VERSION=4.4.21
usage() # $1 = exit status
{
@@ -72,6 +72,8 @@ else
VERSION=""
fi
[ -n "${LIBEXEC:=/usr/share}" ]
echo "Uninstalling Shorewall Lite $VERSION"
if qt iptables -L shorewall -n && [ ! -f /sbin/shorewall ]; then
@@ -85,7 +87,9 @@ else
fi
if [ -n "$FIREWALL" ]; then
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
if [ -x /usr/sbin/updaterc.d ]; then
updaterc.d shorewall-lite remove
elif [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
insserv -r $FIREWALL
elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
chkconfig --del $(basename $FIREWALL)
@@ -105,9 +109,10 @@ rm -rf /etc/shorewall-lite-*.bkout
rm -rf /var/lib/shorewall-lite
rm -rf /var/lib/shorewall-lite-*.bkout
rm -rf /usr/share/shorewall-lite
rm -rf ${LIBEXEC}/shorewall-lite
rm -rf /usr/share/shorewall-lite-*.bkout
rm -f /etc/logrotate.d/shorewall-lite
echo "Shorewall Uninstalled"
echo "Shorewall Lite Uninstalled"

View File

@@ -2,7 +2,8 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

View File

@@ -224,7 +224,7 @@ while : ; do
# One of the interfaces changed state -- restart Shorewall
#
echo $if1_state > $VARDIR/${IF1}.status
echo $if2_state > $VARDIR/${IF2}.status
echo $if2_state > $VARDIR/${IF2}.status
eval $COMMAND
state_changed=
fi

View File

@@ -32,7 +32,7 @@
### BEGIN INIT INFO
# Provides: swping
# Required-Start: shorewall
# Should-Start:
# Should-Start:
# Required-Stop:
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
@@ -87,7 +87,7 @@ case "$command" in
echo "swping is running"
exit 0
else
echo "swping is stopped"
echo "swping is stopped"
exit 3
fi
;;

View File

@@ -0,0 +1,15 @@
#
# Shorewall version 4 - Audited AllowICMPs Macro
#
# /usr/share/shorewall/macro.AAllowICMPs
#
# This macro A_ACCEPTs needed ICMP types
#
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/
# PORT(S) PORT(S) LIMIT GROUP
COMMENT Needed ICMP types
A_ACCEPT - - icmp fragmentation-needed
A_ACCEPT - - icmp time-exceeded

View File

@@ -0,0 +1,14 @@
#
# Shorewall version 4 - Audited DropDNSrep Macro
#
# /usr/share/shorewall/macro.ADropDNSrep
#
# This macro silently audites and drops DNS UDP replies
#
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/
# PORT(S) PORT(S) LIMIT GROUP
COMMENT Late DNS Replies
A_DROP - - udp - 53

View File

@@ -0,0 +1,14 @@
#
# Shorewall version 4 - ADropUPnP Macro
#
# /usr/share/shorewall/macro.ADropUPnP
#
# This macro silently drops UPnP probes on UDP port 1900
#
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/
# PORT(S) PORT(S) LIMIT GROUP
COMMENT UPnP
A_DROP - - udp 1900

View File

@@ -11,5 +11,6 @@
COMMENT Needed ICMP types
ACCEPT - - icmp fragmentation-needed
ACCEPT - - icmp time-exceeded
DEFAULT ACCEPT
PARAM - - icmp fragmentation-needed
PARAM - - icmp time-exceeded

View File

@@ -5,7 +5,7 @@
#
# This macro handles BitTorrent traffic for BitTorrent 3.1 and earlier.
#
# If you are running BitTorrent 3.2 or later, you should use the
# If you are running BitTorrent 3.2 or later, you should use the
# BitTorrent32 macro.
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/

View File

@@ -11,4 +11,5 @@
COMMENT Late DNS Replies
DROP - - udp - 53
DEFAULT DROP
PARAM - - udp - 53

View File

@@ -11,4 +11,5 @@
COMMENT UPnP
DROP - - udp 1900
DEFAULT DROP
PARAM - - udp 1900

View File

@@ -0,0 +1,11 @@
#
# Shorewall version 4 - ICPV2 Macro
#
# /usr/share/shorewall/macro.ICPV2
#
# This macro handles Internet Cache Protocol V2 (Squid) traffic
#
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/
# PORT(S) PORT(S) LIMIT GROUP
PARAM - - udp 3130

View File

@@ -15,7 +15,7 @@
# Example for a two-interface firewall which acts as a print
# server for loc:
# IPPserver/ACCEPT loc $FW
#
#
# NOTE: If you want both to serve requests for local printers and
# listen to requests for remote printers (i.e. your CUPS server is
# also a client), you need to apply the rule twice, e.g.

View File

@@ -13,5 +13,5 @@
PARAM - - tcp 8080 # HTTP port
PARAM - - tcp 6544 # HTTP port
PARAM - - tcp 6543 # InfoService port
HTTPS/PARAM
SSH/PARAM
HTTPS(PARAM)
SSH(PARAM)

View File

@@ -0,0 +1,11 @@
#
# Shorewall version 4 - Munin Macro
#
# /usr/share/shorewall/macro.Munin
#
# This macro handles Munin networked resource monitoring traffic
#
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/
# PORT(S) PORT(S) LIMIT GROUP
PARAM - - tcp 4949

View File

@@ -0,0 +1,11 @@
#
# Shorewall version 4 - Squid Macro
#
# /usr/share/shorewall/macro.Squid
#
# This macro handles Squid web proxy traffic
#
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/
# PORT(S) PORT(S) LIMIT GROUP
PARAM - - tcp 3128

View File

@@ -15,389 +15,7 @@
# - All entries in a macro undergo substitution when the macro is
# invoked in the rules file.
#
# - Macros used in action bodies may not invoke other macros.
#
# The columns in the file are the same as those in the action.template file but
# have different restrictions:
#
# Columns are:
#
# ACTION ACCEPT, DROP, REJECT, DNAT, DNAT-, REDIRECT, CONTINUE,
# LOG, QUEUE, PARAM or an <action> name.
#
# ACCEPT -- allow the connection request
# ACCEPT+ -- like ACCEPT but also excludes the
# connection from any subsequent
# DNAT[-] or REDIRECT[-] rules
# NONAT -- Excludes the connection from any
# subsequent DNAT[-] or REDIRECT[-]
# rules but doesn't generate a rule
# to accept the traffic.
# DROP -- ignore the request
# REJECT -- disallow the request and return an
# icmp-unreachable or an RST packet.
# DNAT -- Forward the request to another
# system (and optionally another
# port).
# DNAT- -- Advanced users only.
# Like DNAT but only generates the
# DNAT iptables rule and not
# the companion ACCEPT rule.
# SAME -- Similar to DNAT except that the
# port may not be remapped and when
# multiple server addresses are
# listed, all requests from a given
# remote system go to the same
# server.
# SAME- -- Advanced users only.
# Like SAME but only generates the
# NAT iptables rule and not
# the companion ACCEPT rule.
# REDIRECT -- Redirect the request to a local
# port on the firewall.
# REDIRECT-
# -- Advanced users only.
# Like REDIRET but only generates the
# REDIRECT iptables rule and not
# the companion ACCEPT rule.
#
# CONTINUE -- (For experts only). Do not process
# any of the following rules for this
# (source zone,destination zone). If
# The source and/or destination IP
# address falls into a zone defined
# later in /etc/shorewall/zones, this
# connection request will be passed
# to the rules defined for that
# (those) zone(s).
# LOG -- Simply log the packet and continue.
# QUEUE -- Queue the packet to a user-space
# application such as ftwall
# (http://p2pwall.sf.net).
# PARAM -- If you code PARAM as the action in
# a macro then when you invoke the
# macro, you can include the name of
# the macro followed by a slash ("/")
# and an ACTION (either builtin or
# user-defined. All instances of
# PARAM in the body of the macro will
# be replaced with the ACTION.
# <action> -- The name of an action defined in
# /usr/share/shorewall/actions.std or
# in /etc/shorewall/actions.
#
# The ACTION may optionally be followed
# by ":" and a syslog log level (e.g, REJECT:info or
# DNAT:debug). This causes the packet to be
# logged at the specified level.
#
# You may also specify ULOG (must be in upper case) as a
# log level.This will log to the ULOG target for routing
# to a separate log through use of ulogd
# (http://www.gnumonks.org/projects/ulogd).
#
# Actions specifying logging may be followed by a
# log tag (a string of alphanumeric characters)
# are appended to the string generated by the
# LOGPREFIX (in /etc/shorewall/shorewall.conf).
#
# Example: ACCEPT:info:ftp would include 'ftp '
# at the end of the log prefix generated by the
# LOGPREFIX setting.
#
# SOURCE Source hosts to which the rule applies. May be a zone
# defined in /etc/shorewall/zones, $FW to indicate the
# firewall itself, "all", "all+" or "none" If the ACTION
# is DNAT or REDIRECT, sub-zones of the specified zone
# may be excluded from the rule by following the zone
# name with "!' and a comma-separated list of sub-zone
# names.
#
# When "none" is used either in the SOURCE or DEST
# column, the rule is ignored.
#
# When "all" is used either in the SOURCE or DEST column
# intra-zone traffic is not affected. When "all+" is
# used, intra-zone traffic is affected.
#
# Except when "all[+]" is specified, clients may be
# further restricted to a list of subnets and/or hosts by
# appending ":" and a comma-separated list of subnets
# and/or hosts. Hosts may be specified by IP or MAC
# address; mac addresses must begin with "~" and must use
# "-" as a separator.
#
# Hosts may be specified as an IP address range using the
# syntax <low address>-<high address>. This requires that
# your kernel and iptables contain iprange match support.
# If you kernel and iptables have ipset match support
# then you may give the name of an ipset prefaced by "+".
# The ipset name may be optionally followed by a number
# from 1 to 6 enclosed in square brackets ([]) to
# indicate the number of levels of source bindings to be
# matched.
#
# dmz:192.168.2.2 Host 192.168.2.2 in the DMZ
#
# net:155.186.235.0/24 Subnet 155.186.235.0/24 on the
# Internet
#
# loc:192.168.1.1,192.168.1.2
# Hosts 192.168.1.1 and
# 192.168.1.2 in the local zone.
# loc:~00-A0-C9-15-39-78 Host in the local zone with
# MAC address 00:A0:C9:15:39:78.
#
# net:192.0.2.11-192.0.2.17
# Hosts 192.0.2.11-192.0.2.17 in
# the net zone.
#
# Alternatively, clients may be specified by interface
# by appending ":" to the zone name followed by the
# interface name. For example, loc:eth1 specifies a
# client that communicates with the firewall system
# through eth1. This may be optionally followed by
# another colon (":") and an IP/MAC/subnet address
# as described above (e.g., loc:eth1:192.168.1.5).
#
# DEST Location of Server. May be a zone defined in
# /etc/shorewall/zones, $FW to indicate the firewall
# itself, "all". "all+" or "none".
#
# When "none" is used either in the SOURCE or DEST
# column, the rule is ignored.
#
# When "all" is used either in the SOURCE or DEST column
# intra-zone traffic is not affected. When "all+" is
# used, intra-zone traffic is affected.
#
# Except when "all[+]" is specified, the server may be
# further restricted to a particular subnet, host or
# interface by appending ":" and the subnet, host or
# interface. See above.
#
# Restrictions:
#
# 1. MAC addresses are not allowed.
# 2. In DNAT rules, only IP addresses are
# allowed; no FQDNs or subnet addresses
# are permitted.
# 3. You may not specify both an interface and
# an address.
#
# Like in the SOURCE column, you may specify a range of
# up to 256 IP addresses using the syntax
# <first ip>-<last ip>. When the ACTION is DNAT or DNAT-,
# the connections will be assigned to addresses in the
# range in a round-robin fashion.
#
# If you kernel and iptables have ipset match support
# then you may give the name of an ipset prefaced by "+".
# The ipset name may be optionally followed by a number
# from 1 to 6 enclosed in square brackets ([]) to
# indicate the number of levels of destination bindings
# to be matched. Only one of the SOURCE and DEST columns
# may specify an ipset name.
#
# The port that the server is listening on may be
# included and separated from the server's IP address by
# ":". If omitted, the firewall will not modifiy the
# destination port. A destination port may only be
# included if the ACTION is DNAT or REDIRECT.
#
# Example: loc:192.168.1.3:3128 specifies a local
# server at IP address 192.168.1.3 and listening on port
# 3128. The port number MUST be specified as an integer
# and not as a name from /etc/services.
#
# if the ACTION is REDIRECT, this column needs only to
# contain the port number on the firewall that the
# request should be redirected to.
#
# PROTO Protocol - Must be "tcp", "tcp:syn", "udp", "icmp",
# "ipp2p", "ipp2p:udp", "ipp2p:all" a number, or "all".
# "ipp2p*" requires ipp2p match support in your kernel
# and iptables.
#
# "tcp:syn" implies "tcp" plus the SYN flag must be
# set and the RST,ACK and FIN flags must be reset.
#
# DEST PORT(S) Destination Ports. A comma-separated list of Port
# names (from /etc/services), port numbers or port
# ranges; if the protocol is "icmp", this column is
# interpreted as the destination icmp-type(s).
#
# If the protocol is ipp2p*, this column is interpreted
# as an ipp2p option without the leading "--" (example
# "bit" for bit-torrent). If no port is given, "ipp2p" is
# assumed.
#
# A port range is expressed as <low port>:<high port>.
#
# This column is ignored if PROTOCOL = all but must be
# entered if any of the following ields are supplied.
# In that case, it is suggested that this field contain
# "-"
#
# If your kernel contains multi-port match support, then
# only a single Netfilter rule will be generated if in
# this list and the CLIENT PORT(S) list below:
# 1. There are 15 or less ports listed.
# 2. No port ranges are included.
# Otherwise, a separate rule will be generated for each
# port.
#
# SOURCE PORT(S) (Optional) Port(s) used by the client. If omitted,
# any source port is acceptable. Specified as a comma-
# separated list of port names, port numbers or port
# ranges.
#
# If you don't want to restrict client ports but need to
# specify an ORIGINAL DEST in the next column, then
# place "-" in this column.
#
# If your kernel contains multi-port match support, then
# only a single Netfilter rule will be generated if in
# this list and the DEST PORT(S) list above:
# 1. There are 15 or less ports listed.
# 2. No port ranges are included.
# Otherwise, a separate rule will be generated for each
# port.
#
# ORIGINAL Original destination IP address. Must be omitted (
# DEST or '-') if the macro is to be used from within
# an action. See 'man shorewall-rules'.
#
# RATE LIMIT You may rate-limit the rule by placing a value in
# this column:
#
# <rate>/<interval>[:<burst>]
#
# where <rate> is the number of connections per
# <interval> ("sec" or "min") and <burst> is the
# largest burst permitted. If no <burst> is given,
# a value of 5 is assumed. There may be no
# no whitespace embedded in the specification.
#
# Example: 10/sec:20
#
# USER/GROUP This column may only be non-empty if the SOURCE is
# the firewall itself.
#
# The column may contain:
#
# [!][<user name or number>][:<group name or number>][+<program name>]
#
# When this column is non-empty, the rule applies only
# if the program generating the output is running under
# the effective <user> and/or <group> specified (or is
# NOT running under that id if "!" is given).
#
# Examples:
#
# joe #program must be run by joe
# :kids #program must be run by a member of
# #the 'kids' group
# !:kids #program must not be run by a member
# #of the 'kids' group
# +upnpd #program named upnpd (This feature was
# #removed from Netfilter in kernel
# #version 2.6.14).
#
# MARK Specifies a MARK value to match. Must be empty or
# '-' if the macro is to be used within an action.
#
# [!]value[/mask][:C]
#
# Defines a test on the existing packet or connection
# mark. The rule will match only if the test returns
# true.
#
# If you don't want to define a test but need to
# specify anything in the following columns,
# place a "-" in this field.
#
# !
#
# Inverts the test (not equal)
#
# value
#
# Value of the packet or connection mark.
#
# mask
#
# A mask to be applied to the mark before
# testing.
#
# :C
#
# Designates a connection mark. If omitted, the
# packet mark's value is tested.
#
# CONNLIMIT Must be empty or '-' if the macro is to be used within
# an action.
#
# [!]limit[:mask]
#
# May be used to limit the number of simultaneous
# connections from each individual host to limit
# connections. Requires connlimit match in your kernel
# and iptables. While the limit is only checked on rules
# specifying CONNLIMIT, the number of current connections
# is calculated over all current connections from the
# SOURCE host. By default, the limit is applied to each
# host but can be made to apply to networks of hosts by
# specifying a mask. The mask specifies the width of a
# VLSM mask to be applied to the source address; the
# number of current connections is then taken over all
# hosts in the subnet source-address/mask. When ! is
# specified, the rule matches when the number of
# connection exceeds the limit.
#
# TIME Must be empty or '-' if the macro is to be used within
# an action.
#
#
# <timeelement>[&...]
#
# timeelement may be:
#
# timestart=hh:mm[:ss]
#
# Defines the starting time of day.
#
# timestop=hh:mm[:ss]
#
# Defines the ending time of day.
#
# utc
#
# Times are expressed in Greenwich Mean
# Time.
#
# localtz
#
# Times are expressed in Local Civil Time
# (default).
#
# weekdays=ddd[,ddd]...
#
# where ddd is one of Mon, Tue, Wed, Thu,
# Fri, Sat or Sun
#
# monthdays=dd[,dd],...
#
# where dd is an ordinal day of the month#
#
# datestart=yyyy[-mm[-dd[Thh[:mm[:ss]]]]]
#
# Defines the starting date and time.
#
# datestop=yyyy[-mm[-dd[Thh[:mm[:ss]]]]]
#
# Defines the ending date and time.
#
# Columns are the same as in /etc/shorewall/rules.
# A few examples should help show how Macros work.
#
# /etc/shorewall/macro.FwdFTP:
@@ -456,6 +74,6 @@
#######################################################################################################
# DO NOT REMOVE THE FOLLOWING LINE
FORMAT 2
#######################################################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/ ORIGINAL
# PORT(S) PORT(S) DEST LIMIT GROUP DEST
####################################################################################################################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/ MARK CONNLIMIT TIME HEADERS
# PORT PORT(S) DEST LIMIT GROUP

View File

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<includepath />

17
Shorewall/Perl/.project Normal file
View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Shorewall</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.epic.perleditor.perlbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.epic.perleditor.perlnature</nature>
</natures>
</projectDescription>

View File

@@ -3,7 +3,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2007,2008,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 2007,2008,2009,2010,2011 - Tom Eastep (teastep@shorewall.net)
#
# Complete documentation is available at http://shorewall.net
#
@@ -35,14 +35,101 @@ use strict;
our @ISA = qw(Exporter);
our @EXPORT = qw( setup_accounting );
our @EXPORT_OK = qw( );
our $VERSION = '4.4.13';
our $VERSION = '4.4_21';
#
# Per-IP accounting tables. Each entry contains the associated network.
#
my %tables;
my $jumpchainref;
my %accountingjumps;
my $asection;
my $defaultchain;
my $defaultrestriction;
my $restriction;
my $accounting_commands = { COMMENT => 0, SECTION => 2 };
my $sectionname;
my $acctable;
#
# Sections in the Accounting File
#
use constant {
LEGACY => 0,
PREROUTING => 1,
INPUT => 2,
OUTPUT => 3,
FORWARD => 4,
POSTROUTING => 5
};
#
# Map names to values
#
our %asections = ( PREROUTING => PREROUTING,
INPUT => INPUT,
FORWARD => FORWARD,
OUTPUT => OUTPUT,
POSTROUTING => POSTROUTING
);
#
# Called by the compiler to [re-]initialize this module's state
#
sub initialize() {
our $jumpchainref;
$jumpchainref = undef;
$jumpchainref = undef;
%tables = ();
%accountingjumps = ();
#
# The section number is initialized to a value less thatn LEGACY. It will be set to LEGACY if a
# the first non-commentary line in the accounting file isn't a section header
#
# This allows the section header processor to quickly check for correct order
#
$asection = -1;
#
# These are the legacy values
#
$defaultchain = 'accounting';
$defaultrestriction = NO_RESTRICT;
$sectionname = '';
}
#
# Process a SECTION header
#
sub process_section ($) {
$sectionname = shift;
my $newsect = $asections{$sectionname};
#
# read_a_line has already verified that there are exactly two tokens on the line
#
fatal_error "Invalid SECTION ($sectionname)" unless defined $newsect;
fatal_error "SECTION not allowed after un-sectioned rules" unless $asection;
fatal_error "Duplicate or out-of-order SECTION ($sectionname)" if $newsect <= $asection;
if ( $sectionname eq 'INPUT' ) {
$defaultchain = 'accountin';
$defaultrestriction = INPUT_RESTRICT;
} elsif ( $sectionname eq 'OUTPUT' ) {
$defaultchain = 'accountout';
$defaultrestriction = OUTPUT_RESTRICT;
} elsif ( $sectionname eq 'FORWARD' ) {
$defaultchain = 'accountfwd';
$defaultrestriction = NO_RESTRICT;
} else {
fatal_error "The $sectionname SECTION is not allowed when ACCOUNTING_TABLE=filter" unless $acctable eq 'mangle';
if ( $sectionname eq 'PREROUTING' ) {
$defaultchain = 'accountpre';
$defaultrestriction = PREROUTE_RESTRICT;
} else {
$defaultchain = 'accountpost';
$defaultrestriction = POSTROUTE_RESTRICT;
}
}
$asection = $newsect;
}
#
@@ -50,19 +137,28 @@ sub initialize() {
#
sub process_accounting_rule( ) {
our $jumpchainref;
$acctable = $config{ACCOUNTING_TABLE};
my ($action, $chain, $source, $dest, $proto, $ports, $sports, $user, $mark, $ipsec ) = split_line1 1, 10, 'Accounting File';
$jumpchainref = 0;
my ($action, $chain, $source, $dest, $proto, $ports, $sports, $user, $mark, $ipsec, $headers ) = split_line1 1, 11, 'Accounting File', $accounting_commands;
if ( $action eq 'COMMENT' ) {
process_comment;
return 0;
}
if ( $action eq 'SECTION' ) {
process_section( $chain );
return 0;
}
$asection = LEGACY if $asection < 0;
our $disposition = '';
sub reserved_chain_name($) {
$_[0] =~ /^acc(?:ount(?:ing|out)|ipsecin|ipsecout)$/;
$_[0] =~ /^acc(?:ount(?:fwd|in|ing|out|pre|post)|ipsecin|ipsecout)$/;
}
sub ipsec_chain_name($) {
@@ -83,7 +179,7 @@ sub process_accounting_rule( ) {
sub jump_to_chain( $ ) {
my $jumpchain = $_[0];
fatal_error "Jumps to the $jumpchain chain are not allowed" if reserved_chain_name( $jumpchain );
$jumpchainref = ensure_accounting_chain( $jumpchain, 0 );
$jumpchainref = ensure_accounting_chain( $jumpchain, 0, $defaultrestriction );
check_chain( $jumpchainref );
$disposition = $jumpchain;
$jumpchain;
@@ -95,15 +191,44 @@ sub process_accounting_rule( ) {
$ports = '' if $ports eq 'any' || $ports eq 'all';
$sports = '' if $sports eq 'any' || $sports eq 'all';
my $rule = do_proto( $proto, $ports, $sports ) . do_user ( $user ) . do_test ( $mark, $globals{TC_MASK} );
fatal_error "USER/GROUP may only be specified in the OUTPUT section" unless $user eq '-' || $asection == OUTPUT;
my $rule = do_proto( $proto, $ports, $sports ) . do_user ( $user ) . do_test ( $mark, $globals{TC_MASK} ) . do_headers( $headers );
my $rule2 = 0;
my $jump = 0;
unless ( $action eq 'COUNT' ) {
if ( $action eq 'DONE' ) {
$target = 'RETURN';
} elsif ( $action =~ /^ACCOUNT\(/ ) {
if ( $action =~ /^ACCOUNT\((.+)\)$/ ) {
require_capability 'ACCOUNT_TARGET' , 'ACCOUNT Rules' , '';
my ( $table, $net, $rest ) = split/,/, $1;
fatal_error "Invalid Network Address (${net},${rest})" if defined $rest;
fatal_error "Missing Table Name" unless supplied $table;
fatal_error "Invalid Table Name ($table)" unless $table =~ /^([-\w.]+)$/;
fatal_error "Missing Network Address" unless defined $net;
fatal_error "Invalid Network Address ($net)" unless defined $net && $net =~ '/(\d+)$';
fatal_error "Netmask ($1) out of range" unless $1 >= 8;
validate_net $net, 0;
my $prevnet = $tables{$table};
if ( $prevnet ) {
fatal_error "Previous net associated with $table ($prevnet) does not match this one ($net)" unless compare_nets( $net , $prevnet );
} else {
$tables{$table} = $net;
}
$target = "ACCOUNT --addr $net --tname $table";
} else {
fatal_error "Invalid ACCOUNT Action";
}
} elsif ( $action =~ /^NFLOG/ ) {
$target = validate_level $action;
} else {
( $action, my $cmd ) = split /:/, $action;
if ( $cmd ) {
if ( $cmd eq 'COUNT' ) {
$rule2 = 1;
@@ -118,11 +243,15 @@ sub process_accounting_rule( ) {
}
}
my $restriction = NO_RESTRICT;
$restriction = $defaultrestriction;
$source = ALLIP if $source eq 'any' || $source eq 'all';
if ( $source eq 'any' || $source eq 'all' ) {
$source = ALLIP;
} else {
fatal_error "MAC addresses only allowed in the INPUT and FORWARD sections" if $source =~ /~/ && ( $asection == OUTPUT || ! $asection );
}
if ( have_bridges ) {
if ( have_bridges && ! $asection ) {
my $fw = firewall_zone;
if ( $source =~ /^$fw:?(.*)$/ ) {
@@ -132,9 +261,10 @@ sub process_accounting_rule( ) {
$dest = ALLIP if $dest eq 'any' || $dest eq 'all';
} else {
$chain = 'accounting' unless $chain and $chain ne '-';
if ( $dest eq 'any' || $dest eq 'all' || $dest eq ALLIP ) {
expand_rule(
ensure_filter_chain( 'accountout' , 0 ) ,
ensure_rules_chain ( 'accountout' ) ,
OUTPUT_RESTRICT ,
$rule ,
$source ,
@@ -147,15 +277,23 @@ sub process_accounting_rule( ) {
}
}
} else {
$chain = 'accounting' unless $chain and $chain ne '-';
$chain = $defaultchain unless $chain and $chain ne '-';
$dest = ALLIP if $dest eq 'any' || $dest eq 'all';
}
my $chainref = $filter_table->{$chain};
my $chainref = $chain_table{$config{ACCOUNTING_TABLE}}{$chain};
my $dir;
if ( ! $chainref ) {
$chainref = ensure_accounting_chain $chain, 0;
if ( reserved_chain_name( $chain ) ) {
fatal_error "May not use chain $chain in the $sectionname section" if $asection && $chain ne $defaultchain;
$chainref = ensure_accounting_chain $chain, 0 , $restriction;
} elsif ( $asection ) {
fatal_error "Unknown accounting chain ($chain)";
} else {
$chainref = ensure_accounting_chain $chain, 0 , $restriction;
}
$dir = ipsec_chain_name( $chain );
if ( $ipsec ne '-' ) {
@@ -166,15 +304,38 @@ sub process_accounting_rule( ) {
fatal_error "Adding an IPSEC rule to an unreferenced accounting chain is not allowed";
}
} else {
warning_message "Adding rule to unreferenced accounting chain $chain" unless reserved_chain_name( $chain );
warning_message "Adding rule to unreferenced accounting chain $chain" unless reserved_chain_name( $chain );
$chainref->{ipsec} = $dir;
}
} elsif ( $ipsec ne '-' ) {
$dir = $chainref->{ipsec};
fatal_error "Adding an IPSEC rule into a non-IPSEC chain is not allowed" unless $dir;
$rule .= do_ipsec( $dir , $ipsec );
} else {
fatal_error "$chain is not an accounting chain" unless $chainref->{accounting};
if ( $ipsec ne '-' ) {
$dir = $chainref->{ipsec};
fatal_error "Adding an IPSEC rule into a non-IPSEC chain is not allowed" unless $dir;
$rule .= do_ipsec( $dir , $ipsec );
} elsif ( $asection ) {
$restriction |= $chainref->{restriction};
}
}
dont_optimize( $chainref ) if $target eq 'RETURN';
if ( $jumpchainref ) {
if ( $asection ) {
#
# Check the jump-to chain to be sure that it doesn't contain rules that are incompatible with this section
#
my $jumprestricted = $jumpchainref->{restricted};
fatal_error "Chain $jumpchainref->{name} contains rules that are incompatible with the $sectionname section" if $jumprestricted && $restriction && $jumprestricted ne $restriction;
$restriction |= $jumpchainref->{restriction};
}
$accountingjumps{$jumpchainref->{name}}{$chain} = 1;
}
fatal_error "$chain is not an accounting chain" unless $chainref->{accounting};
$restriction = $dir eq 'in' ? INPUT_RESTRICT : OUTPUT_RESTRICT if $dir;
expand_rule
@@ -224,48 +385,96 @@ sub process_accounting_rule( ) {
sub setup_accounting() {
my $fn = open_file 'accounting';
if ( my $fn = open_file 'accounting' ) {
first_entry "$doing $fn...";
first_entry "$doing $fn...";
my $nonEmpty = 0;
my $nonEmpty = 0;
$nonEmpty |= process_accounting_rule while read_a_line;
$nonEmpty |= process_accounting_rule while read_a_line;
clear_comment;
clear_comment;
if ( have_bridges ) {
if ( $filter_table->{accounting} ) {
for my $chain ( qw/INPUT FORWARD/ ) {
add_jump( $filter_table->{$chain}, 'accounting', 0, '', 0, 0 );
if ( $nonEmpty ) {
my $tableref = $chain_table{$acctable};
if ( have_bridges || $asection ) {
if ( $tableref->{accountin} ) {
add_jump( $tableref->{INPUT}, 'accountin', 0, '', 0, 0 );
}
if ( $tableref->{accounting} ) {
dont_optimize( 'accounting' );
for my $chain ( qw/INPUT FORWARD/ ) {
add_jump( $tableref->{$chain}, 'accounting', 0, '', 0, 0 );
}
}
if ( $tableref->{accountfwd} ) {
add_jump( $tableref->{FORWARD}, 'accountfwd', 0, '', 0, 0 );
}
if ( $tableref->{accountout} ) {
add_jump( $tableref->{OUTPUT}, 'accountout', 0, '', 0, 0 );
}
if ( $tableref->{accountpre} ) {
add_jump( $tableref->{PREROUTING}, 'accountpre', 0, '', 0, 0 );
}
if ( $tableref->{accountpost} ) {
add_jump( $tableref->{POSTROUTING}, 'accountpost', 0, '', 0, 0 );
}
} elsif ( $tableref->{accounting} ) {
dont_optimize( 'accounting' );
for my $chain ( qw/INPUT FORWARD OUTPUT/ ) {
add_jump( $tableref->{$chain}, 'accounting', 0, '', 0, 0 );
}
}
if ( $tableref->{accipsecin} ) {
for my $chain ( qw/INPUT FORWARD/ ) {
add_jump( $tableref->{$chain}, 'accipsecin', 0, '', 0, 0 );
}
}
if ( $tableref->{accipsecout} ) {
for my $chain ( qw/FORWARD OUTPUT/ ) {
add_jump( $tableref->{$chain}, 'accipsecout', 0, '', 0, 0 );
}
}
unless ( $asection ) {
for ( accounting_chainrefs ) {
warning_message "Accounting chain $_->{name} has no references" unless keys %{$_->{references}};
}
}
if ( my $chainswithjumps = keys %accountingjumps ) {
my $progress = 1;
while ( $chainswithjumps && $progress ) {
$progress = 0;
for my $chain1 ( keys %accountingjumps ) {
if ( keys %{$accountingjumps{$chain1}} ) {
for my $chain2 ( keys %{$accountingjumps{$chain1}} ) {
delete $accountingjumps{$chain1}{$chain2}, $progress = 1 unless $accountingjumps{$chain2};
}
} else {
delete $accountingjumps{$chain1};
$chainswithjumps--;
$progress = 1;
}
}
}
if ( $chainswithjumps ) {
my @chainswithjumps = keys %accountingjumps;
fatal_error "Jump loop involving the following chains: @chainswithjumps";
}
}
}
if ( $filter_table->{accountout} ) {
add_jump( $filter_table->{OUTPUT}, 'accountout', 0, '', 0, 0 );
}
} elsif ( $filter_table->{accounting} ) {
for my $chain ( qw/INPUT FORWARD OUTPUT/ ) {
add_jump( $filter_table->{$chain}, 'accounting', 0, '', 0, 0 );
}
}
if ( $filter_table->{accipsecin} ) {
for my $chain ( qw/INPUT FORWARD/ ) {
add_jump( $filter_table->{$chain}, 'accipsecin', 0, '', 0, 0 );
}
}
if ( $filter_table->{accipsecout} ) {
for my $chain ( qw/FORWARD OUTPUT/ ) {
add_jump( $filter_table->{$chain}, 'accipsecout', 0, '', 0, 0 );
}
}
for ( accounting_chainrefs ) {
warning_message "Accounting chain $_->{name} has no references" unless keys %{$_->{references}};
}
}
1;

View File

@@ -1,964 +0,0 @@
#
# Shorewall 4.4 -- /usr/share/shorewall/Shorewall/Actions.pm
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2007,2008,2009,2010 - 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.
#
# This module contains the code for dealing with actions (built-in,
# standard and user-defined) and Macros.
#
package Shorewall::Actions;
require Exporter;
use Shorewall::Config qw(:DEFAULT :internal);
use Shorewall::Zones;
use Shorewall::Chains qw(:DEFAULT :internal);
use Shorewall::IPAddrs;
use strict;
our @ISA = qw(Exporter);
our @EXPORT = qw( merge_levels
isolate_basic_target
get_target_param
add_requiredby
createactionchain
find_logactionchain
process_actions1
process_actions2
process_actions3
find_macro
split_action
substitute_param
merge_macro_source_dest
merge_macro_column
map_old_actions
%usedactions
%default_actions
%actions
%macros
$macro_commands
);
our @EXPORT_OK = qw( initialize );
our $VERSION = '4.4_13';
#
# Used Actions. Each action that is actually used has an entry with value 1.
#
our %usedactions;
#
# Default actions for each policy.
#
our %default_actions;
# Action Table
#
# %actions{ <action1> => { requires => { <requisite1> = 1,
# <requisite2> = 1,
# ...
# } ,
# actchain => <action chain number> # Used for generating unique chain names for each <level>:<tag> pair.
#
our %actions;
#
# Contains an entry for each used <action>:<level>[:<tag>] that maps to the associated chain.
#
our %logactionchains;
our %macros;
our $family;
our @builtins;
#
# Commands that can be embedded in a macro file and how many total tokens on the line (0 => unlimited).
#
our $macro_commands = { COMMENT => 0, FORMAT => 2 };
#
# Rather than initializing globals in an INIT block or during declaration,
# we initialize them in a function. This is done for two reasons:
#
# 1. Proper initialization depends on the address family which isn't
# known until the compiler has started.
#
# 2. The compiler can run multiple times in the same process so it has to be
# able to re-initialize its dependent modules' state.
#
sub initialize( $ ) {
$family = shift;
%usedactions = ();
%default_actions = ( DROP => 'none' ,
REJECT => 'none' ,
ACCEPT => 'none' ,
QUEUE => 'none' );
%actions = ();
%logactionchains = ();
%macros = ();
if ( $family == F_IPV4 ) {
@builtins = qw/dropBcast allowBcast dropNotSyn rejNotSyn dropInvalid allowInvalid allowinUPnP forwardUPnP Limit/;
} else {
@builtins = qw/dropBcast allowBcast dropNotSyn rejNotSyn dropInvalid allowInvalid/;
}
}
#
# This function determines the logging for a subordinate action or a rule within a superior action
#
sub merge_levels ($$) {
my ( $superior, $subordinate ) = @_;
my @supparts = split /:/, $superior;
my @subparts = split /:/, $subordinate;
my $subparts = @subparts;
my $target = $subparts[0];
push @subparts, '' while @subparts < 3; #Avoid undefined values
my $level = $supparts[1];
my $tag = $supparts[2];
if ( @supparts == 3 ) {
return "$target:none!:$tag" if $level eq 'none!';
return "$target:$level:$tag" if $level =~ /!$/;
return $subordinate if $subparts >= 2;
return "$target:$level:$tag";
}
if ( @supparts == 2 ) {
return "$target:none!" if $level eq 'none!';
return "$target:$level" if ($level =~ /!$/) || ($subparts < 2);
}
$subordinate;
}
#
# Try to find a macro file -- RETURNS false if the file doesn't exist or MACRO if it does.
# If the file exists, the macro is entered into the 'targets' table and the fully-qualified
# name of the file is stored in the 'macro' table.
#
sub find_macro( $ )
{
my $macro = $_[0];
my $macrofile = find_file "macro.$macro";
if ( -f $macrofile ) {
$macros{$macro} = $macrofile;
$targets{$macro} = MACRO;
} else {
0;
}
}
#
# Return ( action, level[:tag] ) from passed full action
#
sub split_action ( $ ) {
my $action = $_[0];
my $target = '';
my $max = 3;
#
# The following rather grim RE, when matched, breaks the action into two parts:
#
# basicaction(param)
# logging part (may be empty)
#
# The param may contain one or more ':' characters
#
if ( $action =~ /^([^(:]+\(.*?\))(:(.*))?$/ ) {
$target = $1;
$action = $2 ? $3 : '';
$max = 2;
}
my @a = split( /:/ , $action, 4 );
fatal_error "Invalid ACTION ($action)" if ( $action =~ /::/ ) || ( @a > $max );
$target = shift @a unless $target;
( $target, join ":", @a );
}
#
# This function substitutes the second argument for the first part of the first argument up to the first colon (":")
#
# Example:
#
# substitute_param DNAT PARAM:info:FTP
#
# produces "DNAT:info:FTP"
#
sub substitute_param( $$ ) {
my ( $param, $action ) = @_;
if ( $action =~ /:/ ) {
my $logpart = (split_action $action)[1];
$logpart =~ s!/$!!;
return "$param:$logpart";
}
$param;
}
#
# Combine fields from a macro body with one from the macro invocation
#
sub merge_macro_source_dest( $$ ) {
my ( $body, $invocation ) = @_;
if ( $invocation ) {
if ( $body ) {
return $body if $invocation eq '-';
return "$body:$invocation" if $invocation =~ /.*?\.*?\.|^\+|^!+|^~|^!~|~<|~\[/;
return "$invocation:$body";
}
return $invocation;
}
$body || '';
}
sub merge_macro_column( $$ ) {
my ( $body, $invocation ) = @_;
if ( defined $invocation && $invocation ne '' && $invocation ne '-' ) {
$invocation;
} else {
$body;
}
}
#
# Get Macro Name -- strips away trailing /*, :* and (*) from the first column in a rule, macro or action.
#
sub isolate_basic_target( $ ) {
my $target = ( split '[/:]', $_[0])[0];
$target =~ /^(\w+)[(].*[)]$/ ? $1 : $target;
}
#
# Split the passed target into the basic target and parameter
#
sub get_target_param( $ ) {
my ( $target, $param ) = split '/', $_[0];
unless ( defined $param ) {
( $target, $param ) = ( $1, $2 ) if $target =~ /^(.*?)[(](.*)[)]$/;
}
( $target, $param );
}
#
# Define an Action
#
sub new_action( $ ) {
my $action = $_[0];
$actions{$action} = { actchain => '', requires => {} };
}
#
# Record a 'requires' relationship between a pair of actions.
#
sub add_requiredby ( $$ ) {
my ($requiredby , $requires ) = @_;
$actions{$requires}{requires}{$requiredby} = 1;
}
#
# Map pre-3.0 actions to the corresponding Macro invocation
#
sub find_old_action ( $$$ ) {
my ( $target, $macro, $param ) = @_;
if ( my $actiontype = find_macro( $macro ) ) {
( $macro, $actiontype , $param );
} else {
( $target, 0, '' );
}
}
sub map_old_actions( $ ) {
my $target = shift;
if ( $target =~ /^Allow(.*)$/ ) {
find_old_action( $target, $1, 'ACCEPT' );
} elsif ( $target =~ /^Drop(.*)$/ ) {
find_old_action( $target, $1, 'DROP' );
} elsif ( $target = /^Reject(.*)$/ ) {
find_old_action( $target, $1, 'REJECT' );
} else {
( $target, 0, '' );
}
}
#
# Create and record a log action chain -- Log action chains have names
# that are formed from the action name by prepending a "%" and appending
# a 1- or 2-digit sequence number. In the functions that follow,
# the $chain, $level and $tag variable serves as arguments to the user's
# exit. We call the exit corresponding to the name of the action but we
# set $chain to the name of the iptables chain where rules are to be added.
# Similarly, $level and $tag contain the log level and log tag respectively.
#
# The maximum length of a chain name is 30 characters -- since the log
# action chain name is 2-3 characters longer than the base chain name,
# this function truncates the original chain name where necessary before
# it adds the leading "%" and trailing sequence number.
#
sub createlogactionchain( $$ ) {
my ( $action, $level ) = @_;
my $chain = $action;
my $actionref = $actions{$action};
my $chainref;
my ($lev, $tag) = split ':', $level;
validate_level $lev;
$actionref = new_action $action unless $actionref;
$chain = substr $chain, 0, 28 if ( length $chain ) > 28;
CHECKDUP:
{
$actionref->{actchain}++ while $chain_table{filter}{'%' . $chain . $actionref->{actchain}};
$chain = substr( $chain, 0, 27 ), redo CHECKDUP if ( $actionref->{actchain} || 0 ) >= 10 and length $chain == 28;
}
$logactionchains{"$action:$level"} = $chainref = new_standard_chain '%' . $chain . $actionref->{actchain}++;
fatal_error "Too many invocations of Action $action" if $actionref->{actchain} > 99;
unless ( $targets{$action} & BUILTIN ) {
dont_optimize $chainref;
my $file = find_file $chain;
if ( -f $file ) {
progress_message "Processing $file...";
( $level, my $tag ) = split /:/, $level;
$tag = $tag || '';
unless ( my $return = eval `cat $file` ) {
fatal_error "Couldn't parse $file: $@" if $@;
fatal_error "Couldn't do $file: $!" unless defined $return;
fatal_error "Couldn't run $file" unless $return;
}
}
}
}
sub createsimpleactionchain( $ ) {
my $action = shift;
my $chainref = new_standard_chain $action;
$logactionchains{"$action:none"} = $chainref;
unless ( $targets{$action} & BUILTIN ) {
dont_optimize $chainref;
my $file = find_file $action;
if ( -f $file ) {
progress_message "Processing $file...";
my ( $level, $tag ) = ( '', '' );
unless ( my $return = eval `cat $file` ) {
fatal_error "Couldn't parse $file: $@" if $@;
fatal_error "Couldn't do $file: $!" unless defined $return;
fatal_error "Couldn't run $file" unless $return;
}
}
}
}
#
# Create an action chain and run its associated user exit
#
sub createactionchain( $ ) {
my ( $action , $level ) = split_action $_[0];
my $chainref;
if ( defined $level && $level ne '' ) {
if ( $level eq 'none' ) {
createsimpleactionchain $action;
} else {
createlogactionchain $action , $level;
}
} else {
createsimpleactionchain $action;
}
}
#
# Find the chain that handles the passed action. If the chain cannot be found,
# a fatal error is generated and the function does not return.
#
sub find_logactionchain( $ ) {
my $fullaction = $_[0];
my ( $action, $level ) = split_action $fullaction;
$level = 'none' unless $level;
fatal_error "Fatal error in find_logactionchain" unless $logactionchains{"$action:$level"};
}
#
# Scans a macro file invoked from an action file ensuring that all targets mentioned in the file are known and that none are actions.
#
sub process_macro1 ( $$ ) {
my ( $action, $macrofile ) = @_;
progress_message " ..Expanding Macro $macrofile...";
push_open( $macrofile );
while ( read_a_line ) {
my ( $mtarget, $msource, $mdest, $mproto, $mports, $msports, $morigdest, $mrate, $muser ) = split_line1 1, 9, 'macro file', $macro_commands;
next if $mtarget eq 'COMMENT' || $mtarget eq 'FORMAT';
$mtarget =~ s/:.*$//;
$mtarget = (split '/' , $mtarget)[0];
my $targettype = $targets{$mtarget};
$targettype = 0 unless defined $targettype;
fatal_error "Invalid target ($mtarget)"
unless ( $targettype == STANDARD ) || ( $mtarget eq 'PARAM' ) || ( $targettype & ( LOGRULE | NFQ | CHAIN ) );
}
progress_message " ..End Macro $macrofile";
pop_open;
}
#
# The functions process_actions1-3() implement the three phases of action processing.
#
# The first phase (process_actions1) occurs before the rules file is processed. The builtin-actions are added
# to the target table (%Shorewall::Chains::targets) and actions table, then ${SHAREDIR}/actions.std and
# ${CONFDIR}/actions are scanned (in that order). For each action:
#
# a) The related action definition file is located and scanned.
# b) Forward and unresolved action references are trapped as errors.
# c) A dependency graph is created using the 'requires' field in the 'actions' table.
#
# As the rules file is scanned, each action[:level[:tag]] is merged onto the 'usedactions' hash. When an <action>
# is merged into the hash, its action chain is created. Where logging is specified, a chain with the name
# %<action>n is used where the <action> name is truncated on the right where necessary to ensure that the total
# length of the chain name does not exceed 30 characters.
#
# The second phase (process_actions2) occurs after the rules file is scanned. The transitive closure of
# %usedactions is generated; again, as new actions are merged into the hash, their action chains are created.
#
# The final phase (process_actions3) traverses the keys of %usedactions populating each chain appropriately
# by reading the related action definition file and creating rules. Note that a given action definition file is
# processed once for each unique [:level[:tag]] applied to an invocation of the action.
#
sub process_action1 ( $$ ) {
my ( $action, $wholetarget ) = @_;
my ( $target, $level ) = split_action $wholetarget;
$level = 'none' unless $level;
my $targettype = $targets{$target};
if ( defined $targettype ) {
return if ( $targettype == STANDARD ) || ( $targettype & ( MACRO | LOGRULE | NFQ | CHAIN ) );
fatal_error "Invalid TARGET ($target)" if $targettype & STANDARD;
fatal_error "An action may not invoke itself" if $target eq $action;
add_requiredby $wholetarget, $action if $targettype & ACTION;
} elsif ( $target eq 'COMMENT' ) {
fatal_error "Invalid TARGET ($wholetarget)" unless $wholetarget eq $target;
} else {
( $target, my $param ) = get_target_param $target;
return if $target eq 'NFQUEUE';
if ( defined $param ) {
my $paramtype = $targets{$param} || 0;
fatal_error "Parameter value not allowed in action files ($param)" if $paramtype & NATRULE;
}
fatal_error "Invalid or missing ACTION ($wholetarget)" unless defined $target;
if ( find_macro $target ) {
process_macro1( $action, $macros{$target} );
} else {
fatal_error "Invalid TARGET ($target)";
}
}
}
sub process_actions1() {
progress_message2 "Preprocessing Action Files...";
#
# Add built-in actions to the target table and create those actions
#
$targets{$_} = ACTION + BUILTIN, new_action( $_ ) for @builtins;
for my $file ( qw/actions.std actions/ ) {
open_file $file;
while ( read_a_line ) {
my ( $action ) = split_line 1, 1, 'action file';
if ( $action =~ /:/ ) {
warning_message 'Default Actions are now specified in /etc/shorewall/shorewall.conf';
$action =~ s/:.*$//;
}
next unless $action;
if ( $targets{$action} ) {
warning_message "Duplicate Action Name ($action) Ignored" unless $targets{$action} & ACTION;
next;
}
$targets{$action} = ACTION;
fatal_error "Invalid Action Name ($action)" unless "\L$action" =~ /^[a-z]\w*$/;
new_action $action;
my $actionfile = find_file "action.$action";
fatal_error "Missing Action File ($actionfile)" unless -f $actionfile;
progress_message2 " Pre-processing $actionfile...";
push_open( $actionfile );
while ( read_a_line ) {
my ($wholetarget, $source, $dest, $proto, $ports, $sports, $rate, $users, $mark ) = split_line 1, 9, 'action file';
process_action1( $action, $wholetarget );
}
pop_open;
}
}
}
sub process_actions2 () {
progress_message2 'Generating Transitive Closure of Used-action List...';
my $changed = 1;
while ( $changed ) {
$changed = 0;
for my $target (keys %usedactions) {
my ($action, $level) = split_action $target;
my $actionref = $actions{$action};
assert( $actionref );
for my $action1 ( keys %{$actionref->{requires}} ) {
my $action2 = merge_levels $target, $action1;
unless ( $usedactions{ $action2 } ) {
$usedactions{ $action2 } = 1;
createactionchain $action2;
$changed = 1;
}
}
}
}
}
#
# This function is called to process each rule generated from an action file.
#
sub process_action( $$$$$$$$$$$ ) {
my ($chainref, $actionname, $target, $source, $dest, $proto, $ports, $sports, $rate, $user, $mark ) = @_;
my ( $action , $level ) = split_action $target;
if ( $action eq 'REJECT' ) {
$action = 'reject';
} elsif ( $action eq 'CONTINUE' ) {
$action = 'RETURN';
} elsif ( $action =~ /^NFQUEUE/ ) {
( $action, my $param ) = get_target_param $action;
$param = 1 unless defined $param;
$action = "NFQUEUE --queue-num $param";
} elsif ( $action eq 'COUNT' ) {
$action = '';
}
expand_rule ( $chainref ,
NO_RESTRICT ,
do_proto( $proto, $ports, $sports ) . do_ratelimit( $rate, $action ) . do_user $user . do_test( $mark, $globals{TC_MASK} ) ,
$source ,
$dest ,
'', #Original Dest
$action ,
$level ,
$action ,
'' );
}
#
# Expand Macro in action files.
#
sub process_macro3( $$$$$$$$$$$$ ) {
my ( $macro, $param, $chainref, $action, $source, $dest, $proto, $ports, $sports, $rate, $user, $mark ) = @_;
my $nocomment = no_comment;
my $format = 1;
macro_comment $macro;
my $fn = $macros{$macro};
progress_message "..Expanding Macro $fn...";
push_open $fn;
while ( read_a_line ) {
my ( $mtarget, $msource, $mdest, $mproto, $mports, $msports, $morigdest, $mrate, $muser, $mmark );
if ( $format == 1 ) {
( $mtarget, $msource, $mdest, $mproto, $mports, $msports, $mrate, $muser ) = split_line1 1, 8, 'macro file', $macro_commands;
$morigdest = '-';
$mmark = '-';
} else {
( $mtarget, $msource, $mdest, $mproto, $mports, $msports, $morigdest, $mrate, $muser, $mmark ) = split_line1 1, 10, 'macro file', $macro_commands;
}
if ( $mtarget eq 'COMMENT' ) {
process_comment unless $nocomment;
next;
}
if ( $mtarget eq 'FORMAT' ) {
fatal_error "Invalid FORMAT ($msource)" unless $msource =~ /^[12]$/;
$format = $msource;
next;
}
if ( $mtarget =~ /^PARAM:?/ ) {
fatal_error 'PARAM requires that a parameter be supplied in macro invocation' unless $param;
$mtarget = substitute_param $param, $mtarget;
}
fatal_error "Macros used within Actions may not specify an ORIGINAL DEST " if $morigdest ne '-';
if ( $msource ) {
if ( ( $msource eq '-' ) || ( $msource eq 'SOURCE' ) ) {
$msource = $source || '';
} elsif ( $msource eq 'DEST' ) {
$msource = $dest || '';
} else {
$msource = merge_macro_source_dest $msource, $source;
}
} else {
$msource = '';
}
$msource = '' if $msource eq '-';
if ( $mdest ) {
if ( ( $mdest eq '-' ) || ( $mdest eq 'DEST' ) ) {
$mdest = $dest || '';
} elsif ( $mdest eq 'SOURCE' ) {
$mdest = $source || '';
} else {
$mdest = merge_macro_source_dest $mdest, $dest;
}
} else {
$mdest = '';
}
$mdest = '' if $mdest eq '-';
$mproto = merge_macro_column $mproto, $proto;
$mports = merge_macro_column $mports, $ports;
$msports = merge_macro_column $msports, $sports;
$mrate = merge_macro_column $mrate, $rate;
$muser = merge_macro_column $muser, $user;
$mmark = merge_macro_column $mmark, $mark;
process_action $chainref, $action, $mtarget, $msource, $mdest, $mproto, $mports, $msports, $mrate, $muser, $mark;
}
pop_open;
progress_message '..End Macro';
clear_comment unless $nocomment;
}
#
# Generate chain for non-builtin action invocation
#
sub process_action3( $$$$$ ) {
my ( $chainref, $wholeaction, $action, $level, $tag ) = @_;
my $actionfile = find_file "action.$action";
fatal_error "Missing Action File ($actionfile)" unless -f $actionfile;
progress_message2 "Processing $actionfile for chain $chainref->{name}...";
open_file $actionfile;
while ( read_a_line ) {
my ($target, $source, $dest, $proto, $ports, $sports, $rate, $user, $mark ) = split_line1 1, 9, 'action file';
if ( $target eq 'COMMENT' ) {
process_comment;
next;
}
my $target2 = merge_levels $wholeaction, $target;
my ( $action2 , $level2 ) = split_action $target2;
( $action2 , my $param ) = get_target_param $action2;
my $action2type = $targets{$action2} || 0;
unless ( $action2type == STANDARD ) {
if ( $action2type & ACTION ) {
$target2 = (find_logactionchain ( $target = $target2 ))->{name};
} else {
assert( $action2type & ( MACRO | LOGRULE | NFQ | CHAIN ) );
}
}
if ( $action2type == MACRO ) {
process_macro3( $action2, $param, $chainref, $action, $source, $dest, $proto, $ports, $sports, $rate, $user, $mark );
} else {
process_action $chainref, $action, $target2, $source, $dest, $proto, $ports, $sports, $rate, $user, $mark;
}
}
clear_comment;
}
#
# The following small functions generate rules for the builtin actions of the same name
#
sub dropBcast( $$$ ) {
my ($chainref, $level, $tag) = @_;
if ( have_capability( 'ADDRTYPE' ) ) {
if ( $level ne '' ) {
log_rule_limit $level, $chainref, 'dropBcast' , 'DROP', '', $tag, 'add', ' -m addrtype --dst-type BROADCAST ';
if ( $family == F_IPV4 ) {
log_rule_limit $level, $chainref, 'dropBcast' , 'DROP', '', $tag, 'add', ' -d 224.0.0.0/4 ';
} else {
log_rule_limit $level, $chainref, 'dropBcast' , 'DROP', '', $tag, 'add', join( ' ', ' -d' , IPv6_MULTICAST , '-j DROP ' );
}
}
add_rule $chainref, '-m addrtype --dst-type BROADCAST -j DROP';
} else {
if ( $family == F_IPV4 ) {
add_commands $chainref, 'for address in $ALL_BCASTS; do';
} else {
add_commands $chainref, 'for address in $ALL_ACASTS; do';
}
incr_cmd_level $chainref;
log_rule_limit $level, $chainref, 'dropBcast' , 'DROP', '', $tag, 'add', ' -d $address ' if $level ne '';
add_rule $chainref, '-d $address -j DROP';
decr_cmd_level $chainref;
add_commands $chainref, 'done';
log_rule_limit $level, $chainref, 'dropBcast' , 'DROP', '', $tag, 'add', ' -d 224.0.0.0/4 ' if $level ne '';
}
if ( $family == F_IPV4 ) {
add_rule $chainref, '-d 224.0.0.0/4 -j DROP';
} else {
add_rule $chainref, join( ' ', '-d', IPv6_MULTICAST, '-j DROP' );
}
}
sub allowBcast( $$$ ) {
my ($chainref, $level, $tag) = @_;
if ( $family == F_IPV4 && have_capability( 'ADDRTYPE' ) ) {
if ( $level ne '' ) {
log_rule_limit $level, $chainref, 'allowBcast' , 'ACCEPT', '', $tag, 'add', ' -m addrtype --dst-type BROADCAST ';
log_rule_limit $level, $chainref, 'allowBcast' , 'ACCEPT', '', $tag, 'add', ' -d 224.0.0.0/4 ';
}
add_rule $chainref, '-m addrtype --dst-type BROADCAST -j ACCEPT';
add_rule $chainref, '-d 224.0.0.0/4 -j ACCEPT';
} else {
if ( $family == F_IPV4 ) {
add_commands $chainref, 'for address in $ALL_BCASTS; do';
} else {
add_commands $chainref, 'for address in $ALL_MACASTS; do';
}
incr_cmd_level $chainref;
log_rule_limit $level, $chainref, 'allowBcast' , 'ACCEPT', '', $tag, 'add', ' -d $address ' if $level ne '';
add_rule $chainref, '-d $address -j ACCEPT';
decr_cmd_level $chainref;
add_commands $chainref, 'done';
if ( $family == F_IPV4 ) {
log_rule_limit $level, $chainref, 'allowBcast' , 'ACCEPT', '', $tag, 'add', ' -d 224.0.0.0/4 ' if $level ne '';
add_rule $chainref, '-d 224.0.0.0/4 -j ACCEPT';
} else {
log_rule_limit $level, $chainref, 'allowBcast' , 'ACCEPT', '', $tag, 'add', ' -d ' . IPv6_MULTICAST . ' ' if $level ne '';
add_rule $chainref, join ( ' ', '-d', IPv6_MULTICAST, '-j ACCEPT' );
}
}
}
sub dropNotSyn ( $$$ ) {
my ($chainref, $level, $tag) = @_;
log_rule_limit $level, $chainref, 'dropNotSyn' , 'DROP', '', $tag, 'add', '-p 6 ! --syn ' if $level ne '';
add_rule $chainref , '-p 6 ! --syn -j DROP';
}
sub rejNotSyn ( $$$ ) {
my ($chainref, $level, $tag) = @_;
log_rule_limit $level, $chainref, 'rejNotSyn' , 'REJECT', '', $tag, 'add', '-p 6 ! --syn ' if $level ne '';
add_rule $chainref , '-p 6 ! --syn -j REJECT --reject-with tcp-reset';
}
sub dropInvalid ( $$$ ) {
my ($chainref, $level, $tag) = @_;
log_rule_limit $level, $chainref, 'dropInvalid' , 'DROP', '', $tag, 'add', "$globals{STATEMATCH} INVALID " if $level ne '';
add_rule $chainref , "$globals{STATEMATCH} INVALID -j DROP";
}
sub allowInvalid ( $$$ ) {
my ($chainref, $level, $tag) = @_;
log_rule_limit $level, $chainref, 'allowInvalid' , 'ACCEPT', '', $tag, 'add', "$globals{STATEMATCH} INVALID " if $level ne '';
add_rule $chainref , "$globals{STATEMATCH} INVALID -j ACCEPT";
}
sub forwardUPnP ( $$$ ) {
my $chainref = dont_optimize 'forwardUPnP';
add_commands( $chainref , '[ -f ${VARDIR}/.forwardUPnP ] && cat ${VARDIR}/.forwardUPnP >&3' );
}
sub allowinUPnP ( $$$ ) {
my ($chainref, $level, $tag) = @_;
if ( $level ne '' ) {
log_rule_limit $level, $chainref, 'allowinUPnP' , 'ACCEPT', '', $tag, 'add', '-p 17 --dport 1900 ';
log_rule_limit $level, $chainref, 'allowinUPnP' , 'ACCEPT', '', $tag, 'add', '-p 6 --dport 49152 ';
}
add_rule $chainref, '-p 17 --dport 1900 -j ACCEPT';
add_rule $chainref, '-p 6 --dport 49152 -j ACCEPT';
}
sub Limit( $$$ ) {
my ($chainref, $level, $tag) = @_;
my @tag = split /,/, $tag;
fatal_error 'Limit rules must include <set name>,<max connections>,<interval> as the log tag (' . join( ':', 'Limit', $level eq '' ? 'none' : $level , $tag ) . ')' unless @tag == 3;
my $set = $tag[0];
for ( @tag[1,2] ) {
fatal_error 'Max connections and interval in Limit rules must be numeric (' . join( ':', 'Limit', $level eq '' ? 'none' : $level, $tag ) . ')' unless /^\d+$/
}
my $count = $tag[1] + 1;
require_capability( 'RECENT_MATCH' , 'Limit rules' , '' );
add_rule $chainref, "-m recent --name $set --set";
if ( $level ne '' ) {
my $xchainref = new_chain 'filter' , "$chainref->{name}%";
log_rule_limit $level, $xchainref, $tag[0], 'DROP', '', '', 'add', '';
add_rule $xchainref, '-j DROP';
add_jump $chainref, $xchainref, 0, "-m recent --name $set --update --seconds $tag[2] --hitcount $count ";
} else {
add_rule $chainref, "-m recent --update --name $set --seconds $tag[2] --hitcount $count -j DROP";
}
add_rule $chainref, '-j ACCEPT';
}
sub process_actions3 () {
my %builtinops = ( 'dropBcast' => \&dropBcast,
'allowBcast' => \&allowBcast,
'dropNotSyn' => \&dropNotSyn,
'rejNotSyn' => \&rejNotSyn,
'dropInvalid' => \&dropInvalid,
'allowInvalid' => \&allowInvalid,
'allowinUPnP' => \&allowinUPnP,
'forwardUPnP' => \&forwardUPnP,
'Limit' => \&Limit, );
for my $wholeaction ( keys %usedactions ) {
my $chainref = find_logactionchain $wholeaction;
my ( $action, $level, $tag ) = split /:/, $wholeaction;
$level = '' unless defined $level;
$tag = '' unless defined $tag;
if ( $targets{$action} & BUILTIN ) {
$level = '' if $level =~ /none!?/;
$builtinops{$action}->($chainref, $level, $tag);
} else {
process_action3 $chainref, $wholeaction, $action, $level, $tag;
}
}
}
1;

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2007,2008,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 2007,2008,2009,2010,2011 - Tom Eastep (teastep@shorewall.net)
#
# Complete documentation is available at http://shorewall.net
#
@@ -21,52 +21,49 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
package Shorewall::Compiler;
require Exporter;
use Shorewall::Config qw(:DEFAULT :internal);
use Shorewall::Chains qw(:DEFAULT :internal);
use Shorewall::Zones;
use Shorewall::Policy;
use Shorewall::Nat;
use Shorewall::Providers;
use Shorewall::Tc;
use Shorewall::Tunnels;
use Shorewall::Actions;
use Shorewall::Accounting;
use Shorewall::Rules;
use Shorewall::Proc;
use Shorewall::Proxyarp;
use Shorewall::IPAddrs;
use Shorewall::Raw;
use Shorewall::Misc;
our @ISA = qw(Exporter);
our @EXPORT = qw( compiler );
our @EXPORT_OK = qw( $export );
our $VERSION = '4.4_12';
our $VERSION = '4.4_21';
our $export;
my $export;
our $test;
my $test;
our $family;
my $family;
#
# Initilize the package-globals in the other modules
#
sub initialize_package_globals() {
Shorewall::Config::initialize($family);
Shorewall::Chains::initialize ($family);
Shorewall::Chains::initialize ($family, 1, $export );
Shorewall::Zones::initialize ($family);
Shorewall::Policy::initialize;
Shorewall::Nat::initialize;
Shorewall::Providers::initialize($family);
Shorewall::Tc::initialize($family);
Shorewall::Actions::initialize( $family );
Shorewall::Accounting::initialize;
Shorewall::Rules::initialize($family);
Shorewall::Proxyarp::initialize($family);
Shorewall::IPAddrs::initialize($family);
Shorewall::Misc::initialize($family);
}
#
@@ -111,7 +108,7 @@ sub generate_script_1( $ ) {
################################################################################
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 refresh refreshed restored/ ) {
emit "\nrun_${exit}_exit() {";
push_indent;
append_file $exit or emit 'true';
@@ -119,7 +116,7 @@ EOF
emit '}';
}
for my $exit qw/isusable findgw/ {
for my $exit ( qw/isusable findgw/ ) {
emit "\nrun_${exit}_exit() {";
push_indent;
append_file($exit, 1) or emit 'true';
@@ -229,7 +226,11 @@ sub generate_script_2() {
set_chain_variables;
append_file 'params' if $config{EXPORTPARAMS};
if ( $config{EXPORTPARAMS} ) {
append_file 'params';
} else {
export_params;
}
emit ( '',
"g_stopping=",
@@ -307,7 +308,6 @@ sub generate_script_2() {
#
# Generate code for loading the various files in /var/lib/shorewall[6][-lite]
# Generate code to add IP addresses under ADD_IP_ALIASES and ADD_SNAT_ALIASES
#
# Generate the 'setup_netfilter()' function that runs iptables-restore.
# Generate the 'define_firewall()' function.
#
@@ -333,10 +333,10 @@ sub generate_script_3($) {
save_progress_message 'Initializing...';
if ( $export ) {
my $fn = find_file $config{LOAD_HELPERS_ONLY} ? 'helpers' : 'modules';
if ( $export || $config{EXPORTMODULES} ) {
my $fn = find_file( $config{LOAD_HELPERS_ONLY} ? 'helpers' : 'modules' );
if ( -f $fn && ! $fn =~ "^$globals{SHAREDIR}/" ) {
if ( -f $fn && ( $config{EXPORTMODULES} || ( $export && ! $fn =~ "^$globals{SHAREDIR}/" ) ) ) {
emit 'echo MODULESDIR="$MODULESDIR" > ${VARDIR}/.modulesdir';
emit 'cat > ${VARDIR}/.modules << EOF';
open_file $fn;
@@ -344,7 +344,7 @@ sub generate_script_3($) {
emit_unindented $currentline while read_a_line;
emit_unindented 'EOF';
emit 'reload_kernel_modules < ${VARDIR}/.modules';
emit '', 'reload_kernel_modules < ${VARDIR}/.modules';
} else {
emit 'load_kernel_modules Yes';
}
@@ -352,9 +352,11 @@ sub generate_script_3($) {
emit 'load_kernel_modules Yes';
}
if ( $family == F_IPV4 ) {
load_ipsets;
emit '';
load_ipsets;
if ( $family == F_IPV4 ) {
emit ( 'if [ "$COMMAND" = refresh ]; then' ,
' run_refresh_exit' ,
'else' ,
@@ -366,7 +368,7 @@ sub generate_script_3($) {
mark_firewall_not_started;
emit ('',
emit ( '',
'delete_proxyarp',
''
);
@@ -384,11 +386,20 @@ sub generate_script_3($) {
emit "disable_ipv6\n" if $config{DISABLE_IPV6};
} else {
emit ( '[ "$COMMAND" = refresh ] && run_refresh_exit || run_init_exit',
emit ( 'if [ "$COMMAND" = refresh ]; then' ,
' run_refresh_exit' ,
'else' ,
' run_init_exit',
'fi',
'' );
save_dynamic_chains;
mark_firewall_not_started;
emit '';
emit ('',
'delete_proxyndp',
''
);
}
emit qq(delete_tc1\n) if $config{CLEAR_TC};
@@ -397,7 +408,12 @@ sub generate_script_3($) {
emit( 'setup_routing_and_traffic_shaping', '' );
emit 'cat > ${VARDIR}/proxyarp << __EOF__';
if ( $family == F_IPV4 ) {
emit 'cat > ${VARDIR}/proxyarp << __EOF__';
} else {
emit 'cat > ${VARDIR}/proxyndp << __EOF__';
}
dump_proxy_arp;
emit_unindented '__EOF__';
@@ -445,7 +461,7 @@ EOF
my $config_dir = $globals{CONFIGDIR};
emit<<"EOF";
set_state Started $config_dir
set_state Started $config_dir
run_restored_exit
else
if [ \$COMMAND = refresh ]; then
@@ -500,15 +516,15 @@ EOF
}
#
#1
# The Compiler.
#
# Arguments are named -- see %parms below.
#
sub compiler {
my ( $scriptfilename, $directory, $verbosity, $timestamp , $debug, $chains , $log , $log_verbosity, $preview ) =
( '', '', -1, '', 0, '', '', -1, 0 );
my ( $scriptfilename, $directory, $verbosity, $timestamp , $debug, $chains , $log , $log_verbosity, $preview, $confess , $update , $annotate ) =
( '', '', -1, '', 0, '', '', -1, 0, 0, 0, 0, );
$export = 0;
$test = 0;
@@ -540,7 +556,10 @@ sub compiler {
log => { store => \$log },
log_verbosity => { store => \$log_verbosity, validate => \&validate_verbosity } ,
test => { store => \$test },
preview => { store => \$preview },
preview => { store => \$preview, validate=> \&validate_boolean } ,
confess => { store => \$confess, validate=> \&validate_boolean } ,
update => { store => \$update, validate=> \&validate_boolean } ,
annotate => { store => \$annotate, validate=> \&validate_boolean } ,
);
#
# P A R A M E T E R P R O C E S S I N G
@@ -570,11 +589,11 @@ sub compiler {
set_verbosity( $verbosity );
set_log($log, $log_verbosity) if $log;
set_timestamp( $timestamp );
set_debug( $debug );
set_debug( $debug , $confess );
#
# 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 );
get_configuration( $export , $update , $annotate );
report_capabilities unless $config{LOAD_HELPERS_ONLY};
@@ -593,7 +612,7 @@ sub compiler {
# Chain table initialization depends on shorewall.conf and capabilities. So it must be deferred until
# shorewall.conf has been processed and the capabilities have been determined.
#
initialize_chain_table;
initialize_chain_table(1);
#
# Allow user to load Perl modules
@@ -619,12 +638,12 @@ sub compiler {
#
# Do action pre-processing.
#
process_actions1;
process_actions;
#
# P O L I C Y
# (Produces no output to the compiled script)
#
validate_policy;
process_policies;
#
# N O T R A C K
# (Produces no output to the compiled script)
@@ -748,11 +767,6 @@ sub compiler {
#
setup_tunnels;
#
# Post-rules action processing.
#
process_actions2;
process_actions3;
#
# MACLIST Filtration again
#
setup_mac_lists 2;
@@ -771,7 +785,7 @@ sub compiler {
#
generate_matrix;
if ( $config{OPTIMIZE} & 0xD ) {
if ( $config{OPTIMIZE} & 0xE ) {
progress_message2 'Optimizing Ruleset...';
#
# Optimize Policy Chains
@@ -798,8 +812,8 @@ sub compiler {
# We must reinitialize Shorewall::Chains before generating the iptables-restore input
# for stopping the firewall
#
Shorewall::Chains::initialize( $family );
initialize_chain_table;
Shorewall::Chains::initialize( $family, 0 , $export );
initialize_chain_table(0);
#
# S T O P _ F I R E W A L L
# (Writes the stop_firewall() function to the compiled script)
@@ -840,7 +854,7 @@ sub compiler {
#
generate_matrix;
if ( $config{OPTIMIZE} & 6 ) {
if ( $config{OPTIMIZE} & 0xE ) {
progress_message2 'Optimizing Ruleset...';
#
# Optimize Policy Chains
@@ -849,7 +863,7 @@ sub compiler {
#
# Ruleset Optimization
#
optimize_ruleset if $config{OPTIMIZE} & 4;
optimize_ruleset if $config{OPTIMIZE} & 0xC;
}
enable_script if $debug;
@@ -862,8 +876,8 @@ sub compiler {
# Re-initialize the chain table so that process_routestopped() has the same
# environment that it would when called by compile_stop_firewall().
#
Shorewall::Chains::initialize( $family );
initialize_chain_table;
Shorewall::Chains::initialize( $family , 0 , $export );
initialize_chain_table(0);
if ( $debug ) {
compile_stop_firewall( $test, $export );

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2007,2008,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 2007,2008,2009,2010,2011 - Tom Eastep (teastep@shorewall.net)
#
# Complete documentation is available at http://shorewall.net
#
@@ -34,6 +34,8 @@ use strict;
our @ISA = qw(Exporter);
our @EXPORT = qw( ALLIPv4
ALLIPv6
NILIPv4
NILIPv6
IPv4_MULTICAST
IPv6_MULTICAST
IPv6_LINKLOCAL
@@ -44,6 +46,7 @@ our @EXPORT = qw( ALLIPv4
IPv6_SITE_ALLNODES
IPv6_SITE_ALLRTRS
ALLIP
NILIP
ALL
TCP
UDP
@@ -56,6 +59,7 @@ our @EXPORT = qw( ALLIPv4
validate_address
validate_net
decompose_net
compare_nets
validate_host
validate_range
ip_range_explicit
@@ -63,6 +67,9 @@ our @EXPORT = qw( ALLIPv4
allipv4
allipv6
allip
nilipv4
nilipv6
nilip
rfc1918_networks
resolve_proto
proto_name
@@ -73,24 +80,30 @@ our @EXPORT = qw( ALLIPv4
validate_icmp6
);
our @EXPORT_OK = qw( );
our $VERSION = '4.4_12';
our $VERSION = '4.4_20';
#
# Some IPv4/6 useful stuff
#
our @allipv4 = ( '0.0.0.0/0' );
our @allipv6 = ( '::/0' );
our $allip;
our @allip;
our $valid_address;
our $validate_address;
our $validate_net;
our $validate_range;
our $validate_host;
our $family;
my @allipv4 = ( '0.0.0.0/0' );
my @allipv6 = ( '::/0' );
my $allip;
my @allip;
my @nilipv4 = ( '0.0.0.0' );
my @nilipv6 = ( '::' );
my $nilip;
my @nilip;
my $valid_address;
my $validate_address;
my $validate_net;
my $validate_range;
my $validate_host;
my $family;
use constant { ALLIPv4 => '0.0.0.0/0' ,
ALLIPv6 => '::/0' ,
NILIPv4 => '0.0.0.0' ,
NILIPv6 => '::' ,
IPv4_MULTICAST => '224.0.0.0/4' ,
IPv6_MULTICAST => 'ff00::/8' ,
IPv6_LINKLOCAL => 'fe80::/10' ,
@@ -108,7 +121,7 @@ use constant { ALLIPv4 => '0.0.0.0/0' ,
SCTP => 132,
UDPLITE => 136 };
our @rfc1918_networks = ( "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16" );
my @rfc1918_networks = ( "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16" );
#
# Note: initialize() is declared at the bottom of the file
@@ -184,7 +197,16 @@ sub validate_4net( $$ ) {
$net = '' unless defined $net;
fatal_error "Missing address" if $net eq '';
fatal_error "An ipset name ($net) is not allowed in this context" if substr( $net, 0, 1 ) eq '+';
if ( $net =~ /\+(\[?)/ ) {
if ( $1 ) {
fatal_error "An ipset list ($net) is not allowed in this context";
} elsif ( $net =~ /^\+[a-zA-Z][-\w]*$/ ) {
fatal_error "An ipset name ($net) is not allowed in this context";
} else {
fatal_error "Invalid ipset name ($net)";
}
}
if ( defined $vlsm ) {
fatal_error "Invalid VLSM ($vlsm)" unless $vlsm =~ /^\d+$/ && $vlsm <= 32;
@@ -259,10 +281,19 @@ sub decompose_net( $ ) {
my $net = $_[0];
( $net, my $vlsm ) = validate_net( $net , 0 );
( encodeaddr( $net) , $vlsm );
( ( $family == F_IPV4 ? encodeaddr( $net) : normalize_6addr( $net ) ) , $vlsm );
}
sub compare_nets( $$ ) {
my ( @net1, @net2 );
@net1 = decompose_net( $_[0] );
@net2 = decompose_net( $_[1] );
$net1[0] eq $net2[0] && $net1[1] == $net2[1];
}
sub allipv4() {
@allipv4;
}
@@ -271,6 +302,14 @@ sub allipv6() {
@allipv6;
}
sub nilipv4() {
@nilipv4;
}
sub nilipv6() {
@nilipv6;
}
sub rfc1918_networks() {
@rfc1918_networks
}
@@ -291,13 +330,13 @@ sub resolve_proto( $ ) {
if ( $proto =~ /^\d+$/ || $proto =~ /^0x/ ) {
$number = numeric_value ( $proto );
defined $number && $number <= 65535 ? $number : undef;
defined $number && $number <= 255 ? $number : undef;
} else {
#
# Allow 'icmp' as a synonym for 'ipv6-icmp' in IPv6 compilations
#
$proto= 'ipv6-icmp' if $proto eq 'icmp' && $family == F_IPV6;
defined( $number = $nametoproto{$proto} ) ? $number : scalar getprotobyname $proto;
}
}
@@ -497,6 +536,7 @@ sub valid_6address( $ ) {
}
return 0 if @address > $max;
return 0 unless $address =~ /^[a-f:\d]+$/;
return 0 unless ( @address == $max ) || $address =~ /::/;
return 0 if $address =~ /:::/ || $address =~ /::.*::/;
@@ -540,7 +580,15 @@ sub validate_6net( $$ ) {
my ($net, $vlsm, $rest) = split( '/', $_[0], 3 );
my $allow_name = $_[1];
fatal_error "An ipset name ($net) is not allowed in this context" if substr( $net, 0, 1 ) eq '+';
if ( $net =~ /\+(\[?)/ ) {
if ( $1 ) {
fatal_error "An ipset list ($net) is not allowed in this context";
} elsif ( $net =~ /^\+[a-zA-Z][-\w]*$/ ) {
fatal_error "An ipset name ($net) is not allowed in this context";
} else {
fatal_error "Invalid ipset name ($net)";
}
}
if ( defined $vlsm ) {
fatal_error "Invalid VLSM ($vlsm)" unless $vlsm =~ /^\d+$/ && $vlsm <= 128;
@@ -549,6 +597,16 @@ sub validate_6net( $$ ) {
} else {
fatal_error "Invalid Network address ($_[0])" if $_[0] =~ '/' || ! defined $net;
validate_6address $net, $allow_name;
$vlsm = 128;
}
if ( defined wantarray ) {
assert ( ! $allow_name );
if ( wantarray ) {
( $net , $vlsm );
} else {
"$net/$vlsm";
}
}
}
@@ -657,6 +715,14 @@ sub allip() {
@allip;
}
sub NILIP() {
$nilip;
}
sub nilip() {
@nilip;
}
sub valid_address ( $ ) {
$valid_address->(@_);
}
@@ -693,6 +759,8 @@ sub initialize( $ ) {
if ( $family == F_IPV4 ) {
$allip = ALLIPv4;
@allip = @allipv4;
$nilip = NILIPv4;
@nilip = @nilipv4;
$valid_address = \&valid_4address;
$validate_address = \&validate_4address;
$validate_net = \&validate_4net;
@@ -701,6 +769,8 @@ sub initialize( $ ) {
} else {
$allip = ALLIPv6;
@allip = @allipv6;
$nilip = NILIPv6;
@nilip = @nilipv6;
$valid_address = \&valid_6address;
$validate_address = \&validate_6address;
$validate_net = \&validate_6net;

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2007,2008,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 2007,2008,2009,2010,2011 - Tom Eastep (teastep@shorewall.net)
#
# Complete documentation is available at http://shorewall.net
#
@@ -36,10 +36,10 @@ use strict;
our @ISA = qw(Exporter);
our @EXPORT = qw( setup_masq setup_nat setup_netmap add_addresses );
our @EXPORT_OK = ();
our $VERSION = '4.4_13';
our $VERSION = '4.4_21';
our @addresses_to_add;
our %addresses_to_add;
my @addresses_to_add;
my %addresses_to_add;
#
# Called by the compiler
@@ -155,6 +155,7 @@ sub process_one_masq( )
my $exceptionrule = '';
my $randomize = '';
my $persistent = '';
my $conditional = 0;
#
# Parse the ADDRESSES column
#
@@ -186,7 +187,14 @@ sub process_one_masq( )
} else {
my $addrlist = '';
for my $addr ( split_list $addresses , 'address' ) {
if ( $addr =~ /^.*\..*\..*\./ ) {
if ( $addr =~ /^&(.+)$/ ) {
$target = 'SNAT ';
if ( $conditional = conditional_rule( $chainref, $addr ) ) {
$addrlist .= '--to-source ' . get_interface_address $1;
} else {
$addrlist .= '--to-source ' . record_runtime_address $1;
}
} elsif ( $addr =~ /^.*\..*\..*\./ ) {
$target = 'SNAT ';
my ($ipaddr, $rest) = split ':', $addr;
if ( $ipaddr =~ /^(.+)-(.+)$/ ) {
@@ -197,8 +205,12 @@ sub process_one_masq( )
$addrlist .= "--to-source $addr ";
$exceptionrule = do_proto( $proto, '', '' ) if $addr =~ /:/;
} else {
$addr =~ s/^://;
$addrlist .= "--to-ports $addr ";
my $ports = $addr;
$ports =~ s/^://;
my $portrange = $ports;
$portrange =~ s/-/:/;
validate_portpair( $proto, $portrange );
$addrlist .= "--to-ports $ports ";
$exceptionrule = do_proto( $proto, '', '' );
}
}
@@ -226,10 +238,7 @@ sub process_one_masq( )
'' ,
$exceptionrule );
if ( $detectaddress ) {
decr_cmd_level( $chainref );
add_commands( $chainref , 'fi' );
}
conditional_rule_end( $chainref ) if $detectaddress || $conditional;
if ( $add_snat_aliases ) {
my ( $interface, $alias , $remainder ) = split( /:/, $fullinterface, 3 );
@@ -262,14 +271,14 @@ sub process_one_masq( )
#
sub setup_masq()
{
my $fn = open_file 'masq';
if ( my $fn = open_file 'masq' ) {
first_entry( sub { progress_message2 "$doing $fn..."; require_capability 'NAT_ENABLED' , 'a non-empty masq file' , 's'; } );
first_entry( sub { progress_message2 "$doing $fn..."; require_capability 'NAT_ENABLED' , 'a non-empty masq file' , 's'; } );
process_one_masq while read_a_line;
clear_comment;
process_one_masq while read_a_line;
clear_comment;
}
}
#
@@ -359,32 +368,32 @@ sub do_one_nat( $$$$$ )
#
sub setup_nat() {
my $fn = open_file 'nat';
if ( my $fn = open_file 'nat' ) {
first_entry( sub { progress_message2 "$doing $fn..."; require_capability 'NAT_ENABLED' , 'a non-empty nat file' , 's'; } );
first_entry( sub { progress_message2 "$doing $fn..."; require_capability 'NAT_ENABLED' , 'a non-empty nat file' , 's'; } );
while ( read_a_line ) {
while ( read_a_line ) {
my ( $external, $interfacelist, $internal, $allints, $localnat ) = split_line1 3, 5, 'nat file';
my ( $external, $interfacelist, $internal, $allints, $localnat ) = split_line1 3, 5, 'nat file';
if ( $external eq 'COMMENT' ) {
process_comment;
} else {
( $interfacelist, my $digit ) = split /:/, $interfacelist;
if ( $external eq 'COMMENT' ) {
process_comment;
} else {
( $interfacelist, my $digit ) = split /:/, $interfacelist;
$digit = defined $digit ? ":$digit" : '';
$digit = defined $digit ? ":$digit" : '';
for my $interface ( split_list $interfacelist , 'interface' ) {
fatal_error "Invalid Interface List ($interfacelist)" unless defined $interface && $interface ne '';
do_one_nat $external, "${interface}${digit}", $internal, $allints, $localnat;
for my $interface ( split_list $interfacelist , 'interface' ) {
fatal_error "Invalid Interface List ($interfacelist)" unless supplied $interface;
do_one_nat $external, "${interface}${digit}", $internal, $allints, $localnat;
}
progress_message " NAT entry \"$currentline\" $done";
}
progress_message " NAT entry \"$currentline\" $done";
}
clear_comment;
}
clear_comment;
}
#
@@ -392,40 +401,43 @@ sub setup_nat() {
#
sub setup_netmap() {
my $fn = open_file 'netmap';
if ( my $fn = open_file 'netmap' ) {
first_entry( sub { progress_message2 "$doing $fn..."; require_capability 'NAT_ENABLED' , 'a non-empty netmap file' , 's'; } );
first_entry( sub { progress_message2 "$doing $fn..."; require_capability 'NAT_ENABLED' , 'a non-empty netmap file' , 's'; } );
while ( read_a_line ) {
while ( read_a_line ) {
my ( $type, $net1, $interfacelist, $net2, $net3 ) = split_line 4, 5, 'netmap file';
my ( $type, $net1, $interfacelist, $net2, $net3 ) = split_line 4, 5, 'netmap file';
$net3 = ALLIP if $net3 eq '-';
$net3 = ALLIP if $net3 eq '-';
for my $interface ( split_list $interfacelist, 'interface' ) {
for my $interface ( split_list $interfacelist, 'interface' ) {
my $rulein = '';
my $ruleout = '';
my $iface = $interface;
my $rulein = '';
my $ruleout = '';
my $iface = $interface;
fatal_error "Unknown interface ($interface)" unless my $interfaceref = known_interface( $interface );
fatal_error "Unknown interface ($interface)" unless my $interfaceref = known_interface( $interface );
unless ( $interfaceref->{root} ) {
$rulein = match_source_dev( $interface );
$ruleout = match_dest_dev( $interface );
$interface = $interfaceref->{name};
unless ( $interfaceref->{root} ) {
$rulein = match_source_dev( $interface );
$ruleout = match_dest_dev( $interface );
$interface = $interfaceref->{name};
}
if ( $type eq 'DNAT' ) {
add_rule ensure_chain( 'nat' , input_chain $interface ) , $rulein . match_source_net( $net3 ) . "-d $net1 -j NETMAP --to $net2";
} elsif ( $type eq 'SNAT' ) {
add_rule ensure_chain( 'nat' , output_chain $interface ) , $ruleout . match_dest_net( $net3 ) . "-s $net1 -j NETMAP --to $net2";
} else {
fatal_error "Invalid type ($type)";
}
progress_message " Network $net1 on $iface mapped to $net2 ($type)";
}
if ( $type eq 'DNAT' ) {
add_rule ensure_chain( 'nat' , input_chain $interface ) , $rulein . match_source_net( $net3 ) . "-d $net1 -j NETMAP --to $net2";
} elsif ( $type eq 'SNAT' ) {
add_rule ensure_chain( 'nat' , output_chain $interface ) , $ruleout . match_dest_net( $net3 ) . "-s $net1 -j NETMAP --to $net2";
} else {
fatal_error "Invalid type ($type)";
}
progress_message " Network $net1 on $iface mapped to $net2 ($type)";
}
clear_comment;
}
}

View File

@@ -1,533 +0,0 @@
#
# Shorewall 4.4 -- /usr/share/shorewall/Shorewall/Policy.pm
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2007,2008,2009,2010 - 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.
#
# This module deals with the /etc/shorewall/policy file.
#
package Shorewall::Policy;
require Exporter;
use Shorewall::Config qw(:DEFAULT :internal);
use Shorewall::Zones;
use Shorewall::Chains qw( :DEFAULT :internal) ;
use Shorewall::Actions;
use strict;
our @ISA = qw(Exporter);
our @EXPORT = qw( validate_policy apply_policy_rules complete_standard_chain setup_syn_flood_chains save_policies optimize_policy_chains);
our @EXPORT_OK = qw( );
our $VERSION = '4.4_12';
# @policy_chains is a list of references to policy chains in the filter table
our @policy_chains;
#
# Called by the compiler
#
sub initialize() {
@policy_chains = ();
}
#
# Convert a chain into a policy chain.
#
sub convert_to_policy_chain($$$$$)
{
my ($chainref, $source, $dest, $policy, $provisional ) = @_;
$chainref->{is_policy} = 1;
$chainref->{policy} = $policy;
$chainref->{provisional} = $provisional;
$chainref->{policychain} = $chainref->{name};
$chainref->{policypair} = [ $source, $dest ];
}
#
# Create a new policy chain and return a reference to it.
#
sub new_policy_chain($$$$)
{
my ($source, $dest, $policy, $provisional) = @_;
my $chainref = new_chain( 'filter', rules_chain( ${source}, ${dest} ) );
convert_to_policy_chain( $chainref, $source, $dest, $policy, $provisional );
$chainref;
}
#
# Set the passed chain's policychain and policy to the passed values.
#
sub set_policy_chain($$$$$)
{
my ($source, $dest, $chain1, $chainref, $policy ) = @_;
my $chainref1 = $filter_table->{$chain1};
$chainref1 = new_chain 'filter', $chain1 unless $chainref1;
unless ( $chainref1->{policychain} ) {
if ( $config{EXPAND_POLICIES} ) {
#
# We convert the canonical chain into a policy chain, using the settings of the
# passed policy chain.
#
$chainref1->{policychain} = $chain1;
$chainref1->{loglevel} = $chainref->{loglevel} if defined $chainref->{loglevel};
if ( defined $chainref->{synparams} ) {
$chainref1->{synparams} = $chainref->{synparams};
$chainref1->{synchain} = $chainref->{synchain};
}
$chainref1->{default} = $chainref->{default} if defined $chainref->{default};
$chainref1->{is_policy} = 1;
push @policy_chains, $chainref1;
} else {
$chainref1->{policychain} = $chainref->{name};
}
$chainref1->{policy} = $policy;
$chainref1->{policypair} = [ $source, $dest ];
}
}
#
# Process the policy file
#
use constant { PROVISIONAL => 1 };
sub add_or_modify_policy_chain( $$ ) {
my ( $zone, $zone1 ) = @_;
my $chain = rules_chain( ${zone}, ${zone1} );
my $chainref = $filter_table->{$chain};
if ( $chainref ) {
unless( $chainref->{is_policy} ) {
convert_to_policy_chain( $chainref, $zone, $zone1, 'CONTINUE', PROVISIONAL );
push @policy_chains, $chainref;
}
} else {
push @policy_chains, ( new_policy_chain $zone, $zone1, 'CONTINUE', PROVISIONAL );
}
}
sub print_policy($$$$) {
my ( $source, $dest, $policy , $chain ) = @_;
unless ( ( $source eq 'all' ) || ( $dest eq 'all' ) ) {
if ( $policy eq 'CONTINUE' ) {
my ( $sourceref, $destref ) = ( find_zone($source) ,find_zone( $dest ) );
warning_message "CONTINUE policy between two un-nested zones ($source, $dest)" if ! ( @{$sourceref->{parents}} || @{$destref->{parents}} );
}
progress_message_nocompress " Policy for $source to $dest is $policy using chain $chain" unless $source eq $dest;
}
}
sub process_a_policy() {
our %validpolicies;
our @zonelist;
my ( $client, $server, $originalpolicy, $loglevel, $synparams, $connlimit ) = split_line 3, 6, 'policy file';
$loglevel = '' if $loglevel eq '-';
$synparams = '' if $synparams eq '-';
$connlimit = '' if $connlimit eq '-';
my $clientwild = ( "\L$client" eq 'all' );
fatal_error "Undefined zone ($client)" unless $clientwild || defined_zone( $client );
my $serverwild = ( "\L$server" eq 'all' );
fatal_error "Undefined zone ($server)" unless $serverwild || defined_zone( $server );
my ( $policy, $default, $remainder ) = split( /:/, $originalpolicy, 3 );
fatal_error "Invalid or missing POLICY ($originalpolicy)" unless $policy;
fatal_error "Invalid default action ($default:$remainder)" if defined $remainder;
( $policy , my $queue ) = get_target_param $policy;
if ( $default ) {
if ( "\L$default" eq 'none' ) {
$default = 'none';
} else {
my $defaulttype = $targets{$default} || 0;
if ( $defaulttype & ACTION ) {
unless ( $usedactions{$default} ) {
$usedactions{$default} = 1;
createactionchain $default;
}
} else {
fatal_error "Unknown Default Action ($default)";
}
}
} else {
$default = $default_actions{$policy} || '';
}
fatal_error "Invalid policy ($policy)" unless exists $validpolicies{$policy};
if ( defined $queue ) {
fatal_error "Invalid policy ($policy($queue))" unless $policy eq 'NFQUEUE';
require_capability( 'NFQUEUE_TARGET', 'An NFQUEUE Policy', 's' );
my $queuenum = numeric_value( $queue );
fatal_error "Invalid NFQUEUE queue number ($queue)" unless defined( $queuenum) && $queuenum <= 65535;
$policy = "NFQUEUE --queue-num $queuenum";
} elsif ( $policy eq 'NONE' ) {
fatal_error "NONE policy not allowed with \"all\""
if $clientwild || $serverwild;
fatal_error "NONE policy not allowed to/from firewall zone"
if ( zone_type( $client ) == FIREWALL ) || ( zone_type( $server ) == FIREWALL );
}
unless ( $clientwild || $serverwild ) {
if ( zone_type( $server ) == BPORT ) {
fatal_error "Invalid policy - DEST zone is a Bridge Port zone but the SOURCE zone is not associated with the same bridge"
unless find_zone( $client )->{bridge} eq find_zone( $server)->{bridge} || single_interface( $client ) eq find_zone( $server )->{bridge};
}
}
my $chain = rules_chain( ${client}, ${server} );
my $chainref;
if ( defined $filter_table->{$chain} ) {
$chainref = $filter_table->{$chain};
if ( $chainref->{is_policy} ) {
if ( $chainref->{provisional} ) {
$chainref->{provisional} = 0;
$chainref->{policy} = $policy;
} else {
fatal_error qq(Policy "$client $server $policy" duplicates earlier policy "@{$chainref->{policypair}} $chainref->{policy}");
}
} elsif ( $chainref->{policy} ) {
fatal_error qq(Policy "$client $server $policy" duplicates earlier policy "@{$chainref->{policypair}} $chainref->{policy}");
} else {
convert_to_policy_chain( $chainref, $client, $server, $policy, 0 );
push @policy_chains, ( $chainref ) unless $config{EXPAND_POLICIES} && ( $clientwild || $serverwild );
}
} else {
$chainref = new_policy_chain $client, $server, $policy, 0;
push @policy_chains, ( $chainref ) unless $config{EXPAND_POLICIES} && ( $clientwild || $serverwild );
}
$chainref->{loglevel} = validate_level( $loglevel ) if defined $loglevel && $loglevel ne '';
if ( $synparams ne '' || $connlimit ne '' ) {
my $value = '';
fatal_error "Invalid CONNLIMIT ($connlimit)" if $connlimit =~ /^!/;
$value = do_ratelimit $synparams, 'ACCEPT' if $synparams ne '';
$value .= do_connlimit $connlimit if $connlimit ne '';
$chainref->{synparams} = $value;
$chainref->{synchain} = $chain
}
$chainref->{default} = $default if $default;
if ( $clientwild ) {
if ( $serverwild ) {
for my $zone ( @zonelist ) {
for my $zone1 ( @zonelist ) {
set_policy_chain $client, $server, rules_chain( ${zone}, ${zone1} ), $chainref, $policy;
print_policy $zone, $zone1, $policy, $chain;
}
}
} else {
for my $zone ( all_zones ) {
set_policy_chain $client, $server, rules_chain( ${zone}, ${server} ), $chainref, $policy;
print_policy $zone, $server, $policy, $chain;
}
}
} elsif ( $serverwild ) {
for my $zone ( @zonelist ) {
set_policy_chain $client, $server, rules_chain( ${client}, ${zone} ), $chainref, $policy;
print_policy $client, $zone, $policy, $chain;
}
} else {
print_policy $client, $server, $policy, $chain;
}
}
sub save_policies() {
for my $zone1 ( all_zones ) {
for my $zone2 ( all_zones ) {
my $chainref = $filter_table->{ rules_chain( $zone1, $zone2 ) };
my $policyref = $filter_table->{ $chainref->{policychain} };
if ( $policyref->{referenced} ) {
emit_unindented "$zone1 \t=>\t$zone2\t" . $policyref->{policy} . ' using chain ' . $policyref->{name};
} elsif ( $zone1 ne $zone2 ) {
emit_unindented "$zone1 \t=>\t$zone2\t" . $policyref->{policy};
}
}
}
}
sub validate_policy()
{
our %validpolicies = (
ACCEPT => undef,
REJECT => undef,
DROP => undef,
CONTINUE => undef,
QUEUE => undef,
NFQUEUE => undef,
NONE => undef
);
our %map = ( DROP_DEFAULT => 'DROP' ,
REJECT_DEFAULT => 'REJECT' ,
ACCEPT_DEFAULT => 'ACCEPT' ,
QUEUE_DEFAULT => 'QUEUE' ,
NFQUEUE_DEFAULT => 'NFQUEUE' );
my $zone;
my $firewall = firewall_zone;
our @zonelist = $config{EXPAND_POLICIES} ? all_zones : ( all_zones, 'all' );
for my $option qw/DROP_DEFAULT REJECT_DEFAULT ACCEPT_DEFAULT QUEUE_DEFAULT NFQUEUE_DEFAULT/ {
my $action = $config{$option};
next if $action eq 'none';
my $actiontype = $targets{$action};
if ( defined $actiontype ) {
fatal_error "Invalid setting ($action) for $option" unless $actiontype & ACTION;
} else {
fatal_error "Default Action $option=$action not found";
}
unless ( $usedactions{$action} ) {
$usedactions{$action} = 1;
createactionchain $action;
}
$default_actions{$map{$option}} = $action;
}
for $zone ( all_zones ) {
push @policy_chains, ( new_policy_chain $zone, $zone, 'ACCEPT', PROVISIONAL );
push @policy_chains, ( new_policy_chain firewall_zone, $zone, 'NONE', PROVISIONAL ) if zone_type( $zone ) == BPORT;
my $zoneref = find_zone( $zone );
if ( $config{IMPLICIT_CONTINUE} && ( @{$zoneref->{parents}} || $zoneref->{type} == VSERVER ) ) {
for my $zone1 ( all_zones ) {
unless( $zone eq $zone1 ) {
add_or_modify_policy_chain( $zone, $zone1 );
add_or_modify_policy_chain( $zone1, $zone );
}
}
}
}
my $fn = open_file 'policy';
first_entry "$doing $fn...";
process_a_policy while read_a_line;
for $zone ( all_zones ) {
for my $zone1 ( all_zones ) {
fatal_error "No policy defined from zone $zone to zone $zone1" unless $filter_table->{rules_chain( ${zone}, ${zone1} )}{policy};
}
}
}
#
# Policy Rule application
#
sub policy_rules( $$$$$ ) {
my ( $chainref , $target, $loglevel, $default, $dropmulticast ) = @_;
unless ( $target eq 'NONE' ) {
add_rule $chainref, "-d 224.0.0.0/4 -j RETURN" if $dropmulticast && $target ne 'CONTINUE' && $target ne 'ACCEPT';
add_jump $chainref, $default, 0 if $default && $default ne 'none';
log_rule $loglevel , $chainref , $target , '' if $loglevel ne '';
fatal_error "Null target in policy_rules()" unless $target;
add_jump( $chainref , $target eq 'REJECT' ? 'reject' : $target, 1 ) unless $target eq 'CONTINUE';
}
}
sub report_syn_flood_protection() {
progress_message_nocompress ' Enabled SYN flood protection';
}
sub default_policy( $$$ ) {
my $chainref = $_[0];
my $policyref = $filter_table->{$chainref->{policychain}};
my $synparams = $policyref->{synparams};
my $default = $policyref->{default};
my $policy = $policyref->{policy};
my $loglevel = $policyref->{loglevel};
assert( $policyref );
if ( $chainref eq $policyref ) {
policy_rules $chainref , $policy, $loglevel , $default, $config{MULTICAST};
} else {
if ( $policy eq 'ACCEPT' || $policy eq 'QUEUE' || $policy =~ /^NFQUEUE/ ) {
if ( $synparams ) {
report_syn_flood_protection;
policy_rules $chainref , $policy , $loglevel , $default, $config{MULTICAST};
} else {
add_jump $chainref, $policyref, 1;
$chainref = $policyref;
}
} elsif ( $policy eq 'CONTINUE' ) {
report_syn_flood_protection if $synparams;
policy_rules $chainref , $policy , $loglevel , $default, $config{MULTICAST};
} else {
report_syn_flood_protection if $synparams;
add_jump $chainref , $policyref, 1;
$chainref = $policyref;
}
}
progress_message_nocompress " Policy $policy from $_[1] to $_[2] using chain $chainref->{name}";
}
sub apply_policy_rules() {
progress_message2 'Applying Policies...';
for my $chainref ( @policy_chains ) {
my $policy = $chainref->{policy};
unless ( $policy eq 'NONE' ) {
my $loglevel = $chainref->{loglevel};
my $provisional = $chainref->{provisional};
my $default = $chainref->{default};
my $name = $chainref->{name};
my $synparms = $chainref->{synparms};
unless ( $chainref->{referenced} || $provisional || $policy eq 'CONTINUE' ) {
if ( $config{OPTIMIZE} & 2 ) {
#
# This policy chain is empty and the only thing that we would put in it is
# the policy-related stuff. Don't create it if all we are going to put in it
# is a single jump. Generate_matrix() will just use the policy target when
# needed.
#
ensure_filter_chain $name, 1 if $default ne 'none' || $loglevel || $synparms || $config{MULTICAST} || ! ( $policy eq 'ACCEPT' || $config{FASTACCEPT} );
} else {
ensure_filter_chain $name, 1;
}
}
if ( $name =~ /^all[-2]|[-2]all$/ ) {
run_user_exit $chainref;
policy_rules $chainref , $policy, $loglevel , $default, $config{MULTICAST};
}
}
}
for my $zone ( all_zones ) {
for my $zone1 ( all_zones ) {
my $chainref = $filter_table->{rules_chain( ${zone}, ${zone1} )};
if ( $chainref->{referenced} ) {
run_user_exit $chainref;
default_policy $chainref, $zone, $zone1;
}
}
}
}
#
# Complete a standard chain
#
# - run any supplied user exit
# - search the policy file for an applicable policy and add rules as
# appropriate
# - If no applicable policy is found, add rules for an assummed
# policy of DROP INFO
#
sub complete_standard_chain ( $$$$ ) {
my ( $stdchainref, $zone, $zone2, $default ) = @_;
add_rule $stdchainref, "$globals{STATEMATCH} ESTABLISHED,RELATED -j ACCEPT" unless $config{FASTACCEPT};
run_user_exit $stdchainref;
my $ruleschainref = $filter_table->{rules_chain( ${zone}, ${zone2} ) } || $filter_table->{rules_chain( 'all', 'all' ) };
my ( $policy, $loglevel, $defaultaction ) = ( $default , 6, $config{$default . '_DEFAULT'} );
my $policychainref;
$policychainref = $filter_table->{$ruleschainref->{policychain}} if $ruleschainref;
( $policy, $loglevel, $defaultaction ) = @{$policychainref}{'policy', 'loglevel', 'default' } if $policychainref;
policy_rules $stdchainref , $policy , $loglevel, $defaultaction, 0;
}
#
# Create and populate the synflood chains corresponding to entries in /etc/shorewall/policy
#
sub setup_syn_flood_chains() {
for my $chainref ( @policy_chains ) {
my $limit = $chainref->{synparams};
if ( $limit && ! $filter_table->{syn_flood_chain $chainref} ) {
my $level = $chainref->{loglevel};
my $synchainref = new_chain 'filter' , syn_flood_chain $chainref;
add_rule $synchainref , "${limit}-j RETURN";
log_rule_limit( $level ,
$synchainref ,
$chainref->{name} ,
'DROP',
$globals{LOGLIMIT} || '-m limit --limit 5/min --limit-burst 5 ' ,
'' ,
'add' ,
'' )
if $level ne '';
add_rule $synchainref, '-j DROP';
}
}
}
#
# Optimize Policy chains with ACCEPT policy
#
sub optimize_policy_chains() {
for my $chainref ( grep $_->{policy} eq 'ACCEPT', @policy_chains ) {
optimize_chain ( $chainref );
}
#
# Often, fw->all has an ACCEPT policy. This code allows optimization in that case
#
my $outputrules = $filter_table->{OUTPUT}{rules};
if ( @{$outputrules} && $outputrules->[-1] =~ /-j ACCEPT/ ) {
optimize_chain( $filter_table->{OUTPUT} );
}
progress_message ' Policy chains optimized';
progress_message '';
}
1;

View File

@@ -3,7 +3,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2007,2008,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 2007,2008,2009,2010,2011 - Tom Eastep (teastep@shorewall.net)
#
# Complete documentation is available at http://shorewall.net
#
@@ -106,7 +106,7 @@ sub setup_route_filtering() {
my $val = '';
if ( $config{ROUTE_FILTER} ne '' ) {
if ( $config ne '' ) {
$val = $config eq 'on' ? 1 : $config eq 'off' ? 0 : $config;
emit ( 'for file in /proc/sys/net/ipv4/conf/*; do',
@@ -227,6 +227,10 @@ sub setup_forwarding( $$ ) {
}
emit '';
emit ( ' echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables' ,
''
) if have_bridges;
} else {
if ( $config{IP_FORWARDING} eq 'on' ) {
emit ' echo 1 > /proc/sys/net/ipv6/conf/all/forwarding';
@@ -238,6 +242,10 @@ sub setup_forwarding( $$ ) {
emit '';
emit ( ' echo 1 > /proc/sys/net/bridge/bridge-nf-call-ip6tables' ,
''
) if have_bridges;
my $interfaces = find_interfaces_by_option 'forward';
if ( @$interfaces ) {

View File

@@ -3,7 +3,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2007,2008,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 2007,2008,2009,2010.2011 - Tom Eastep (teastep@shorewall.net)
#
# Complete documentation is available at http://shorewall.net
#
@@ -18,10 +18,10 @@
#
# 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.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MAS 02110-1301 USA.
#
# This module deals with the /etc/shorewall/providers and
# /etc/shorewall/route_rules files.
# This module deals with the /etc/shorewall/providers,
# /etc/shorewall/route_rules and /etc/shorewall/routes files.
#
package Shorewall::Providers;
require Exporter;
@@ -35,7 +35,7 @@ use strict;
our @ISA = qw(Exporter);
our @EXPORT = qw( setup_providers @routemarked_interfaces handle_stickiness handle_optional_interfaces );
our @EXPORT_OK = qw( initialize lookup_provider );
our $VERSION = '4.4_13';
our $VERSION = '4.4_21';
use constant { LOCAL_TABLE => 255,
MAIN_TABLE => 254,
@@ -43,23 +43,23 @@ use constant { LOCAL_TABLE => 255,
UNSPEC_TABLE => 0
};
our @routemarked_providers;
our %routemarked_interfaces;
my @routemarked_providers;
my %routemarked_interfaces;
our @routemarked_interfaces;
our %provider_interfaces;
my %provider_interfaces;
our $balancing;
our $fallback;
our $first_default_route;
our $first_fallback_route;
my $balancing;
my $fallback;
my $first_default_route;
my $first_fallback_route;
our %providers;
my %providers;
our @providers;
my @providers;
our $family;
my $family;
our $lastmark;
my $lastmark;
use constant { ROUTEMARKED_SHARED => 1, ROUTEMARKED_UNSHARED => 2 };
@@ -121,7 +121,9 @@ sub setup_route_marking() {
}
if ( $providerref->{shared} ) {
add_commands( $chainref, qq(if [ -n "$providerref->{mac}" ]; then) ), incr_cmd_level( $chainref ) if $providerref->{optional};
add_rule $chainref, match_source_dev( $interface ) . "-m mac --mac-source $providerref->{mac} -j MARK --set-mark $providerref->{mark}";
decr_cmd_level( $chainref ), add_commands( $chainref, "fi\n" ) if $providerref->{optional};
} else {
add_rule $chainref, match_source_dev( $interface ) . "-j MARK --set-mark $providerref->{mark}";
}
@@ -138,13 +140,13 @@ sub copy_table( $$$ ) {
my $filter = $family == F_IPV6 ? q(sed 's/ via :: / /' | ) : '';
if ( $realm ) {
emit ( "\$IP -$family route show table $duplicate | sed -r 's/ realm [[:alnum:]_]+//' | while read net route; do" )
emit ( "\$IP -$family -o route show table $duplicate | sed -r 's/ realm [[:alnum:]_]+//' | while read net route; do" )
} else {
emit ( "\$IP -$family route show table $duplicate | ${filter}while read net route; do" )
emit ( "\$IP -$family -o route show table $duplicate | ${filter}while read net route; do" )
}
emit ( ' case $net in',
' default|nexthop)',
' default)',
' ;;',
' *)',
" run_ip route add table $number \$net \$route $realm",
@@ -170,13 +172,13 @@ sub copy_and_edit_table( $$$$ ) {
$copy =~ s/\+/*/;
if ( $realm ) {
emit ( "\$IP -$family route show table $duplicate | sed -r 's/ realm [[:alnum:]]+//' | while read net route; do" )
emit ( "\$IP -$family -o route show table $duplicate | sed -r 's/ realm [[:alnum:]]+//' | while read net route; do" )
} else {
emit ( "\$IP -$family route show table $duplicate | ${filter}while read net route; do" )
emit ( "\$IP -$family -o route show table $duplicate | ${filter}while read net route; do" )
}
emit ( ' case $net in',
' default|nexthop)',
' default)',
' ;;',
' *)',
' case $(find_device $route) in',
@@ -275,7 +277,7 @@ sub add_a_provider( ) {
require_capability 'REALM_MATCH', "Configuring multiple providers through one interface", "s";
}
fatal_error "Unknown Interface ($interface)" unless known_interface( $interface, 1 );
fatal_error "Unknown Interface ($interface)" unless known_interface( $interface );
fatal_error "A bridge port ($interface) may not be configured as a provider interface" if port_to_bridge $interface;
my $physical = get_physical $interface;
@@ -347,6 +349,8 @@ sub add_a_provider( ) {
}
}
fatal_error q(The 'balance' and 'fallback' options are mutually exclusive) if $balance && $default;
my $val = 0;
my $pref;
@@ -427,7 +431,7 @@ sub add_a_provider( ) {
if ( $gatewaycase eq 'none' ) {
if ( $local ) {
emit "run_ip route add local 0.0.0.0/0 dev $physical table $number";
emit 'run_ip route add local ' . ALLIP . " dev $physical table $number";
} else {
emit "run_ip route add default dev $physical table $number";
}
@@ -464,9 +468,18 @@ sub add_a_provider( ) {
if ( $gateway ) {
$address = get_interface_address $interface unless $address;
emit "run_ip route replace $gateway src $address dev $physical ${mtu}table $number $realm";
if ( $family == F_IPV4 ) {
emit "run_ip route replace $gateway src $address dev $physical ${mtu}";
emit "run_ip route replace $gateway src $address dev $physical ${mtu}table $number $realm";
} else {
emit "qt \$IP -6 route del $gateway src $address dev $physical ${mtu}";
emit "run_ip route add $gateway src $address dev $physical ${mtu}";
emit "qt \$IP -6 route del $gateway src $address dev $physical ${mtu}table $number $realm";
emit "run_ip route add $gateway src $address dev $physical ${mtu}table $number $realm";
}
emit "run_ip route add default via $gateway src $address dev $physical ${mtu}table $number $realm";
}
}
balance_default_route $balance , $gateway, $physical, $realm if $balance;
@@ -475,7 +488,12 @@ sub add_a_provider( ) {
} elsif ( $default ) {
emit '';
if ( $gateway ) {
emit qq(run_ip route replace default via $gateway src $address dev $physical table ) . DEFAULT_TABLE . qq( metric $number);
if ( $family == F_IPV4 ) {
emit qq(run_ip route replace default via $gateway src $address dev $physical table ) . DEFAULT_TABLE . qq( metric $number);
} else {
emit qq(qt \$IP -6 route del default via $gateway src $address dev $physical table ) . DEFAULT_TABLE . qq( metric $number);
emit qq(run_ip route add default via $gateway src $address dev $physical table ) . DEFAULT_TABLE . qq( metric $number);
}
emit qq(echo "qt \$IP -$family route del default via $gateway table ) . DEFAULT_TABLE . qq(" >> \${VARDIR}/undo_routing);
} else {
emit qq(run_ip route add default table ) . DEFAULT_TABLE . qq( dev $physical metric $number);
@@ -520,7 +538,7 @@ sub add_a_provider( ) {
if ( $optional ) {
if ( $shared ) {
emit ( " error_message \"WARNING: Gateway $gateway is not reachable -- Provider $table ($number) not Added\"" );
emit ( " error_message \"WARNING: Gateway $gateway is not reachable -- Provider $table ($number) not Added\"" );
} else {
emit ( " error_message \"WARNING: Interface $physical is not usable -- Provider $table ($number) not Added\"" );
}
@@ -631,7 +649,7 @@ sub add_an_rtrule( ) {
my $base = uc chain_base( $providers{$provider}{physical} );
finish_current_if if $base ne $current_if;
start_new_if( $base ) unless $current_if;
} else {
} else {
finish_current_if;
}
@@ -641,15 +659,70 @@ sub add_an_rtrule( ) {
progress_message " Routing rule \"$currentline\" $done";
}
#
# This probably doesn't belong here but looking forward to the day when we get Shorewall out of the routing business,
# it makes sense to keep all of the routing code together
#
sub add_a_route( ) {
my ( $provider, $dest, $gateway, $device ) = split_line 2, 4, 'routes file';
our $current_if;
unless ( $providers{$provider} ) {
my $found = 0;
if ( "\L$provider" =~ /^(0x[a-f0-9]+|0[0-7]*|[0-9]*)$/ ) {
my $provider_number = numeric_value $provider;
for ( keys %providers ) {
if ( $providers{$_}{number} == $provider_number ) {
$provider = $_;
fatal_error "You may not add routes to the $provider table" if $provider_number == LOCAL_TABLE || $provider_number == UNSPEC_TABLE;
$found = 1;
last;
}
}
}
fatal_error "Unknown provider ($provider)" unless $found;
}
validate_net ( $dest, 1 );
validate_address ( $gateway, 1 ) if $gateway ne '-';
my ( $optional, $number ) = ( $providers{$provider}{optional} , $providers{$provider}{number} );
my $physical = $device eq '-' ? $providers{$provider}{physical} : physical_name( $device );
if ( $providers{$provider}{optional} ) {
my $base = uc chain_base( $physical );
finish_current_if if $base ne $current_if;
start_new_if ( $base ) unless $current_if;
} else {
finish_current_if;
}
if ( $gateway ne '-' ) {
if ( $device ne '-' ) {
emit qq(run_ip route add $dest via $gateway dev $physical table $number);
emit qq(echo "qt \$IP -$family route del $dest via $gateway dev $physical table $number" >> \${VARDIR}/undo_routing) if $number >= DEFAULT_TABLE;
} else {
emit qq(run_ip route add $dest via $gateway table $number);
emit qq(echo "\$IP -$family route del $dest via $gateway table $number" >> \${VARDIR}/undo_routing) if $number >= DEFAULT_TABLE;
}
} else {
fatal_error "You must specify a device for this route" unless $physical;
emit qq(run_ip route add $dest dev $physical table $number);
emit qq(echo "\$IP -$family route del $dest dev $physical table $number" >> \${VARDIR}/undo_routing) if $number >= DEFAULT_TABLE;
}
progress_message " Route \"$currentline\" $done";
}
sub setup_null_routing() {
save_progress_message "Null Routing the RFC 1918 subnets";
for ( rfc1918_networks ) {
emit( qq(run_ip route replace unreachable $_) );
emit( qq(echo "qt \$IP -$family route del unreachable $_" >> \${VARDIR}/undo_routing) );
emit( qq(if ! \$IP -4 route ls | grep -q '^$_.* dev '; then),
qq( run_ip route replace unreachable $_),
qq( echo "qt \$IP -4 route del unreachable $_" >> \${VARDIR}/undo_routing),
qq(fi\n) );
}
}
@@ -673,7 +746,7 @@ sub start_providers() {
emit ( '#',
'# Capture the default route(s) if we don\'t have it (them) already.',
'#',
'[ -f ${VARDIR}/default_route ] || $IP -' . $family . ' route list | grep -E \'^\s*(default |nexthop )\' > ${VARDIR}/default_route',
"[ -f \${VARDIR}/default_route ] || \$IP -$family route list | save_default_route > \${VARDIR}/default_route",
'#',
'# Initialize the file that holds \'undo\' commands',
'#',
@@ -700,14 +773,27 @@ sub finish_providers() {
}
emit ( 'if [ -n "$DEFAULT_ROUTE" ]; then' );
emit ( " run_ip route replace default scope global table $table \$DEFAULT_ROUTE" );
emit ( " qt \$IP -$family route del default table " . MAIN_TABLE ) if $config{USE_DEFAULT_RT};
if ( $family == F_IPV4 ) {
emit ( " run_ip route replace default scope global table $table \$DEFAULT_ROUTE" );
} else {
emit ( " qt \$IP -6 route del default scope global table $table \$DEFAULT_ROUTE" );
emit ( " run_ip route add default scope global table $table \$DEFAULT_ROUTE" );
}
if ( $config{USE_DEFAULT_RT} ) {
emit ( " while qt \$IP -$family route del default table " . MAIN_TABLE . '; do',
' true',
' done',
''
);
}
emit ( " progress_message \"Default route '\$(echo \$DEFAULT_ROUTE | sed 's/\$\\s*//')' Added\"",
'else',
' error_message "WARNING: No Default route added (all \'balance\' providers are down)"' );
if ( $config{RESTORE_DEFAULT_ROUTE} ) {
emit ' restore_default_route && error_message "NOTICE: Default route restored"'
emit qq( restore_default_route $config{USE_DEFAULT_RT} && error_message "NOTICE: Default route restored")
} else {
emit qq( qt \$IP -$family route del default table $table && error_message "WARNING: Default route deleted from table $table");
}
@@ -718,16 +804,22 @@ sub finish_providers() {
emit ( '#',
'# We don\'t have any \'balance\' providers so we restore any default route that we\'ve saved',
'#',
'restore_default_route' ,
"restore_default_route $config{USE_DEFAULT_RT}" ,
'' );
}
if ( $fallback ) {
emit ( 'if [ -n "$FALLBACK_ROUTE" ]; then' ,
" run_ip route replace default scope global table " . DEFAULT_TABLE . " \$FALLBACK_ROUTE" ,
" progress_message \"Fallback route '\$(echo \$FALLBACK_ROUTE | sed 's/\$\\s*//')' Added\"",
'fi',
'' );
emit ( 'if [ -n "$FALLBACK_ROUTE" ]; then' );
if ( $family == F_IPV4 ) {
emit( " run_ip route replace default scope global table " . DEFAULT_TABLE . " \$FALLBACK_ROUTE" );
} else {
emit( " qt \$IP -6 route del default scope global table " . DEFAULT_TABLE . " \$FALLBACK_ROUTE" );
emit( " run_ip route add default scope global table " . DEFAULT_TABLE . " \$FALLBACK_ROUTE" );
}
emit( " progress_message \"Fallback route '\$(echo \$FALLBACK_ROUTE | sed 's/\$\\s*//')' Added\"",
'fi',
'' );
}
unless ( $config{KEEP_RT_TABLES} ) {
@@ -757,20 +849,35 @@ sub setup_providers() {
$lastmark = 0;
my $fn = open_file 'providers';
if ( my $fn = open_file 'providers' ) {
first_entry sub() {
progress_message2 "$doing $fn...";
emit "\nif [ -z \"\$g_noroutes\" ]; then";
push_indent;
start_providers; };
add_a_provider, $providers++ while read_a_line;
first_entry sub() {
progress_message2 "$doing $fn...";
emit "\nif [ -z \"\$g_noroutes\" ]; then";
push_indent;
start_providers; };
add_a_provider, $providers++ while read_a_line;
}
if ( $providers ) {
finish_providers;
my $fn = open_file 'route_rules';
my $fn = open_file 'routes';
if ( $fn ) {
our $current_if = '';
first_entry "$doing $fn...";
emit '';
add_a_route while read_a_line;
finish_current_if;
}
$fn = open_file 'route_rules';
if ( $fn ) {
our $current_if = '';
@@ -799,7 +906,7 @@ sub setup_providers() {
push_indent;
emit "\nundo_routing";
emit 'restore_default_route';
emit "restore_default_route $config{USE_DEFAULT_RT}";
if ( $config{NULL_ROUTE_RFC1918} ) {
emit ( '#',
@@ -849,7 +956,7 @@ sub handle_optional_interfaces( $ ) {
if ( @$interfaces ) {
my $require = $config{REQUIRE_INTERFACE};
verify_required_interfaces( shift );
emit( 'HAVE_INTERFACE=', '' ) if $require;
@@ -860,9 +967,9 @@ sub handle_optional_interfaces( $ ) {
if ( $wildcards ) {
#
# We must consider all interfaces with an address in $family -- generate a list of such addresses.
# We must consider all interfaces with an address in $family -- generate a list of such addresses.
#
emit( '',
emit( '',
'for interface in $(find_all_interfaces1); do',
);
@@ -904,10 +1011,10 @@ sub handle_optional_interfaces( $ ) {
if ( $wildcards ) {
emit( "$case)" );
push_indent;
if ( $wild ) {
emit( qq(if [ -z "\$SW_${base}_IS_USABLE" ]; then) );
push_indent;
push_indent;
emit ( 'if interface_is_usable $interface; then' );
} else {
emit ( "if interface_is_usable $physical; then" );

View File

@@ -3,7 +3,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2007,2008,2009 - Tom Eastep (teastep@shorewall.net)
# (c) 2007,2008,2009,2011,2011 - Tom Eastep (teastep@shorewall.net)
#
# Complete documentation is available at http://shorewall.net
#
@@ -35,7 +35,7 @@ our @EXPORT = qw(
);
our @EXPORT_OK = qw( initialize );
our $VERSION = '4.4_9';
our $VERSION = '4.4_19';
our @proxyarp;
@@ -56,8 +56,10 @@ sub initialize( $ ) {
@proxyarp = ();
}
sub setup_one_proxy_arp( $$$$$ ) {
my ( $address, $interface, $external, $haveroute, $persistent) = @_;
sub setup_one_proxy_arp( $$$$$$$ ) {
my ( $address, $interface, $physical, $external, $extphy, $haveroute, $persistent) = @_;
my $proto = $family == F_IPV4 ? 'ARP' : 'NDP';
if ( "\L$haveroute" eq 'no' || $haveroute eq '-' ) {
$haveroute = '';
@@ -76,105 +78,105 @@ sub setup_one_proxy_arp( $$$$$ ) {
}
unless ( $haveroute ) {
emit "[ -n \"\$g_noroutes\" ] || run_ip route replace $address dev $interface";
fatal_error "HAVEROUTE=No requires an INTERFACE" if $interface eq '-';
if ( $family == F_IPV4 ) {
emit "[ -n \"\$g_noroutes\" ] || run_ip route replace $address/32 dev $physical";
} else {
emit( 'if [ -z "$g_noroutes" ]; then',
" qt \$IP -6 route del $address/128 dev $physical".
" run_ip route add $address/128 dev $physical",
'fi'
);
}
$haveroute = 1 if $persistent;
}
emit ( "if ! arp -i $external -Ds $address $external pub; then",
" fatal_error \"Command 'arp -i $external -Ds $address $external pub' failed\"" ,
'fi' ,
'',
"progress_message \" Host $address connected to $interface added to ARP on $external\"\n" );
emit ( "run_ip neigh add proxy $address nud permanent dev $extphy" ,
qq(progress_message " Host $address connected to $interface added to $proto on $extphy"\n) );
push @proxyarp, "$address $interface $external $haveroute";
progress_message " Host $address connected to $interface added to ARP on $external";
progress_message " Host $address connected to $interface added to $proto on $external";
}
#
# Setup Proxy ARP
# Setup Proxy ARP/NDP
#
sub setup_proxy_arp() {
if ( $family == F_IPV4 ) {
my $proto = $family == F_IPV4 ? 'arp' : 'ndp'; # Protocol
my $file_opt = 'proxy' . $proto; # Name of config file and of the interface option
my $proc_file = 'proxy_' . $proto; # Name of the corresponding file in /proc
my $interfaces= find_interfaces_by_option 'proxyarp';
my $fn = open_file 'proxyarp';
my $interfaces= find_interfaces_by_option $file_opt;
my $fn = open_file $file_opt;
if ( @$interfaces || $fn ) {
if ( @$interfaces || $fn ) {
my $first_entry = 1;
my $first_entry = 1;
save_progress_message "Setting up Proxy ARP...";
save_progress_message 'Setting up Proxy ' . uc($proto) . '...';
my ( %set, %reset );
my ( %set, %reset );
while ( read_a_line ) {
while ( read_a_line ) {
my ( $address, $interface, $external, $haveroute, $persistent ) = split_line 3, 5, 'proxyarp file';
my ( $address, $interface, $external, $haveroute, $persistent ) = split_line 3, 5, $file_opt;
if ( $first_entry ) {
progress_message2 "$doing $fn...";
$first_entry = 0;
}
if ( $first_entry ) {
progress_message2 "$doing $fn...";
$first_entry = 0;
}
$interface = get_physical $interface;
$external = get_physical $external;
fatal_error "Unknown interface ($external)" unless known_interface $external;
fatal_error "Wildcard interface ($external) not allowed" if $external =~ /\+$/;
$reset{$external} = 1 unless $set{$external};
my $extphy = get_physical $external;
my $physical = '-';
if ( $interface ne '-' ) {
fatal_error "Unknown interface ($interface)" unless known_interface $interface;
fatal_error "Wildcard interface ($interface) not allowed" if $interface =~ /\+$/;
$physical = physical_name $interface;
$set{$interface} = 1;
$reset{$external} = 1 unless $set{$external};
setup_one_proxy_arp( $address, $interface, $external, $haveroute, $persistent );
}
emit '';
setup_one_proxy_arp( $address, $interface, $physical, $external, $extphy, $haveroute, $persistent );
}
for my $interface ( keys %reset ) {
unless ( $set{interface} ) {
emit ( "if [ -f /proc/sys/net/ipv4/conf/$interface/proxy_arp ]; then" ,
" echo 0 > /proc/sys/net/ipv4/conf/$interface/proxy_arp" );
emit "fi\n";
}
}
emit '';
for my $interface ( keys %set ) {
emit ( "if [ -f /proc/sys/net/ipv4/conf/$interface/proxy_arp ]; then" ,
" echo 1 > /proc/sys/net/ipv4/conf/$interface/proxy_arp" );
emit ( 'else' ,
" error_message \" WARNING: Cannot set the 'proxy_arp' option for interface $interface\"" ) unless interface_is_optional( $interface );
for my $interface ( keys %reset ) {
unless ( $set{interface} ) {
my $physical = get_physical $interface;
emit ( "if [ -f /proc/sys/net/ipv$family/conf/$physical/$proc_file ]; then" ,
" echo 0 > /proc/sys/net/ipv$family/conf/$physical/$proc_file" );
emit "fi\n";
}
for my $interface ( @$interfaces ) {
my $value = get_interface_option $interface, 'proxyarp';
my $optional = interface_is_optional $interface;
$interface = get_physical $interface;
emit ( "if [ -f /proc/sys/net/ipv4/conf/$interface/proxy_arp ] ; then" ,
" echo $value > /proc/sys/net/ipv4/conf/$interface/proxy_arp" );
emit ( 'else' ,
" error_message \"WARNING: Unable to set/reset proxy ARP on $interface\"" ) unless $optional;
emit "fi\n";
}
}
} else {
my $interfaces= find_interfaces_by_option 'proxyndp';
if ( @$interfaces ) {
save_progress_message "Setting up Proxy NDP...";
for my $interface ( keys %set ) {
my $physical = get_physical $interface;
emit ( "if [ -f /proc/sys/net/ipv$family/conf/$physical/$proc_file ]; then" ,
" echo 1 > /proc/sys/net/ipv$family/conf/$physical/$proc_file" );
emit ( 'else' ,
" error_message \" WARNING: Cannot set the '$file_opt' option for interface $physical\"" ) unless interface_is_optional( $interface );
emit "fi\n";
}
for my $interface ( @$interfaces ) {
my $value = get_interface_option $interface, 'proxyndp';
my $optional = interface_is_optional $interface;
for my $interface ( @$interfaces ) {
my $value = get_interface_option $interface, $file_opt;
my $optional = interface_is_optional $interface;
$interface = get_physical $interface;
$interface = get_physical $interface;
emit ( "if [ -f /proc/sys/net/ipv6/conf/$interface/proxy_ndp ] ; then" ,
" echo $value > /proc/sys/net/ipv6/conf/$interface/proxy_ndp" );
emit ( 'else' ,
" error_message \"WARNING: Unable to set/reset Proxy NDP on $interface\"" ) unless $optional;
emit "fi\n";
}
emit ( "if [ -f /proc/sys/net/ipv$family/conf/$interface/$proc_file ] ; then" ,
" echo $value > /proc/sys/net/ipv$family/conf/$interface/$proc_file" );
emit ( 'else' ,
" error_message \"WARNING: Unable to set/reset the '$file_opt' option on $interface\"" ) unless $optional;
emit "fi\n";
}
}
}

View File

@@ -3,7 +3,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2009 - Tom Eastep (teastep@shorewall.net)
# (c) 2009,2010,2011 - Tom Eastep (teastep@shorewall.net)
#
# Complete documentation is available at http://shorewall.net
#
@@ -34,7 +34,7 @@ use strict;
our @ISA = qw(Exporter);
our @EXPORT = qw( setup_notrack );
our @EXPORT_OK = qw( );
our $VERSION = '4.4_13';
our $VERSION = '4.4_14';
#
# Notrack
@@ -76,24 +76,25 @@ sub process_notrack_rule( $$$$$$ ) {
sub setup_notrack() {
my $fn = open_file 'notrack';
if ( my $fn = open_file 'notrack' ) {
first_entry "$doing $fn...";
first_entry "$doing $fn...";
my $nonEmpty = 0;
my $nonEmpty = 0;
while ( read_a_line ) {
while ( read_a_line ) {
my ( $source, $dest, $proto, $ports, $sports, $user ) = split_line1 1, 6, 'Notrack File';
my ( $source, $dest, $proto, $ports, $sports, $user ) = split_line1 1, 6, 'Notrack File';
if ( $source eq 'COMMENT' ) {
process_comment;
} else {
process_notrack_rule $source, $dest, $proto, $ports, $sports, $user;
if ( $source eq 'COMMENT' ) {
process_comment;
} else {
process_notrack_rule $source, $dest, $proto, $ports, $sports, $user;
}
}
}
clear_comment;
clear_comment;
}
}
1;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2007,2008,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 2007,2008,2009,2010,2011 - Tom Eastep (teastep@shorewall.net)
#
# Complete documentation is available at http://shorewall.net
#
@@ -28,13 +28,14 @@ use Shorewall::Config qw(:DEFAULT :internal);
use Shorewall::Zones;
use Shorewall::IPAddrs;
use Shorewall::Chains qw(:DEFAULT :internal);
use Shorewall::Rules;
use strict;
our @ISA = qw(Exporter);
our @EXPORT = qw( setup_tunnels );
our @EXPORT_OK = ( );
our $VERSION = '4.4_13';
our $VERSION = '4.4_21';
#
# Here starts the tunnel stuff -- we really should get rid of this crap...
@@ -83,8 +84,8 @@ sub setup_tunnels() {
for my $zone ( split_list $gatewayzones, 'zone' ) {
my $type = zone_type( $zone );
fatal_error "Invalid zone ($zone) for GATEWAY ZONE" if $type == FIREWALL || $type == BPORT;
$inchainref = ensure_filter_chain rules_chain( ${zone}, ${fw} ), 1;
$outchainref = ensure_filter_chain rules_chain( ${fw}, ${zone} ), 1;
$inchainref = ensure_rules_chain( rules_chain( ${zone}, ${fw} ) );
$outchainref = ensure_rules_chain( rules_chain( ${fw}, ${zone} ) );
unless ( have_ipsec ) {
add_tunnel_rule $inchainref, "-p 50 $source -j ACCEPT";
@@ -140,10 +141,10 @@ sub setup_tunnels() {
fatal_error "Invalid port ($p:$remainder)" if defined $remainder;
if ( defined $p && $p ne '' ) {
if ( supplied $p ) {
$port = $p;
$protocol = $proto;
} elsif ( defined $proto && $proto ne '' ) {
} elsif ( supplied $proto ) {
if ( "\L$proto" =~ /udp|tcp/ ) {
$protocol = $proto;
} else {
@@ -165,10 +166,10 @@ sub setup_tunnels() {
fatal_error "Invalid port ($p:$remainder)" if defined $remainder;
if ( defined $p && $p ne '' ) {
if ( supplied $p ) {
$port = $p;
$protocol = $proto;
} elsif ( defined $proto && $proto ne '' ) {
} elsif ( supplied $proto ) {
if ( "\L$proto" =~ /udp|tcp/ ) {
$protocol = $proto;
} else {
@@ -190,10 +191,10 @@ sub setup_tunnels() {
fatal_error "Invalid port ($p:$remainder)" if defined $remainder;
if ( defined $p && $p ne '' ) {
if ( supplied $p ) {
$port = $p;
$protocol = $proto;
} elsif ( defined $proto && $proto ne '' ) {
} elsif ( supplied $proto ) {
if ( "\L$proto" =~ /udp|tcp/ ) {
$protocol = $proto;
} else {
@@ -239,8 +240,8 @@ sub setup_tunnels() {
fatal_error "Invalid tunnel ZONE ($zone)" if $zonetype == FIREWALL || $zonetype == BPORT;
my $inchainref = ensure_filter_chain rules_chain( ${zone}, ${fw} ), 1;
my $outchainref = ensure_filter_chain rules_chain( ${fw}, ${zone} ), 1;
my $inchainref = ensure_rules_chain( rules_chain( ${zone}, ${fw} ) );
my $outchainref = ensure_rules_chain( rules_chain( ${fw}, ${zone} ) );
$gateway = ALLIP if $gateway eq '-';
@@ -277,22 +278,23 @@ sub setup_tunnels() {
#
# Setup_Tunnels() Starts Here
#
my $fn = open_file 'tunnels';
if ( my $fn = open_file 'tunnels' ) {
first_entry "$doing $fn...";
first_entry "$doing $fn...";
while ( read_a_line ) {
while ( read_a_line ) {
my ( $kind, $zone, $gateway, $gatewayzones ) = split_line1 2, 4, 'tunnels file';
my ( $kind, $zone, $gateway, $gatewayzones ) = split_line1 2, 4, 'tunnels file';
if ( $kind eq 'COMMENT' ) {
process_comment;
} else {
setup_one_tunnel $kind, $zone, $gateway, $gatewayzones;
if ( $kind eq 'COMMENT' ) {
process_comment;
} else {
setup_one_tunnel $kind, $zone, $gateway, $gatewayzones;
}
}
}
clear_comment;
clear_comment;
}
}
1;

View File

@@ -3,7 +3,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2007,2008,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 2007,2008,2009,2010,2011 - Tom Eastep (teastep@shorewall.net)
#
# Complete documentation is available at http://shorewall.net
#
@@ -74,6 +74,7 @@ our @EXPORT = qw( NOTHING
find_interfaces_by_option1
get_interface_option
set_interface_option
interface_zones
verify_required_interfaces
compile_updown
validate_hosts_file
@@ -84,7 +85,7 @@ our @EXPORT = qw( NOTHING
);
our @EXPORT_OK = qw( initialize );
our $VERSION = '4.4_13';
our $VERSION = '4.4_21';
#
# IPSEC Option types
@@ -128,11 +129,11 @@ use constant { NOTHING => 'NOTHING',
#
# $firewall_zone names the firewall zone.
#
our @zones;
our %zones;
our $firewall_zone;
my @zones;
my %zones;
my $firewall_zone;
our %reservedName = ( all => 1,
my %reservedName = ( all => 1,
any => 1,
none => 1,
SOURCE => 1,
@@ -146,32 +147,38 @@ our %reservedName = ( all => 1,
# %interfaces { <interface1> => { name => <name of interface>
# root => <name without trailing '+'>
# options => { port => undef|1
# <option1> = <val1> , #See %validinterfaceoptions
# { <option1> } => <val1> , #See %validinterfaceoptions
# ...
# }
# zone => <zone name>
# multizone => undef|1 #More than one zone interfaces through this interface
# nets => <number of nets in interface/hosts records referring to this interface>
# bridge => <bridge>
# bridge => <bridge name>
# ports => <number of port on this bridge>
# ipsec => undef|1 # Has an ipsec host group
# broadcasts => 'none', 'detect' or [ <addr1>, <addr2>, ... ]
# number => <ordinal position in the interfaces file>
# physical => <physical interface name>
# base => <shell variable base representing this interface>
# zones => { zone1 => 1, ... }
# }
# }
#
# The purpose of the 'base' member is to ensure that the base names associated with the physical interfaces are assigned in
# the same order as the interfaces are encountered in the configuration files.
# the same order as the interfaces are encountered in the configuration files.
#
our @interfaces;
our %interfaces;
our @bport_zones;
our %ipsets;
our %physical;
our %basemap;
our %mapbase;
our $family;
our $have_ipsec;
our $baseseq;
my @interfaces;
my %interfaces;
my %roots;
my @bport_zones;
my %ipsets;
my %physical;
my %basemap;
my %mapbase;
my $family;
my $have_ipsec;
my $baseseq;
my $minroot;
use constant { FIREWALL => 1,
IP => 2,
@@ -192,15 +199,16 @@ use constant { SIMPLE_IF_OPTION => 1,
IF_OPTION_ZONEONLY => 8,
IF_OPTION_HOST => 16,
IF_OPTION_VSERVER => 32,
IF_OPTION_WILDOK => 64
};
our %validinterfaceoptions;
my %validinterfaceoptions;
our %defaultinterfaceoptions = ( routefilter => 1 , wait => 60 );
my %defaultinterfaceoptions = ( routefilter => 1 , wait => 60 );
our %maxoptionvalue = ( routefilter => 2, mss => 100000 , wait => 120 );
my %maxoptionvalue = ( routefilter => 2, mss => 100000 , wait => 120 );
our %validhostoptions;
my %validhostoptions;
#
# Rather than initializing globals in an INIT block or during declaration,
@@ -220,6 +228,7 @@ sub initialize( $ ) {
$have_ipsec = undef;
@interfaces = ();
%roots = ();
%interfaces = ();
@bport_zones = ();
%ipsets = ();
@@ -227,6 +236,7 @@ sub initialize( $ ) {
%basemap = ();
%mapbase = ();
$baseseq = 0;
$minroot = 0;
if ( $family == F_IPV4 ) {
%validinterfaceoptions = (arp_filter => BINARY_IF_OPTION,
@@ -245,13 +255,14 @@ sub initialize( $ ) {
required => SIMPLE_IF_OPTION,
routeback => SIMPLE_IF_OPTION + IF_OPTION_ZONEONLY + IF_OPTION_HOST + IF_OPTION_VSERVER,
routefilter => NUMERIC_IF_OPTION ,
sfilter => IPLIST_IF_OPTION,
sourceroute => BINARY_IF_OPTION,
tcpflags => SIMPLE_IF_OPTION + IF_OPTION_HOST,
upnp => SIMPLE_IF_OPTION,
upnpclient => SIMPLE_IF_OPTION,
mss => NUMERIC_IF_OPTION,
physical => STRING_IF_OPTION + IF_OPTION_HOST,
wait => NUMERIC_IF_OPTION,
mss => NUMERIC_IF_OPTION + IF_OPTION_WILDOK,
physical => STRING_IF_OPTION + IF_OPTION_HOST,
wait => NUMERIC_IF_OPTION + IF_OPTION_WILDOK,
);
%validhostoptions = (
blacklist => 1,
@@ -274,12 +285,13 @@ sub initialize( $ ) {
proxyndp => BINARY_IF_OPTION,
required => SIMPLE_IF_OPTION,
routeback => SIMPLE_IF_OPTION + IF_OPTION_ZONEONLY + IF_OPTION_HOST + IF_OPTION_VSERVER,
sfilter => IPLIST_IF_OPTION,
sourceroute => BINARY_IF_OPTION,
tcpflags => SIMPLE_IF_OPTION + IF_OPTION_HOST,
mss => NUMERIC_IF_OPTION,
mss => NUMERIC_IF_OPTION + IF_OPTION_WILDOK,
forward => BINARY_IF_OPTION,
physical => STRING_IF_OPTION + IF_OPTION_HOST,
wait => NUMERIC_IF_OPTION,
wait => NUMERIC_IF_OPTION + IF_OPTION_WILDOK,
);
%validhostoptions = (
blacklist => 1,
@@ -296,7 +308,7 @@ sub initialize( $ ) {
# => mss = <MSS setting>
# => ipsec = <-m policy arguments to match options>
#
sub parse_zone_option_list($$)
sub parse_zone_option_list($$\$)
{
my %validoptions = ( mss => NUMERIC,
blacklist => NOTHING,
@@ -310,13 +322,13 @@ sub parse_zone_option_list($$)
"tunnel-dst" => NETWORK,
);
use constant { UNRESTRICTED => 1, NOFW => 2 };
use constant { UNRESTRICTED => 1, NOFW => 2 , COMPLEX => 8 };
#
# Hash of options that have their own key in the returned hash.
#
my %key = ( mss => UNRESTRICTED , blacklist => NOFW );
my %key = ( mss => UNRESTRICTED | COMPLEX , blacklist => NOFW );
my ( $list, $zonetype ) = @_;
my ( $list, $zonetype, $complexref ) = @_;
my %h;
my $options = '';
my $fmt;
@@ -346,14 +358,18 @@ sub parse_zone_option_list($$)
fatal_error "Invalid value ($val) for option \"$e\"" unless $val =~ /^($fmt)$/;
}
if ( $key{$e} ) {
fatal_error "Option '$e' not permitted with this zone type " if $key{$e} == NOFW && ($zonetype == FIREWALL || $zonetype == VSERVER);
my $key = $key{$e};
if ( $key ) {
fatal_error "Option '$e' not permitted with this zone type " if $key & NOFW && ($zonetype == FIREWALL || $zonetype == VSERVER);
$$complexref = 1 if $key & COMPLEX;
$h{$e} = $val || 1;
} else {
fatal_error "The \"$e\" option may only be specified for ipsec zones" unless $zonetype == IPSEC;
$options .= $invert;
$options .= "--$e ";
$options .= "$val "if defined $val;
$$complexref = 1;
}
}
}
@@ -420,7 +436,7 @@ sub process_zone( \$ ) {
fatal_error 'Firewall zone may not be nested' if @parents;
fatal_error "Only one firewall zone may be defined ($zone)" if $firewall_zone;
$firewall_zone = $zone;
$ENV{FW} = $zone;
add_param( FW => $zone );
$type = FIREWALL;
} elsif ( $type eq 'vserver' ) {
fatal_error 'Vserver zones may not be nested' if @parents;
@@ -439,13 +455,15 @@ sub process_zone( \$ ) {
}
}
my $complex = 0;
my $zoneref = $zones{$zone} = { type => $type,
parents => \@parents,
bridge => '',
options => { in_out => parse_zone_option_list( $options || '', $type ) ,
in => parse_zone_option_list( $in_options || '', $type ) ,
out => parse_zone_option_list( $out_options || '', $type ) ,
complex => ( $type == IPSEC || $options ne '-' || $in_options ne '-' || $out_options ne '-' ) ,
options => { in_out => parse_zone_option_list( $options , $type, $complex ) ,
in => parse_zone_option_list( $in_options , $type , $complex ) ,
out => parse_zone_option_list( $out_options , $type , $complex ) ,
complex => ( $type == IPSEC || $complex ) ,
nested => @parents > 0 ,
super => 0 ,
} ,
@@ -475,11 +493,12 @@ sub determine_zones()
my @z;
my $ip = 0;
my $fn = open_file 'zones';
first_entry "$doing $fn...";
push @z, process_zone( $ip ) while read_a_line;
if ( my $fn = open_file 'zones' ) {
first_entry "$doing $fn...";
push @z, process_zone( $ip ) while read_a_line;
} else {
fatal_error q(The 'zones' file does not exist or has zero size);
}
fatal_error "No firewall zone defined" unless $firewall_zone;
fatal_error "No IP zones defined" unless $ip;
@@ -656,6 +675,7 @@ sub add_group_to_zone($$$$$)
my $interfaceref;
my $zoneref = $zones{$zone};
my $zonetype = $zoneref->{type};
$zoneref->{interfaces}{$interface} = 1;
@@ -668,9 +688,11 @@ sub add_group_to_zone($$$$$)
for my $host ( @$networks ) {
$interfaceref = $interfaces{$interface};
$interfaceref->{zones}{$zone} = 1;
$interfaceref->{nets}++;
fatal_error "Invalid Host List" unless defined $host and $host ne '';
fatal_error "Invalid Host List" unless supplied $host;
if ( substr( $host, 0, 1 ) eq '!' ) {
fatal_error "Only one exclusion allowed in a host list" if $switched;
@@ -698,7 +720,7 @@ sub add_group_to_zone($$$$$)
}
if ( substr( $host, 0, 1 ) eq '+' ) {
fatal_error "Invalid ipset name ($host)" unless $host =~ /^\+[a-zA-Z]\w*$/;
fatal_error "Invalid ipset name ($host)" unless $host =~ /^\+(6_)?[a-zA-Z]\w*$/;
require_capability( 'IPSET_MATCH', 'Ipset names in host lists', '');
} else {
validate_host $host, 0;
@@ -723,6 +745,8 @@ sub add_group_to_zone($$$$$)
hosts => \@newnetworks,
ipsec => $type == IPSEC ? 'ipsec' : 'none' ,
exclusions => \@exclusions };
$interfaces{$interface}{options}{routeback} ||= ( $type != IPSEC && $options->{routeback} );
}
#
@@ -801,7 +825,7 @@ sub chain_base($) {
#
return $name if $name;
#
# Remember initial value
# Remember initial value
#
my $key = $chain;
#
@@ -810,7 +834,7 @@ sub chain_base($) {
$chain =~ s/\+$//;
$chain =~ tr/./_/;
if ( $chain =~ /^[0-9]/ || $chain =~ /[^\w]/ ) {
if ( $chain eq '' || $chain =~ /^[0-9]/ || $chain =~ /[^\w]/ ) {
#
# Must map. Remove all illegal characters
#
@@ -844,7 +868,8 @@ sub chain_base($) {
#
sub process_interface( $$ ) {
my ( $nextinum, $export ) = @_;
my $netsref = '';
my $netsref = '';
my $filterref = [];
my ($zone, $originalinterface, $bcasts, $options ) = split_line 2, 4, 'interfaces file';
my $zoneref;
my $bridge = '';
@@ -862,7 +887,7 @@ sub process_interface( $$ ) {
fatal_error "Invalid INTERFACE ($originalinterface)" if ! $interface || defined $extra;
if ( defined $port && $port ne '' ) {
if ( supplied $port ) {
fatal_error qq("Virtual" interfaces are not supported -- see http://www.shorewall.net/Shorewall_and_Aliased_Interfaces.html) if $port =~ /^\d+$/;
require_capability( 'PHYSDEV_MATCH', 'Bridge Ports', '');
fatal_error "Your iptables is not recent enough to support bridge ports" unless have_capability( 'KLUDGEFREE' );
@@ -871,6 +896,7 @@ sub process_interface( $$ ) {
fatal_error "Duplicate Interface ($port)" if $interfaces{$port};
fatal_error "$interface is not a defined bridge" unless $interfaces{$interface} && $interfaces{$interface}{options}{bridge};
$interfaces{$interface}{ports}++;
fatal_error "Bridge Ports may only be associated with 'bport' zones" if $zone && $zoneref->{type} != BPORT;
if ( $zone ) {
@@ -879,7 +905,7 @@ sub process_interface( $$ ) {
} else {
$zoneref->{bridge} = $interface;
}
fatal_error "Vserver zones may not be associated with bridge ports" if $zoneref->{type} == VSERVER;
}
@@ -899,6 +925,14 @@ sub process_interface( $$ ) {
if ( $interface =~ /\+$/ ) {
$wildcard = 1;
$root = substr( $interface, 0, -1 );
$roots{$root} = $interface;
my $len = length $root;
if ( $minroot ) {
$minroot = $len if $minroot > $len;
} else {
$minroot = $len;
}
} else {
$root = $interface;
}
@@ -947,7 +981,7 @@ sub process_interface( $$ ) {
if ( $zone ) {
fatal_error qq(The "$option" option may not be specified for a Vserver zone") if $zoneref->{type} == VSERVER && ! ( $type & IF_OPTION_VSERVER );
} else {
} else {
fatal_error "The \"$option\" option may not be specified on a multi-zone interface" if $type & IF_OPTION_ZONEONLY;
}
@@ -991,6 +1025,7 @@ sub process_interface( $$ ) {
assert( 0 );
}
} elsif ( $type == NUMERIC_IF_OPTION ) {
fatal_error "The '$option' option may not be specified on a wildcard interface" if $wildcard && ! $type && IF_OPTION_WILDOK;
$value = $defaultinterfaceoptions{$option} unless defined $value;
fatal_error "The '$option' option requires a value" unless defined $value;
my $numval = numeric_value $value;
@@ -1025,6 +1060,9 @@ sub process_interface( $$ ) {
# Assume 'broadcast'
#
$hostoptions{broadcast} = 1;
} elsif ( $option eq 'sfilter' ) {
$filterref = [ split_list $value, 'address' ];
validate_net( $_, 1) for @{$filterref}
} else {
assert(0);
}
@@ -1049,7 +1087,7 @@ sub process_interface( $$ ) {
fatal_error "Invalid combination of interface options" if $options{required} && $options{optional};
if ( $netsref eq 'dynamic' ) {
my $ipset = "${zone}_" . chain_base $physical;
my $ipset = $family == F_IPV4 ? "${zone}_" . chain_base $physical : "6_${zone}_" . chain_base $physical;
$netsref = [ "+$ipset" ];
$ipsets{$ipset} = 1;
}
@@ -1072,6 +1110,7 @@ sub process_interface( $$ ) {
$physical{$physical} = $interfaces{$interface} = { name => $interface ,
bridge => $bridge ,
filter => $filterref ,
nets => 0 ,
number => $nextinum ,
root => $root ,
@@ -1079,7 +1118,8 @@ sub process_interface( $$ ) {
options => \%options ,
zone => '',
physical => $physical ,
base => chain_base( $physical )
base => chain_base( $physical ),
zones => {},
};
if ( $zone ) {
@@ -1102,16 +1142,16 @@ sub process_interface( $$ ) {
#
sub validate_interfaces_file( $ ) {
my $export = shift;
my $fn = open_file 'interfaces';
my @ifaces;
my $nextinum = 1;
first_entry "$doing $fn...";
push @ifaces, process_interface( $nextinum++, $export ) while read_a_line;
if ( my $fn = open_file 'interfaces' ) {
first_entry "$doing $fn...";
push @ifaces, process_interface( $nextinum++, $export ) while read_a_line;
} else {
fatal_error q(The 'interfaces' file does not exist or has zero size);
}
#
# We now assemble the @interfaces array such that bridge ports immediately precede their associated bridge
@@ -1175,35 +1215,36 @@ sub map_physical( $$ ) {
#
# Returns true if passed interface matches an entry in /etc/shorewall/interfaces
#
# If the passed name matches a wildcard and 'cache' is true, an entry for the name is added in
# %interfaces.
# If the passed name matches a wildcard, an entry for the name is added to %interfaces.
#
sub known_interface($;$)
sub known_interface($)
{
my ( $interface, $cache ) = @_;
my $interface = shift;
my $interfaceref = $interfaces{$interface};
return $interfaceref if $interfaceref;
fatal_error "Invalid interface ($interface)" if $interface =~ /\*/;
for my $i ( @interfaces ) {
$interfaceref = $interfaces{$i};
my $root = $interfaceref->{root};
if ( $i ne $root && substr( $interface, 0, length $root ) eq $root ) {
my $physical = map_physical( $interface, $interfaceref );
my $copyref = { options => $interfaceref->{options},
bridge => $interfaceref->{bridge} ,
name => $i ,
number => $interfaceref->{number} ,
physical => $physical ,
base => chain_base( $physical ) ,
};
my $iface = $interface;
$interfaces{$interface} = $copyref if $cache;
if ( $minroot ) {
while ( length $iface > $minroot ) {
chop $iface;
if ( my $i = $roots{$iface} ) {
$interfaceref = $interfaces{$i};
return $copyref;
my $physical = map_physical( $interface, $interfaceref );
return $interfaces{$interface} = { options => $interfaceref->{options} ,
bridge => $interfaceref->{bridge} ,
name => $i ,
number => $interfaceref->{number} ,
physical => $physical ,
base => chain_base( $physical ) ,
};
}
}
}
@@ -1284,6 +1325,16 @@ sub source_port_to_bridge( $ ) {
return $portref ? $portref->{bridge} : '';
}
#
# Returns a hash reference for the zones interface through the interface
#
sub interface_zones( $ ) {
my $interfaceref = $interfaces{(shift)};
$interfaceref->{zones};
}
#
# Return the 'optional' setting of the passed interface
#
@@ -1325,7 +1376,7 @@ sub find_interfaces_by_option1( $ ) {
my $wild = 0;
for my $interface ( sort { $interfaces{$a}->{number} <=> $interfaces{$b}->{number} }
keys %interfaces ) {
( grep $interfaces{$_}{root}, keys %interfaces ) ) {
my $interfaceref = $interfaces{$interface};
next unless defined $interfaceref->{physical};
@@ -1349,7 +1400,14 @@ sub find_interfaces_by_option1( $ ) {
sub get_interface_option( $$ ) {
my ( $interface, $option ) = @_;
$interfaces{$interface}{options}{$option};
my $ref = $interfaces{$interface};
return $ref->{options}{$option} if $ref;
assert( $ref = known_interface( $interface ) );
$ref->{options}{$option};
}
#
@@ -1389,7 +1447,7 @@ sub verify_required_interfaces( $ ) {
my $wait = $interfaces{$interface}{options}{wait};
emit q() unless $first-- > 0;
if ( $wait ) {
my $physical = get_physical $interface;
@@ -1428,7 +1486,7 @@ sub verify_required_interfaces( $ ) {
}
emit( ";;\n" );
pop_indent;
pop_indent;
@@ -1661,34 +1719,42 @@ sub process_host( ) {
fatal_error "Unknown ZONE ($zone)" unless $type;
fatal_error 'Firewall zone not allowed in ZONE column of hosts record' if $type == FIREWALL;
my $interface;
my ( $interface, $interfaceref );
if ( $family == F_IPV4 ) {
if ( $hosts =~ /^([\w.@%-]+\+?):(.*)$/ ) {
$interface = $1;
$hosts = $2;
$zoneref->{options}{complex} = 1 if $hosts =~ /^\+/;
fatal_error "Unknown interface ($interface)" unless $interfaces{$interface}{root};
fatal_error "Unknown interface ($interface)" unless ($interfaceref = $interfaces{$interface}) && $interfaceref->{root};
} else {
fatal_error "Invalid HOST(S) column contents: $hosts";
}
} elsif ( $hosts =~ /^([\w.@%-]+\+?):<(.*)>\s*$/ || $hosts =~ /^([\w.@%-]+\+?):\[(.*)\]\s*$/ ) {
} elsif ( $hosts =~ /^([\w.@%-]+\+?):<(.*)>$/ ||
$hosts =~ /^([\w.@%-]+\+?):\[(.*)\]$/ ||
$hosts =~ /^([\w.@%-]+\+?):(!?\+.*)$/ ||
$hosts =~ /^([\w.@%-]+\+?):(dynamic)$/ ) {
$interface = $1;
$hosts = $2;
$zoneref->{options}{complex} = 1 if $hosts =~ /^\+/;
fatal_error "Unknown interface ($interface)" unless $interfaces{$interface}{root};
fatal_error "Unknown interface ($interface)" unless ($interfaceref = $interfaces{$interface})->{root};
} else {
fatal_error "Invalid HOST(S) column contents: $hosts";
fatal_error "Invalid HOST(S) column contents: $hosts"
}
if ( $hosts =~ /^!?\+/ ) {
$zoneref->{options}{complex} = 1;
fatal_error "ipset name qualification is disallowed in this file" if $hosts =~ /[\[\]]/;
fatal_error "Invalid ipset name ($hosts)" unless $hosts =~ /^!?\+[a-zA-Z][-\w]*$/;
}
if ( $type == BPORT ) {
if ( $zoneref->{bridge} eq '' ) {
fatal_error 'Bridge Port Zones may only be associated with bridge ports' unless $interfaces{$interface}{options}{port};
fatal_error 'Bridge Port Zones may only be associated with bridge ports' unless $interfaceref->{options}{port};
$zoneref->{bridge} = $interfaces{$interface}{bridge};
} elsif ( $zoneref->{bridge} ne $interfaces{$interface}{bridge} ) {
} elsif ( $zoneref->{bridge} ne $interfaceref->{bridge} ) {
fatal_error "Interface $interface is not a port on bridge $zoneref->{bridge}";
}
}
}
my $optionsref = { dynamic => 0 };
@@ -1701,7 +1767,7 @@ sub process_host( ) {
require_capability 'POLICY_MATCH' , q(The 'ipsec' option), 's';
$type = IPSEC;
$zoneref->{options}{complex} = 1;
$ipsec = 1;
$ipsec = $interfaceref->{ipsec} = 1;
} elsif ( $option eq 'norfc1918' ) {
warning_message "The 'norfc1918' host option is no longer supported"
} elsif ( $option eq 'blacklist' ) {
@@ -1714,7 +1780,7 @@ sub process_host( ) {
}
}
fatal_error q(A host entry for a Vserver zone may not specify the 'ipsec' option) if $ipsec && $zoneref->{type} == VSERVER;
fatal_error q(A host entry for a Vserver zone may not specify the 'ipsec' option) if $ipsec && $zoneref->{type} == VSERVER;
$optionsref = \%options;
}
@@ -1737,12 +1803,13 @@ sub process_host( ) {
if ( $hosts eq 'dynamic' ) {
fatal_error "Vserver zones may not be dynamic" if $type == VSERVER;
require_capability( 'IPSET_MATCH', 'Dynamic nets', '');
my $physical = physical_name $interface;
$hosts = "+${zone}_${physical}";
my $physical = chain_base( physical_name $interface );
my $set = $family == F_IPV4 ? "${zone}_${physical}" : "6_${zone}_${physical}";
$hosts = "+$set";
$optionsref->{dynamic} = 1;
$ipsets{"${zone}_${physical}"} = 1;
$ipsets{$set} = 1;
}
#
# We ignore the user's notion of what interface vserver addresses are on and simply invent one for all of the vservers.
#
@@ -1762,14 +1829,15 @@ sub validate_hosts_file()
{
my $ipsec = 0;
my $fn = open_file 'hosts';
first_entry "$doing $fn...";
$ipsec |= process_host while read_a_line;
if ( my $fn = open_file 'hosts' ) {
first_entry "$doing $fn...";
$ipsec |= process_host while read_a_line;
}
$have_ipsec = $ipsec || haveipseczones;
$_->{options}{complex} ||= ( keys %{$_->{interfaces}} > 1 ) for values %zones;
}
#

View File

@@ -4,7 +4,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2007,2008,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 2007,2008,2009,2010,2011 - Tom Eastep (teastep@shorewall.net)
#
# Complete documentation is available at http://shorewall.net
#
@@ -54,12 +54,15 @@ sub usage( $ ) {
[ --verbose={-1|0-2} ]
[ --timestamp ]
[ --debug ]
[ --confess ]
[ --refresh=<chainlist> ]
[ --log=<filename> ]
[ --log-verbose={-1|0-2} ]
[ --test ]
[ --preview ]
[ --family={4|6} ]
[ --annotate ]
[ --updatee ]
';
exit shift @_;
@@ -73,13 +76,16 @@ my $shorewall_dir = '';
my $verbose = 0;
my $timestamp = 0;
my $debug = 0;
my $chains = '';
my $confess = 0;
my $chains = ':none:';
my $log = '';
my $log_verbose = 0;
my $help = 0;
my $test = 0;
my $family = 4; # F_IPV4
my $preview = 0;
my $annotate = 0;
my $update = 0;
Getopt::Long::Configure ('bundling');
@@ -103,6 +109,12 @@ my $result = GetOptions('h' => \$help,
'preview' => \$preview,
'f=i' => \$family,
'family=i' => \$family,
'c' => \$confess,
'confess' => \$confess,
'a' => \$annotate,
'annotate' => \$annotate,
'u' => \$update,
'update' => \$update,
);
usage(1) unless $result && @ARGV < 2;
@@ -119,4 +131,8 @@ compiler( script => $ARGV[0] || '',
log_verbosity => $log_verbose,
test => $test,
preview => $preview,
family => $family );
family => $family,
confess => $confess,
update => $update,
annotate => $annotate,
);

40
Shorewall/Perl/getparams Executable file
View File

@@ -0,0 +1,40 @@
#!/bin/sh
#
# The Shoreline Firewall Packet Filtering Firewall Param File Helper - V4.4
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2010,2011 - 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.
if [ "$3" = 6 ]; then
. /usr/share/shorewall6/lib.base
. /usr/share/shorewall6/lib.cli
else
. /usr/share/shorewall/lib.base
. /usr/share/shorewall/lib.cli
fi
CONFIG_PATH="$2"
set -a
. $1 >&2 # Avoid spurious output on STDOUT
set +a
export -p

View File

@@ -169,8 +169,10 @@ case "$COMMAND" in
detect_configuration
define_firewall
status=$?
[ -n "$SUBSYSLOCK" -a $status -eq 0 ] && touch $SUBSYSLOCK
progress_message3 "done."
if [ $status -eq 0 ]; then
[ -n "$SUBSYSLOCK" ] && touch $SUBSYSLOCK
progress_message3 "done."
fi
fi
;;
stop)
@@ -225,9 +227,9 @@ case "$COMMAND" in
define_firewall
status=$?
if [ -n "$SUBSYSLOCK" ]; then
[ $status -eq 0 ] && touch $SUBSYSLOCK || rm -f $SUBSYSLOCK
fi
progress_message3 "done."
[ $status -eq 0 ] && touch $SUBSYSLOCK || rm -f $SUBSYSLOCK
fi
[ $status -eq 0 ] && progress_message3 "done."
;;
refresh)
[ $# -ne 1 ] && usage 2
@@ -236,7 +238,7 @@ case "$COMMAND" in
detect_configuration
define_firewall
status=$?
progress_message3 "done."
[ $status -eq 0 ] && progress_message3 "done."
else
echo "$g_product is not running" >&2
status=2
@@ -256,10 +258,10 @@ case "$COMMAND" in
progress_message3 "Clearing $g_product...."
clear_firewall
status=0
if [ -n "$SUBSYSLOCK" ]; then
rm -f $SUBSYSLOCK
if [ $status -eq 0 ]; then
[ -n "$SUBSYSLOCK" ] && rm -f $SUBSYSLOCK
progress_message3 "done."
fi
progress_message3 "done."
;;
status)
[ $# -ne 1 ] && usage 2

View File

@@ -17,6 +17,19 @@ usage() {
echo " -R <file> Override RESTOREFILE setting"
exit $1
}
checkkernelversion() {
local kernel
kernel=$(printf "%2d%02d%02d" $(uname -r 2> /dev/null | sed -e 's/-.*//' -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/\1 \2 \3/g'))
if [ $kernel -lt 20624 ]; then
error_message "ERROR: $g_product requires Linux kernel 2.6.24 or later"
return 1
else
return 0
fi
}
################################################################################
# E X E C U T I O N B E G I N S H E R E #
################################################################################
@@ -155,40 +168,43 @@ done
COMMAND="$1"
kernel=$(printf "%2d%02d%02d" $(uname -r 2> /dev/null | sed -e 's/-.*//' -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/\1 \2 \3/g'))
if [ $kernel -lt 20624 ]; then
error_message "ERROR: $g_product requires Linux kernel 2.6.24 or later"
status=2
else
case "$COMMAND" in
start)
[ $# -ne 1 ] && usage 2
if shorewall6_is_started; then
error_message "$g_product is already Running"
status=0
else
progress_message3 "Starting $g_product...."
case "$COMMAND" in
start)
[ $# -ne 1 ] && usage 2
if shorewall6_is_started; then
error_message "$g_product is already Running"
status=0
else
progress_message3 "Starting $g_product...."
if checkkernelversion; then
detect_configuration
define_firewall
status=$?
[ -n "$SUBSYSLOCK" -a $status -eq 0 ] && touch $SUBSYSLOCK
progress_message3 "done."
if [ $status -eq 0 ]; then
[ -n "$SUBSYSLOCK" ] && touch $SUBSYSLOCK
progress_message3 "done."
fi
fi
;;
stop)
[ $# -ne 1 ] && usage 2
fi
;;
stop)
[ $# -ne 1 ] && usage 2
if checkkernelversion; then
progress_message3 "Stopping $g_product...."
detect_configuration
stop_firewall
status=0
[ -n "$SUBSYSLOCK" ] && rm -f $SUBSYSLOCK
progress_message3 "done."
;;
reset)
if ! shorewall6_is_started ; then
error_message "$g_product is not running"
status=2
elif [ $# -eq 1 ]; then
fi
;;
reset)
if ! shorewall6_is_started ; then
error_message "$g_product is not running"
status=2
elif checkkernelversion; then
if [ $# -eq 1 ]; then
$IP6TABLES -Z
$IP6TABLES -t mangle -Z
date > ${VARDIR}/restarted
@@ -211,102 +227,112 @@ else
fi
done
fi
;;
restart)
[ $# -ne 1 ] && usage 2
if shorewall6_is_started; then
progress_message3 "Restarting $g_product...."
else
error_message "$g_product is not running"
progress_message3 "Starting $g_product...."
COMMAND=start
fi
fi
;;
restart)
[ $# -ne 1 ] && usage 2
if shorewall6_is_started; then
progress_message3 "Restarting $g_product...."
else
error_message "$g_product is not running"
progress_message3 "Starting $g_product...."
COMMAND=start
fi
if checkkernelversion; then
detect_configuration
define_firewall
status=$?
if [ -n "$SUBSYSLOCK" ]; then
[ $status -eq 0 ] && touch $SUBSYSLOCK || rm -f $SUBSYSLOCK
fi
progress_message3 "done."
;;
refresh)
[ $# -ne 1 ] && usage 2
if shorewall6_is_started; then
progress_message3 "Refreshing $g_product...."
[ $status -eq 0 ] && progress_message3 "done."
fi
;;
refresh)
[ $# -ne 1 ] && usage 2
if shorewall6_is_started; then
progress_message3 "Refreshing $g_product...."
if checkkernelversion; then
detect_configuration
define_firewall
status=$?
progress_message3 "done."
else
echo "$g_product is not running" >&2
status=2
[ $status -eq 0 ] && progress_message3 "done."
fi
;;
restore)
[ $# -ne 1 ] && usage 2
else
echo "$g_product is not running" >&2
status=2
fi
;;
restore)
[ $# -ne 1 ] && usage 2
if checkkernelversion; then
detect_configuration
define_firewall
status=$?
if [ -n "$SUBSYSLOCK" ]; then
[ $status -eq 0 ] && touch $SUBSYSLOCK || rm -f $SUBSYSLOCK
fi
;;
clear)
[ $# -ne 1 ] && usage 2
progress_message3 "Clearing $g_product...."
[ $status -eq 0 ] && progress_message3 "done."
fi
;;
clear)
[ $# -ne 1 ] && usage 2
progress_message3 "Clearing $g_product...."
if checkkernelversion; then
clear_firewall
status=0
if [ -n "$SUBSYSLOCK" ]; then
rm -f $SUBSYSLOCK
fi
progress_message3 "done."
;;
status)
[ $# -ne 1 ] && usage 2
echo "$g_product-$SHOREWALL_VERSION Status at $(hostname) - $(date)"
echo
if shorewall6_is_started; then
echo "$g_product is running"
status=0
else
echo "$g_product is stopped"
status=4
fi
fi
;;
status)
[ $# -ne 1 ] && usage 2
echo "$g_product-$SHOREWALL_VERSION Status at $(hostname) - $(date)"
echo
if shorewall6_is_started; then
echo "$g_product is running"
status=0
else
echo "$g_product is stopped"
status=4
fi
if [ -f ${VARDIR}/state ]; then
state="$(cat ${VARDIR}/state)"
case $state in
Stopped*|Clear*)
status=3
;;
esac
else
state=Unknown
fi
echo "State:$state"
echo
;;
up|down)
[ $# -eq 1 ] && exit 0
shift
[ $# -ne 1 ] && usage 2
updown $1
status=0
;;
version)
[ $# -ne 1 ] && usage 2
echo $SHOREWALL_VERSION
status=0
;;
help)
[ $# -ne 1 ] && usage 2
usage 0
;;
*)
usage 2
;;
esac
fi
if [ -f ${VARDIR}/state ]; then
state="$(cat ${VARDIR}/state)"
case $state in
Stopped*|Clear*)
status=3
;;
esac
else
state=Unknown
fi
echo "State:$state"
echo
;;
up|down)
[ $# -eq 1 ] && exit 0
shift
[ $# -ne 1 ] && usage 2
updown $1
status=0
;;
version)
[ $# -ne 1 ] && usage 2
echo $SHOREWALL_VERSION
status=0
;;
help)
[ $# -ne 1 ] && usage 2
usage 0
;;
*)
usage 2
;;
esac
exit $status

View File

@@ -2,7 +2,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 1999-2010 - Tom Eastep (teastep@shorewall.net)
# (c) 1999-2011 - Tom Eastep (teastep@shorewall.net)
#
# Options are:
#
@@ -504,40 +504,57 @@ undo_routing() {
}
#
# Save the default route
#
save_default_route() {
awk \
'BEGIN {defroute=0;};
/^default / {deroute=1; print; next};
/nexthop/ {if (defroute == 1 ) {print ; next} };
{ defroute=0; };'
}
#
# Restore the default route that was in place before the initial 'shorewall start'
#
restore_default_route() {
replace_default_route() # $1 = USE_DEFAULT_RT
{
#
# default_route and result are inherited from the caller
#
if [ -n "$default_route" ]; then
case "$default_route" in
*metric*)
#
# Don't restore a default route with a metric unless USE_DEFAULT_RT=Yes. Otherwise, we only replace the one with metric 0
#
[ -n "$1" ] && qt $IP -4 route replace $default_route && progress_message "Default Route (${default_route# }) restored"
default_route=
;;
*)
qt $IP -4 route replace $default_route && progress_message "Default Route (${default_route# }) restored"
result=0
default_route=
;;
esac
fi
}
restore_default_route() # $1 = USE_DEFAULT_RT
{
local result
result=1
if [ -z "$g_noroutes" -a -f ${VARDIR}/default_route ]; then
local default_route
default_route=
local route
result=1
while read route ; do
case $route in
default*)
if [ -n "$default_route" ]; then
case "$default_route" in
*metric*)
#
# Don't restore a route with a metric -- we only replace the one with metric == 0
#
qt $IP -4 route delete default metric 0 && \
progress_message "Default Route with metric 0 deleted"
;;
*)
qt $IP -4 route replace $default_route && \
result=0 && \
progress_message "Default Route (${default_route# }) restored"
;;
esac
break
fi
replace_default_route $1
default_route="$default_route $route"
;;
*)
@@ -546,6 +563,20 @@ restore_default_route() {
esac
done < ${VARDIR}/default_route
replace_default_route $1
if [ $result = 1 ]; then
#
# We didn't restore a default route with metric 0
#
if $IP -4 -o route list 2> /dev/null | fgrep default | fgrep -qv metric; then
#
# But we added a default route with metric 0
#
qt $IP -4 route del default metric 0 && progress_message "Default route with metric 0 deleted"
fi
fi
rm -f ${VARDIR}/default_route
fi
@@ -593,8 +624,8 @@ conditionally_flush_conntrack() {
delete_proxyarp() {
if [ -f ${VARDIR}/proxyarp ]; then
while read address interface external haveroute; do
qt arp -i $external -d $address pub
[ -z "${haveroute}${g_noroutes}" ] && qt $IP -4 route del $address dev $interface
qt $IP -4 neigh del proxy $address dev $external
[ -z "${haveroute}${g_noroutes}" ] && qt $IP -4 route del $address/32 dev $interface
f=/proc/sys/net/ipv4/conf/$interface/proxy_arp
[ -f $f ] && echo 0 > $f
done < ${VARDIR}/proxyarp

View File

@@ -2,7 +2,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 1999-2010- Tom Eastep (teastep@shorewall.net)
# (c) 1999-2011- Tom Eastep (teastep@shorewall.net)
#
# Options are:
#
@@ -492,40 +492,57 @@ undo_routing() {
}
#
# Save the default route
#
save_default_route() {
awk \
'BEGIN {defroute=0;};
/^default / {defroute=1; print; next};
/nexthop/ {if (defroute == 1 ) {print ; next} };
{ defroute=0; };'
}
#
# Restore the default route that was in place before the initial 'shorewall start'
#
restore_default_route() {
replace_default_route() # $1 = USE_DEFAULT_RT
{
#
# default_route and result are inherited from the caller
#
if [ -n "$default_route" ]; then
case "$default_route" in
*metric*)
#
# Don't restore a default route with a metric unless USE_DEFAULT_RT=Yes. Otherwise, we only replace the one with metric 0
#
[ -n "$1" ] && qt $IP -6 route replace $default_route && progress_message "Default Route (${default_route# }) restored"
default_route=
;;
*)
qt $IP -6 route replace $default_route && progress_message "Default Route (${default_route# }) restored"
result=0
default_route=
;;
esac
fi
}
restore_default_route() # $1 = USE_DEFAULT_RT
{
local result
result=1
if [ -z "$g_noroutes" -a -f ${VARDIR}/default_route ]; then
local default_route
default_route=
local route
result=1
while read route ; do
case $route in
default)
if [ -n "$default_route" ]; then
case "$default_route" in
*metric*)
#
# Don't restore a route with a metric -- we only replace the one with metric == 0
#
qt $IP -6 route delete default metric 0 && \
progress_message "Default Route with metric 0 deleted"
;;
*)
qt $IP -6 route replace $default_route && \
result=0 && \
progress_message "Default Route (${default_route# }) restored"
;;
esac
break
fi
default*)
replace_default_route $1
default_route="$default_route $route"
;;
*)
@@ -534,6 +551,20 @@ restore_default_route() {
esac
done < ${VARDIR}/default_route
replace_default_route $1
if [ $result = 1 ]; then
#
# We didn't restore a default route with metric 0
#
if $IP -6 -o route list 2> /dev/null | fgrep default | fgrep -qv metric; then
#
# But we added a default route with metric 0
#
qt $IP -6 route del default metric 0 && progress_message "Default route with metric 0 deleted"
fi
fi
rm -f ${VARDIR}/default_route
fi
@@ -573,6 +604,22 @@ conditionally_flush_conntrack() {
fi
}
#
# Clear Proxy NDP
#
delete_proxyndp() {
if [ -f ${VARDIR}/proxyndp ]; then
while read address interface external haveroute; do
qt $IP -6 neigh del proxy $address dev $external
[ -z "${haveroute}${g_noroutes}" ] && qt $IP -6 route del $address/128 dev $interface
f=/proc/sys/net/ipv6/conf/$interface/proxy_ndp
[ -f $f ] && echo 0 > $f
done < ${VARDIR}/proxyndp
rm -f ${VARDIR}/proxyndp
fi
}
#
# Remove all Shorewall-added rules
#

56
Shorewall/action.A_Drop Normal file
View File

@@ -0,0 +1,56 @@
#
# Shorewall version 4 - Drop Action
#
# /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 'auth' requests are rejected, even if the policy is
# DROP. Otherwise, you may experience problems establishing
# connections with servers that use auth.
# c) 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!!!!!!!!!
#
###############################################################################
#TARGET SOURCE DEST PROTO DPORT SPORT
#
# Count packets that come through here
#
COUNT
#
# Reject 'auth'
#
Auth(A_REJECT)
#
# Don't log broadcasts
#
dropBcast(audit)
#
# ACCEPT critical ICMP types
#
A_AllowICMPs - - icmp
#
# 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

54
Shorewall/action.A_Reject Normal file
View File

@@ -0,0 +1,54 @@
#
# Shorewall version 4 - Reject Action
#
# /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!!!!!!!!!
###############################################################################
#TARGET SOURCE DEST PROTO
#
# Count packets that come through here
#
COUNT
#
# Don't log 'auth' -- REJECT
#
Auth(A_REJECT)
#
# Drop Broadcasts so they don't clutter up the log
# (broadcasts must *not* be rejected).
#
dropBcast(audit)
#
# ACCEPT critical ICMP types
#
A_AllowICMPs - - icmp
#
# 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

@@ -15,9 +15,49 @@
# c) Ensure that certain ICMP packets that are necessary for successful
# internet operation are always ACCEPTed.
#
# The action accepts five optional parameters:
#
# 1 - 'audit' or '-'. Default is '-' which means don't audit in builtin
# actions.
# 2 - Action to take with Auth requests. Default is REJECT or A_REJECT,
# depending on the setting of the first parameter.
# 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 UDP replies (UDP source port 53). Default
# is DROP or A_DROP depending on the first parameter.
#
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
#
###############################################################################
FORMAT 2
#
# The following magic provides different defaults for $2 thru $5, when $1 is
# 'audit'.
#
BEGIN PERL;
use Shorewall::Config;
my ( $p1, $p2, $p3 , $p4, $p5 ) = get_action_params( 5 );
if ( defined $p1 ) {
if ( $p1 eq 'audit' ) {
set_action_param( 2, 'A_REJECT') unless supplied $p2;
set_action_param( 3, 'A_DROP') unless supplied $p3;
set_action_param( 4, 'A_ACCEPT' ) unless supplied $p4;
set_action_param( 5, 'A_DROP' ) unless supplied $p5;
} else {
fatal_error "Invalid value ($p1) for first Drop parameter" if supplied $p1;
}
}
1;
END PERL;
DEFAULTS -,REJECT,DROP,ACCEPT,DROP
#TARGET SOURCE DEST PROTO DPORT SPORT
#
# Count packets that come through here
@@ -26,31 +66,31 @@ COUNT
#
# Reject 'auth'
#
Auth(REJECT)
Auth($2)
#
# Don't log broadcasts
#
dropBcast
dropBcast($1)
#
# ACCEPT critical ICMP types
#
AllowICMPs - - icmp
AllowICMPs($4) - - icmp
#
# Drop packets that are in the INVALID state -- these are usually ICMP packets
# and just confuse people when they appear in the log.
#
dropInvalid
dropInvalid($1)
#
# Drop Microsoft noise so that it doesn't clutter up the log.
#
SMB(DROP)
DropUPnP
SMB($3)
DropUPnP($5)
#
# Drop 'newnotsyn' traffic so that it doesn't get logged.
#
dropNotSyn - - tcp
dropNotSyn($1) - - tcp
#
# Drop late-arriving DNS replies. These are just a nuisance and clutter up
# the log.
#
DropDNSrep
DropDNSrep($5)

View File

@@ -12,8 +12,48 @@
# b) Ensure that certain ICMP packets that are necessary for successful
# internet operation are always ACCEPTed.
#
# The action accepts five optional parameters:
#
# 1 - 'audit' or '-'. Default is '-' which means don't audit in builtin
# actions.
# 2 - Action to take with Auth requests. Default is REJECT or A_REJECT,
# depending on the setting of the first parameter.
# 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 UDP replies (UDP source port 53). Default
# is DROP or A_DROP depending on the first parameter.
#
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
###############################################################################
FORMAT 2
#
# The following magic provides different defaults for $2 thru $5, when $1 is
# 'audit'.
#
BEGIN PERL;
use Shorewall::Config;
my ( $p1, $p2, $p3 , $p4, $p5 ) = get_action_params( 5 );
if ( defined $p1 ) {
if ( $p1 eq 'audit' ) {
set_action_param( 2, 'A_REJECT') unless supplied $p2;
set_action_param( 3, 'A_REJECT') unless supplied $p3;
set_action_param( 4, 'A_ACCEPT' ) unless supplied $p4;
set_action_param( 5, 'A_DROP' ) unless supplied $p5;
} else {
fatal_error "Invalid value ($p1) for first Reject parameter" if supplied $p1;
}
}
1;
END PERL;
DEFAULTS -,REJECT,REJECT,ACCEPT,DROP
#TARGET SOURCE DEST PROTO
#
# Count packets that come through here
@@ -22,33 +62,33 @@ COUNT
#
# Don't log 'auth' -- REJECT
#
Auth(REJECT)
Auth($2)
#
# Drop Broadcasts so they don't clutter up the log
# (broadcasts must *not* be rejected).
#
dropBcast
dropBcast($1)
#
# ACCEPT critical ICMP types
#
AllowICMPs - - icmp
AllowICMPs($4) - - icmp
#
# 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
dropInvalid($1)
#
# Reject Microsoft noise so that it doesn't clutter up the log.
#
SMB(REJECT)
DropUPnP
SMB($3)
DropUPnP($5)
#
# Drop 'newnotsyn' traffic so that it doesn't get logged.
#
dropNotSyn - - tcp
dropNotSyn($1) - - tcp
#
# Drop late-arriving DNS replies. These are just a nuisance and clutter up
# the log.
#
DropDNSrep
DropDNSrep($5)

View File

@@ -16,184 +16,11 @@
# Please see http://shorewall.net/Actions.html for additional
# information.
#
# Columns are:
# Columns are the same as in /etc/shorewall/rules.
#
#
# TARGET ACCEPT, DROP, REJECT, LOG, QUEUE, CONTINUE, a <macro>
# or a previously-defined <action>
#
# ACCEPT -- allow the connection request
# DROP -- ignore the request
# REJECT -- disallow the request and return an
# icmp-unreachable or an RST packet.
# LOG -- Simply log the packet and continue.
# QUEUE -- Queue the packet to a user-space
# application such as p2pwall.
# CONTINUE -- Stop processing this action and
# return to the point where the
# action was invoked.
# <action> -- An <action> defined in
# /etc/shorewall/actions.
# The <action> must appear in that
# file BEFORE the one being defined
# in this file.
# <macro> -- The name of a macro defined in a
# file named macro.<macro-name>. If
# the macro accepts an action
# parameter (Look at the macro
# source to see if it has PARAM in
# the TARGET column) then the macro
# name is followed by "/" and the
# action (ACCEPT, DROP, REJECT, ...)
# to be substituted for the
# parameter. Example: FTP/ACCEPT.
#
# The TARGET may optionally be followed
# by ":" and a syslog log level (e.g, REJECT:info or
# ACCEPT:debugging). This causes the packet to be
# logged at the specified level.
#
# The special log level 'none' does not result in logging
# but rather exempts the rule from being overridden by a
# non-forcing log level when the action is invoked.
#
# You may also specify ULOG (must be in upper case) as a
# log level.This will log to the ULOG target for routing
# to a separate log through use of ulogd
# (http://www.gnumonks.org/projects/ulogd).
#
# Actions specifying logging may be followed by a
# log tag (a string of alphanumeric characters)
# are appended to the string generated by the
# LOGPREFIX (in /etc/shorewall/shorewall.conf).
#
# Example: ACCEPT:info:ftp would include 'ftp '
# at the end of the log prefix generated by the
# LOGPREFIX setting.
#
# SOURCE Source hosts to which the rule applies.
# A comma-separated list of subnets
# and/or hosts. Hosts may be specified by IP or MAC
# address; mac addresses must begin with "~" and must use
# "-" as a separator.
#
# 192.168.2.2 Host 192.168.2.2
#
# 155.186.235.0/24 Subnet 155.186.235.0/24
#
# 10.0.0.4-10.0.0.9 Range of IP addresses; your
# kernel and iptables must have
# iprange match support.
#
# +remote The name of an ipset prefaced
# by "+". Your kernel and
# iptables must have set match
# support
#
# +remote[4] The name of the ipset may
# followed by a number of
# levels of ipset bindings
# enclosed in square brackets.
#
# 192.168.1.1,192.168.1.2
# Hosts 192.168.1.1 and
# 192.168.1.2.
# ~00-A0-C9-15-39-78 Host with
# MAC address 00:A0:C9:15:39:78.
#
# Alternatively, clients may be specified by interface
# name. For example, eth1 specifies a
# client that communicates with the firewall system
# through eth1. This may be optionally followed by
# another colon (":") and an IP/MAC/subnet address
# as described above (e.g., eth1:192.168.1.5).
#
# DEST Location of destination host. Same as above with
# the exception that MAC addresses are not allowed and
# that you cannot specify an ipset name in both the
# SOURCE and DEST columns.
#
# PROTO Protocol - Must be "tcp", "tcp:syn", "udp", "icmp",
# "ipp2p", "ipp2p:udp", "ipp2p:all", a number, or "all".
# "ipp2p*" requires ipp2p match support in your kernel
# and iptables.
#
# "tcp:syn" implies "tcp" plus the SYN flag must be
# set and the RST, ACK and FIN flags must be reset.
#
# DEST PORT(S) Destination Ports. A comma-separated list of Port
# names (from /etc/services), port numbers or port
# ranges; if the protocol is "icmp", this column is
# interpreted as the destination icmp-type(s).
#
# A port range is expressed as <low port>:<high port>.
#
# This column is ignored if PROTOCOL = all but must be
# entered if any of the following fields are supplied.
# In that case, it is suggested that this field contain
# "-"
#
# If your kernel contains multi-port match support, then
# only a single Netfilter rule will be generated if in
# this list and the CLIENT PORT(S) list below:
# 1. There are 15 or less ports listed.
# 2. No port ranges are included.
# Otherwise, a separate rule will be generated for each
# port.
#
# SOURCE PORT(S) (Optional) Port(s) used by the client. If omitted,
# any source port is acceptable. Specified as a comma-
# separated list of port names, port numbers or port
# ranges.
#
# If you don't want to restrict client ports but need to
# specify an ADDRESS in the next column, then place "-"
# in this column.
#
# If your kernel contains multi-port match support, then
# only a single Netfilter rule will be generated if in
# this list and the DEST PORT(S) list above:
# 1. There are 15 or less ports listed.
# 2. No port ranges are included.
# Otherwise, a separate rule will be generated for each
# port.
#
# RATE LIMIT You may rate-limit the rule by placing a value in
# this column:
#
# <rate>/<interval>[:<burst>]
#
# where <rate> is the number of connections per
# <interval> ("sec" or "min") and <burst> is the
# largest burst permitted. If no <burst> is given,
# a value of 5 is assumed. There may be no
# no whitespace embedded in the specification.
#
# Example: 10/sec:20
#
# USER/GROUP This column may only be non-empty if the SOURCE is
# the firewall itself.
#
# The column may contain:
#
# [!][<user name or number>][:<group name or number>][+<program name>]
#
# When this column is non-empty, the rule applies only
# if the program generating the output is running under
# the effective <user> and/or <group> specified (or is
# NOT running under that id if "!" is given).
#
# Examples:
#
# joe #program must be run by joe
# :kids #program must be run by a member of
# #the 'kids' group
# !:kids #program must not be run by a member
# #of the 'kids' group
# +upnpd #program named upnpd (This feature was
# #removed from Netfilter in kernel
# #version 2.6.14).
#
###############################################################################
#TARGET SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/
# PORT PORT(S) DEST LIMIT GROUP
#######################################################################################################
# DO NOT REMOVE THE FOLLOWING LINE
FORMAT 2
####################################################################################################################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/ MARK CONNLIMIT TIME HEADERS
# PORT PORT(S) DEST LIMIT GROUP

View File

@@ -8,6 +8,9 @@
#
# Builtin Actions are:
#
# A_ACCEPT # Audits then accepts a connection request
# A_DROP # Audits then drops a connection request
# A_REJECT # Audits then drops a connection request
# allowBcast # Silently Allow Broadcast/multicast
# dropBcast # Silently Drop Broadcast/multicast
# dropNotSyn # Silently Drop Non-syn TCP packets
@@ -30,5 +33,7 @@
#
###############################################################################
#ACTION
A_Drop # Audited Default Action for DROP policy
A_Reject # Audited Default action for REJECT policy
Drop # Default Action for DROP policy
Reject # Default Action for REJECT policy

View File

@@ -1,8 +1,465 @@
Changes in Shorewall 4.4.13.1
Changes in Shorewall 4.4.21 Final
1) Make log messages uniform.
1) Update release documents.
2) Fix blacklisting in simple configurations.
2) Correct handling of IPv6 address in TPROXY.
Changes in Shorewall 4.4.21 RC 3
1) Make shorewall[6].conf quoting consistent with 'update'.
2) Implement parameterized default actions in IPv6
3) Use local config in load and reload
Changes in Shorewall 4.4.21 RC 2
1) Correct code generated by TPROXY.
2) Make 'fallback' and 'balance' mutually exclusive.
3) Generate error if too many parameters to a function with DEFAULT
4) Prepare for more parameterized actions
5) Fix parameter push/pop in process_action()
6) Add comment push/pop in process_action()
Changes in Shorewall 4.4.21 RC 1
1) Fix empty parameter lists in _DEFAULT settings.
2) Correct FOREWARD_CLEAR_MARK -> FORWARD_CLEAR_MARK in an error
message.
3) Use updated config in verification during upgrade.
Changes in Shorewall 4.4.21 Beta 3
1) Shorewall-init can now save/restore ipsets.
2) Correct handling of DEFAULTS in non-action contexts.
3) Rename read_action_param and change signature.
4) Add DEFAULT to macro files.
Changes in Shorewall 4.4.21 Beta 2
1) Implement the 'update' command.
Changes in Shorewall 4.4.21 Beta 1
1) IPSET support in Shorewall6.
2) Make AUTOMAKE follow CONFIG_PATH
3) Default values for action parameters.
4) Parameterize Drop and Reject actions.
Changes in Shorewall 4.4.20.1
1) Corrected FSF address.
2) Don't modify configfiles/shorewall.conf &
configfiles/shorewall6.conf.
3) Change 'plain' default.
Changes in Shorewall 4.4.20 Final
1) Set /proc/sys/net/bridge/bridge_nf_call_ip6?tables.
2) Add 'I' and 'NI' STATEs in secmarks.
Changes in Shorewall 4.4.20 RC 1
1) Update release documents.
2) Annotate config files with manpage info.
3) Don't place negative numbers in IPMARK masks.
4) Fix IPv6 getparams
Changes in Shorewall 4.4.20 Beta 5
1) Rename Auditing Macros
2) Add -T option to compile and check
3) Implement ROUTEBACK_LOG_LEVEL and ROUTEBACK_AUDIT
Changes in Shorewall 4.4.20 Beta 4
1) Smarten up the tc devnum algorithm.
2) Implement LEGACY_FASTSTART option.
3) Add a '-c' option to the restart command.
4) /sbin/shorewall and /sbin/shorewall6 unification.
5) Remove dependence on 'make'
Changes in Shorewall 4.4.20 Beta 3
1) Add auditing support.
Changes in Shorewall 4.4.20 Beta 2
1) Use 'my' for module globals unless variable is exported.
2) Merged fixes from 4.4.19.4.
3) Implemented ACCOUNTING_TABLE
4) Implemented NFLOG accounting action.
5) Implement 'whitelist' option.
Changes in Shorewall 4.4.20 Beta 1
1) Apply Togan's patch for installation flexibility.
2) Disallow degenerate entry in tcpri.
3) More fixes to LIBEXEC/TCPRI
4) Don't allow filters and tcrules to refer to non-leaf classes.
Changes in Shorewall 4.4.19.2
1) Restore the ability to have IPSET names in the ORIGINAL DEST column
of a DNAT or REDIRECT rule.
2) Correct several complex TC issues reported by Mr Dash4.
3) Detect double exclusion involving ipset expressions.
Changes in Shorewall 4.4.19.1
1) Eliminate silly duplicate rule when stopped.
2) Don't believe that all nexthop routes are default routes.
3) Restore :<low port>-<high port> in masq file.
4) Correct default route safe/restore.
Changes in Shorewall 4.4.19.1
1) Eliminate silly duplicate rule when stopped.
2) Don't believe that all nexthop routes are default routes.
3) Restore :<low port>-<high port> in masq file.
4) Correct default route safe/restore.
5) Restore ability to use an IPSET in the ORIGINAL DEST column of
DNAT and REDIRECT rules.
Changes in Shorewall 4.4.19 Final
1) Update release documents.
2) Correct split_line() error message for the proxyndp line.
Changes in Shorewall 4.4.19 RC 1
1) Correct release notes.
2) Display mangle table in the output from 'shorewall show tc'.
3) Allow simple TC to work on both IPv4 and IPv6
4) Fix an optimizer bug in Shorewall::Chains::replace_references().
5) Correct missing jump to 'dnat'.
Changes in Shorewall 4.4.19 Beta 5
1) Fix logical naming and bridge.
Changes in Shorewall 4.4.19 Beta 4
1) Handle mis-configured ipsec host group on a bridge.
2) Significantly improve bridge/ports handling.
3) Allow port-lists in /etc/shorewall/rules.
Changes in Shorewall 4.4.19 Beta 3
1) Allow /usr executables to be installed in a designated location.
2) Allow Shorewall perl modules to be installed in a designated
location.
Changes in Shorewall 4.4.19 Beta 2
1) Minor rework of init-log creation in the installer.
2) Add VRRP macro.
3) Fix more params processing bugs.
4) Do a better job of editing ICMP type lists.
5) Allow /usr executables to be installed in a designated location.
6) Allow Shorewall perl modules to be installed in a designated
location.
Changes in Shorewall 4.4.19 Beta 1
1) Place ACK packets in the highest priority band.
2) Break ICMP lists into individual rules.
Changes in Shorewall 4.4.18 Final
1) Correct handling of IPv6 host address in a net context.
2) Restore <burst> in tcdevices.
3) Correct handling of non-present interfaces and tcfilters.
Changes in Shorewall 4.4.18 RC 1
1) Update Version.
Changes in Shorewall 4.4.18 Beta 4
1) Fix trivalue handling AGAIN.
2) Change default value of MODULE_PREFIX.
3) Combine Policy and Rules Modules
4) Move section processing to the Rules modules.
Changes in Shorewall 4.4.18 Beta 3
1) Change default chain in FORWARD section of the accounting file.
2) Restrict USER/GROUP to OUTPUT section.
3) Restore prohibition of MAC addresses in unsectioned config.
4) Fix several optimizer problems.
Changes in Shorewall 4.4.18 Beta 2
1) Fix the 'local' Provider option in IPv6
2) Remove hardcoded 0.0.0.0/0 from Providers.pm
3) Correct an optimizer defect having to do with jumps containing a
comment.
Changes in Shorewall 4.4.18 Beta 1
1) Split up modules file.
2) Add sections to the accounting file.
Changes in Shorewall 4.4.17
1) Secure helper and modules files for non-root access.
2) Rename USE_LOCAL_MODULES to EXPORTMODULES
Changes in Shorewall 4.4.17
1) Added sch_tbf to the modules files.
Changes in Shorewall 4.4.17 RC 1
1) Documentation and release notes cleanup.
2) Ensure that manual and accounting chains aren't too long.
3) Tighten up the editing of ACCOUNT(...).
4) Add 'show ipa' command.
5) Several fixes to IPv6 tcfilters.
6) Correct three issues in per-IP accounting.
Changes in Shorewall 4.4.17 Beta 3
1) Allow run-time address variables in the masq file.
2) Fix silly bug in expand_rule().
3) Correct two defects in compiler module loading.
4) Implement per-IP module loading.
Changes in Shorewall 4.4.17 Beta 2
1) Handle line containing only INCLUDE.
2) Fix empty SHELL variable handling with bash.
3) Correct 'check -r' with OPTIMIZE=8
4) Add sch_prio to modules file.
5) Add 'USE_LOCAL_MODULES' option.
6) Implement run-time address variables (&interface)
Changes in Shorewall 4.4.17 Beta 1
1) Improve readability of logging logic in expand_rule().
2) Improve efficency of oddball targets in process_rule1().
3) Export (param,value) pairs with EXPORTPARAMS=No.
4) Only produce 'done.' progress message on success.
5) Support INCLUDE in user exits.
6) Use updaterc.d during uninstall on Debian.
Changes in Shorewall 4.4.16 RC 1
1) Fix logging for jump to nat chain.
Changes in Shorewall 4.4.16 Beta 8
1) Complete parameterized actions.
2) Fix issue in expand_rule().
3) Eliminate Actions module.
4) Eliminate process_actions3().
5) Validate BLACKLIST_DISPOSITION.
Changes in Shorewall 4.4.16 Beta 7
1) Parameterized actions.
Changes in Shorewall 4.4.16 Beta 6
1) Don't let root match wildcard.
2) Fix use of wildcard names in the notrack file.
3) Fix use of wildcard names in the proxyarp file
4) Prevent perl runtime warnings with cached interface entries.
Changes in Shorewall 4.4.16 Beta 5
1) Fix broken logical naming with Proxy ARP.
2) Add support for proxyndp.
3) Move mid-level rule processing to the Actions module.
4) Implement format-2 actions.
5) Allow DNAT and REDIRECT in actions.
6) Remove kludgy restrictions regarding Macros and Actions.
Changes in Shorewall 4.4.16 Beta 4
1) Only issue get_params() warnings under 'trace'
2) Add ppp support to Shorewall-init
Changes in Shorewall 4.4.16 Beta 3
1) Integrate bug catcher into 'trace' and correct handling of
getparams on old (RHEL 5) shells.
Changes in Shorewall 4.4.16 Beta 2
1) Install bug catcher.
Changes in Shorewall 4.4.16 Beta 1
1) Handle multi-line ENV values
2) Fix for absent params file.
Changes in Shorewall 4.4.15
1) Add macros from Tuomo Soini.
2) Corrected macro.JAP.
3) Added fatal_error() functions to the -lite CLIs.
RC 1
1) Another Perl 5.12 warning.
2) Avoid anomalous behavior regarding syn flood chains.
3) Add HEADERS column for IPv6
Beta 2
1) Tweaks to IPv6 tcfilters
2) Add support for explicit provider routes
3) Fix shared TC tcfilters handling.
Beta 1
1) Handle exported VERBOSE.
2) Modernize handling of the params file.
3) Fix NULL_ROUTE_RFC1918
4) Fix problem of appending incorrect files.
5) Implement shared TC.
Changes in Shorewall 4.4.14
1) Support ipset lists.
2) Use conntrack in 'shorewall connections'
3) Clean up Shorewall6 error messages when running on a kernel <
2.6.24
4) Clean up ipset related error reporting out of validate_net().
5) Dramatically reduce the amount of CPU time spent in optimization.
6) Add 'scfilter' script.
7) Fix -lite init scripts.
8) Clamp VERBOSITY to valid range.
9) Delete obsolete options from shorewall.conf.
10) Change value of FORWARD_CLEAR_MARK in *.conf.
11) Use update-rc.d to install init symlinks.
12) Fix split_list().
13) Fix 10+ TC Interfaces.
14) Insure that VERBOSITY=0 when interrogating compiled script's version
Changes in Shorewall 4.4.13

View File

@@ -6,6 +6,6 @@
# Please see http://shorewall.net/Accounting.html for examples and
# additional information about how to use this file.
#
#####################################################################################################
#################################################################################################################
#ACTION CHAIN SOURCE DESTINATION PROTO DEST SOURCE USER/ MARK IPSEC
# PORT(S) PORT(S) GROUP

View File

@@ -3,11 +3,11 @@
#
# /etc/shorewall/findgw
#
# The code in this file is executed when Shorewall is trying to detect the
# The code in this file is executed when Shorewall is trying to detect the
# gateway through an interface in /etc/shorewall/providers that has GATEWAY
# specified as 'detect'.
#
# The function should echo the IP address of the gateway if it knows what
# The function should echo the IP address of the gateway if it knows what
# it is; the name of the interface is in $1.
#
# See http://shorewall.net/shorewall_extension_scripts.htm for additional

View File

@@ -6,6 +6,6 @@
# The manpage is also online at
# http://www.shorewall.net/manpages/shorewall-masq.html
#
###############################################################################
#############################################################################################
#INTERFACE:DEST SOURCE ADDRESS PROTO PORT(S) IPSEC MARK USER/
# GROUP

View File

@@ -4,7 +4,7 @@
# /etc/shorewall/restored
#
# Add commands below that you want to be executed after shorewall has
# completed a 'restore' command.
# completed a 'restore' command.
#
# See http://shorewall.net/shorewall_extension_scripts.htm for additional
# information.

View File

@@ -0,0 +1,9 @@
#
# Shorewall version 4 - routes File
#
# For information about entries in this file, type "man shorewall-routes"
#
# For additional information, see http://www.shorewall.net/MultiISP.html
##############################################################################
#PROVIDER DEST GATEWAY DEVICE

View File

@@ -6,8 +6,8 @@
# The manpage is also online at
# http://www.shorewall.net/manpages/shorewall-rules.html
#
####################################################################################################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/ MARK CONNLIMIT TIME
####################################################################################################################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/ MARK CONNLIMIT TIME HEADERS
# PORT PORT(S) DEST LIMIT GROUP
#SECTION ESTABLISHED
#SECTION RELATED

View File

@@ -0,0 +1,15 @@
#! /bin/sh
#
# Shorewall version 4 - Show Connections Filter
#
# /etc/shorewall/scfilter
#
# Replace the 'cat' command below to filter the output of
# 'show connections. Unlike other extension scripts, this file
# must be executable before Shorewall will use it.
#
# See http://shorewall.net/shorewall_extension_scripts.htm for additional
# information.
#
###############################################################################
cat -

View File

@@ -10,4 +10,4 @@

View File

@@ -18,188 +18,180 @@ STARTUP_ENABLED=No
VERBOSITY=1
###############################################################################
# L O G G I N G
# L O G G I N G
###############################################################################
LOGFILE=/var/log/messages
BLACKLIST_LOGLEVEL=
STARTUP_LOG=/var/log/shorewall-init.log
LOG_MARTIANS=Yes
LOG_VERBOSITY=2
LOGALLNEW=
LOGFILE=/var/log/messages
LOGFORMAT="Shorewall:%s:%s:"
LOGTAGONLY=No
LOGLIMIT=
LOGALLNEW=
BLACKLIST_LOGLEVEL=
MACLIST_LOG_LEVEL=info
TCP_FLAGS_LOG_LEVEL=info
SFILTER_LOG_LEVEL=info
SMURF_LOG_LEVEL=info
LOG_MARTIANS=Yes
STARTUP_LOG=/var/log/shorewall-init.log
TCP_FLAGS_LOG_LEVEL=info
###############################################################################
# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S
###############################################################################
CONFIG_PATH="/etc/shorewall:/usr/share/shorewall"
IPTABLES=
IP=
TC=
IPSET=
MODULESDIR=
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin"
PERL=/usr/bin/perl
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
RESTOREFILE=restore
SHOREWALL_SHELL=/bin/sh
SUBSYSLOCK=/var/lock/subsys/shorewall
MODULESDIR=
CONFIG_PATH=/etc/shorewall:/usr/share/shorewall
RESTOREFILE=
IPSECFILE=zones
LOCKFILE=
TC=
###############################################################################
# D E F A U L T A C T I O N S / M A C R O S
###############################################################################
DROP_DEFAULT="Drop"
REJECT_DEFAULT="Reject"
ACCEPT_DEFAULT="none"
QUEUE_DEFAULT="none"
NFQUEUE_DEFAULT="none"
ACCEPT_DEFAULT=none
DROP_DEFAULT=Drop
NFQUEUE_DEFAULT=none
QUEUE_DEFAULT=none
REJECT_DEFAULT=Reject
###############################################################################
# R S H / R C P C O M M A N D S
###############################################################################
RSH_COMMAND='ssh ${root}@${system} ${command}'
RCP_COMMAND='scp ${files} ${root}@${system}:${destination}'
RSH_COMMAND='ssh ${root}@${system} ${command}'
###############################################################################
# F I R E W A L L O P T I O N S
###############################################################################
IP_FORWARDING=On
ACCOUNTING=Yes
ACCOUNTING_TABLE=filter
ADD_IP_ALIASES=No
ADD_SNAT_ALIASES=No
ADMINISABSENTMINDED=Yes
AUTO_COMMENT=Yes
AUTOMAKE=No
BLACKLISTNEWONLY=Yes
CLAMPMSS=No
CLEAR_TC=Yes
COMPLETE=No
DELETE_THEN_ADD=Yes
DETECT_DNAT_IPADDRS=No
DISABLE_IPV6=No
DONT_LOAD=
DYNAMIC_BLACKLIST=Yes
EXPAND_POLICIES=Yes
EXPORTMODULES=Yes
FASTACCEPT=No
FORWARD_CLEAR_MARK=
IMPLICIT_CONTINUE=No
HIGH_ROUTE_MARKS=No
IP_FORWARDING=On
KEEP_RT_TABLES=No
LEGACY_FASTSTART=Yes
LOAD_HELPERS_ONLY=No
MACLIST_TABLE=filter
MACLIST_TTL=
MANGLE_ENABLED=Yes
MAPOLDACTIONS=No
MARK_IN_FORWARD_CHAIN=No
MODULE_SUFFIX=ko
MULTICAST=No
MUTEX_TIMEOUT=60
NULL_ROUTE_RFC1918=No
OPTIMIZE=0
OPTIMIZE_ACCOUNTING=No
REQUIRE_INTERFACE=No
RESTORE_DEFAULT_ROUTE=Yes
RETAIN_ALIASES=No
ROUTE_FILTER=No
SAVE_IPSETS=No
TC_ENABLED=Internal
TC_EXPERT=No
TC_PRIOMAP="2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2"
CLEAR_TC=Yes
MARK_IN_FORWARD_CHAIN=No
CLAMPMSS=No
ROUTE_FILTER=No
DETECT_DNAT_IPADDRS=No
MUTEX_TIMEOUT=60
ADMINISABSENTMINDED=Yes
BLACKLISTNEWONLY=Yes
DELAYBLACKLISTLOAD=No
MODULE_SUFFIX=ko
DISABLE_IPV6=No
BRIDGING=No
DYNAMIC_ZONES=No
PKTTYPE=Yes
NULL_ROUTE_RFC1918=No
MACLIST_TABLE=filter
MACLIST_TTL=
SAVE_IPSETS=No
MAPOLDACTIONS=No
FASTACCEPT=No
IMPLICIT_CONTINUE=No
HIGH_ROUTE_MARKS=No
USE_ACTIONS=Yes
OPTIMIZE=0
EXPORTPARAMS=Yes
EXPAND_POLICIES=Yes
KEEP_RT_TABLES=No
DELETE_THEN_ADD=Yes
MULTICAST=No
DONT_LOAD=
AUTO_COMMENT=Yes
MANGLE_ENABLED=Yes
TRACK_PROVIDERS=No
USE_DEFAULT_RT=No
RESTORE_DEFAULT_ROUTE=Yes
AUTOMAKE=No
WIDE_TC_MARKS=No
TRACK_PROVIDERS=No
ZONE2ZONE=2
ACCOUNTING=Yes
DYNAMIC_BLACKLIST=Yes
OPTIMIZE_ACCOUNTING=No
LOAD_HELPERS_ONLY=No
REQUIRE_INTERFACE=No
FORWARD_CLEAR_MARK=Yes
COMPLETE=No
###############################################################################
# P A C K E T D I S P O S I T I O N
###############################################################################
@@ -208,6 +200,15 @@ BLACKLIST_DISPOSITION=DROP
MACLIST_DISPOSITION=REJECT
SMURF_DISPOSITION=DROP
SFILTER_DISPOSITION=DROP
TCP_FLAGS_DISPOSITION=DROP
#LAST LINE -- DO NOT REMOVE
################################################################################
# L E G A C Y O P T I O N
# D O N O T D E L E T E O R A L T E R
################################################################################
IPSECFILE=zones

View File

@@ -4,7 +4,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2000,2001,2002,2003,2004,2005,2006,2007,2009,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 2000-2011 - Tom Eastep (teastep@shorewall.net)
#
# Shorewall documentation is available at http://shorewall.net
#
@@ -22,7 +22,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
VERSION=4.4.13.1
VERSION=4.4.21
usage() # $1 = exit status
{
@@ -30,6 +30,8 @@ usage() # $1 = exit status
echo "usage: $ME"
echo " $ME -v"
echo " $ME -h"
echo " $ME -s"
echo " $ME -f"
exit $1
}
@@ -94,7 +96,6 @@ install_file() # $1 = source $2 = target $3 = mode
# INIT is the name of the script in the $DEST directory
# ARGS is "yes" if we've already parsed an argument
#
ARGS=""
T="-T"
if [ -z "$DEST" ] ; then
@@ -105,8 +106,28 @@ if [ -z "$INIT" ] ; then
INIT="shorewall"
fi
ANNOTATED=
SPARSE=
MANDIR=${MANDIR:-"/usr/share/man"}
[ -n "${LIBEXEC:=/usr/share}" ]
[ -n "${PERLLIB:=/usr/share/shorewall}" ]
case "$LIBEXEC" in
/*)
;;
*)
LIBEXEC=/usr/${LIBEXEC}
;;
esac
case "$PERLLIB" in
/*)
;;
*)
PERLLIB=/usr/${PERLLIB}
;;
esac
INSTALLD='-D'
case $(uname) in
@@ -142,24 +163,49 @@ esac
OWNERSHIP="-o $OWNER -g $GROUP"
while [ $# -gt 0 ] ; do
case "$1" in
-h|help|?)
usage 0
;;
-v)
echo "Shorewall Firewall Installer Version $VERSION"
exit 0
;;
-s)
SPARSE=Yes
finished=0
while [ $finished -eq 0 ]; do
option=$1
case "$option" in
-*)
option=${option#-}
while [ -n "$option" ]; do
case $option in
h)
usage 0
;;
v)
echo "Shorewall Firewall Installer Version $VERSION"
exit 0
;;
s*)
SPARSE=Yes
option=${option#s}
;;
a*)
ANNOTATED=Yes
option=${option#a}
;;
p*)
ANNOTATED=
option=${option#p}
;;
*)
usage 1
;;
esac
done
shift
;;
*)
usage 1
[ -n "$option" ] && usage 1
finished=1
;;
esac
shift
ARGS="yes"
done
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
@@ -233,9 +279,19 @@ fi
if [ -z "$CYGWIN" ]; then
install_file shorewall ${DESTDIR}/sbin/shorewall 0755
echo "shorewall control program installed in ${DESTDIR}/sbin/shorewall"
if [ -z "$MAC" ]; then
eval sed -i \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/shorewall
eval sed -i \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/sbin/shorewall
else
eval sed -i -e \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/shorewall
eval sed -i -e \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/sbin/shorewall
fi
else
install_file shorewall ${DESTDIR}/bin/shorewall 0755
echo "shorewall control program installed in ${DESTDIR}/bin/shorewall"
eval sed -i \'s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/bin/shorewall
eval sed -i \'s\|g_perllib=.\*\|g_perllib=$PERLLIB\|\' ${DESTDIR}/bin/shorewall
fi
#
@@ -258,7 +314,8 @@ fi
# Create /etc/shorewall, /usr/share/shorewall and /var/shorewall if needed
#
mkdir -p ${DESTDIR}/etc/shorewall
mkdir -p ${DESTDIR}/usr/share/shorewall
mkdir -p ${DESTDIR}${LIBEXEC}/shorewall
mkdir -p ${DESTDIR}${PERLLIB}/Shorewall
mkdir -p ${DESTDIR}/usr/share/shorewall/configfiles
mkdir -p ${DESTDIR}/var/lib/shorewall
@@ -266,21 +323,24 @@ chmod 755 ${DESTDIR}/etc/shorewall
chmod 755 ${DESTDIR}/usr/share/shorewall
chmod 755 ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -n "$DESTDIR" ]; then
mkdir -p ${DESTDIR}/etc/logrotate.d
chmod 755 ${DESTDIR}/etc/logrotate.d
fi
if [ -n "$ANNOTATED" ]; then
suffix=.annotated
else
suffix=
fi
#
# Install the config file
#
run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf ${DESTDIR}/usr/share/shorewall/configfiles
perl -p -w -i -e 's|^CONFIG_PATH=.*|CONFIG_PATH=/usr/share/shorewall/configfiles:/usr/share/shorewall|;' ${DESTDIR}/usr/share/shorewall/configfiles/shorewall.conf
perl -p -w -i -e 's|^STARTUP_LOG=.*|STARTUP_LOG=/var/log/shorewall-lite-init.log|;' ${DESTDIR}/usr/share/shorewall/configfiles/shorewall.conf
if [ ! -f ${DESTDIR}/etc/shorewall/shorewall.conf ]; then
run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0644 configfiles/shorewall.conf${suffix} ${DESTDIR}/etc/shorewall/shorewall.conf
if [ -n "$DEBIAN" ]; then
#
@@ -298,10 +358,11 @@ fi
#
# Install the zones file
#
run_install $OWNERSHIP -m 0644 configfiles/zones ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/zones ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/zones.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/zones ]; then
run_install $OWNERSHIP -m 0744 configfiles/zones ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0644 configfiles/zones${suffix} ${DESTDIR}/etc/shorewall/zones
echo "Zones file installed as ${DESTDIR}/etc/shorewall/zones"
fi
@@ -323,189 +384,212 @@ delete_file ${DESTDIR}/usr/share/shorewall/prog.footer
# Install wait4ifup
#
install_file wait4ifup ${DESTDIR}/usr/share/shorewall/wait4ifup 0755
install_file wait4ifup ${DESTDIR}${LIBEXEC}/shorewall/wait4ifup 0755
echo
echo "wait4ifup installed in ${DESTDIR}/usr/share/shorewall/wait4ifup"
echo "wait4ifup installed in ${DESTDIR}${LIBEXEC}/shorewall/wait4ifup"
#
# Install the policy file
#
install_file configfiles/policy ${DESTDIR}/usr/share/shorewall/configfiles/policy 0644
run_install -m 0644 configfiles/policy ${DESTDIR}/usr/share/shorewall/configfiles
run_install -m 0644 configfiles/policy.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/policy ]; then
run_install $OWNERSHIP -m 0600 configfiles/policy ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/policy${suffix} ${DESTDIR}/etc/shorewall/policy
echo "Policy file installed as ${DESTDIR}/etc/shorewall/policy"
fi
#
# Install the interfaces file
#
run_install $OWNERSHIP -m 0644 configfiles/interfaces ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/interfaces ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/interfaces.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/interfaces ]; then
run_install $OWNERSHIP -m 0600 configfiles/interfaces ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/interfaces${suffix} ${DESTDIR}/etc/shorewall/interfaces
echo "Interfaces file installed as ${DESTDIR}/etc/shorewall/interfaces"
fi
#
# Install the hosts file
#
run_install $OWNERSHIP -m 0644 configfiles/hosts ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/hosts ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/hosts.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/hosts ]; then
run_install $OWNERSHIP -m 0600 configfiles/hosts ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/hosts${suffix} ${DESTDIR}/etc/shorewall/hosts
echo "Hosts file installed as ${DESTDIR}/etc/shorewall/hosts"
fi
#
# Install the rules file
#
run_install $OWNERSHIP -m 0644 configfiles/rules ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/rules ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/rules.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/rules ]; then
run_install $OWNERSHIP -m 0600 configfiles/rules ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/rules${suffix} ${DESTDIR}/etc/shorewall/rules
echo "Rules file installed as ${DESTDIR}/etc/shorewall/rules"
fi
#
# Install the NAT file
#
run_install $OWNERSHIP -m 0644 configfiles/nat ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/nat ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/nat.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/nat ]; then
run_install $OWNERSHIP -m 0600 configfiles/nat ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/nat${suffix} ${DESTDIR}/etc/shorewall/nat
echo "NAT file installed as ${DESTDIR}/etc/shorewall/nat"
fi
#
# Install the NETMAP file
#
run_install $OWNERSHIP -m 0644 configfiles/netmap ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/netmap ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/netmap.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/netmap ]; then
run_install $OWNERSHIP -m 0600 configfiles/netmap ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/netmap${suffix} ${DESTDIR}/etc/shorewall/netmap
echo "NETMAP file installed as ${DESTDIR}/etc/shorewall/netmap"
fi
#
# Install the Parameters file
#
run_install $OWNERSHIP -m 0644 configfiles/params ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/params ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/params.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -f ${DESTDIR}/etc/shorewall/params ]; then
chmod 0644 ${DESTDIR}/etc/shorewall/params
else
run_install $OWNERSHIP -m 0644 configfiles/params ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0644 configfiles/params${suffix} ${DESTDIR}/etc/shorewall/params
echo "Parameter file installed as ${DESTDIR}/etc/shorewall/params"
fi
#
# Install the proxy ARP file
#
run_install $OWNERSHIP -m 0644 configfiles/proxyarp ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/proxyarp ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/proxyarp.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/proxyarp ]; then
run_install $OWNERSHIP -m 0600 configfiles/proxyarp ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/proxyarp${suffix} ${DESTDIR}/etc/shorewall/proxyarp
echo "Proxy ARP file installed as ${DESTDIR}/etc/shorewall/proxyarp"
fi
#
# Install the Stopped Routing file
#
run_install $OWNERSHIP -m 0644 configfiles/routestopped ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/routestopped ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/routestopped.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/routestopped ]; then
run_install $OWNERSHIP -m 0600 configfiles/routestopped ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/routestopped${suffix} ${DESTDIR}/etc/shorewall/routestopped
echo "Stopped Routing file installed as ${DESTDIR}/etc/shorewall/routestopped"
fi
#
# Install the Mac List file
#
run_install $OWNERSHIP -m 0644 configfiles/maclist ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/maclist ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/maclist.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/maclist ]; then
run_install $OWNERSHIP -m 0600 configfiles/maclist ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/maclist${suffix} ${DESTDIR}/etc/shorewall/maclist
echo "MAC list file installed as ${DESTDIR}/etc/shorewall/maclist"
fi
#
# Install the Masq file
#
run_install $OWNERSHIP -m 0644 configfiles/masq ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/masq ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/masq.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/masq ]; then
run_install $OWNERSHIP -m 0600 configfiles/masq ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/masq${suffix} ${DESTDIR}/etc/shorewall/masq
echo "Masquerade file installed as ${DESTDIR}/etc/shorewall/masq"
fi
#
# Install the Notrack file
#
run_install $OWNERSHIP -m 0644 configfiles/notrack ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/notrack ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/notrack.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/notrack ]; then
run_install $OWNERSHIP -m 0600 configfiles/notrack ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/notrack${suffix} ${DESTDIR}/etc/shorewall/notrack
echo "Notrack file installed as ${DESTDIR}/etc/shorewall/notrack"
fi
#
# Install the Modules file
# Install the Modules files
#
run_install $OWNERSHIP -m 0600 modules ${DESTDIR}/usr/share/shorewall
run_install $OWNERSHIP -m 0644 modules ${DESTDIR}/usr/share/shorewall
echo "Modules file installed as ${DESTDIR}/usr/share/shorewall/modules"
for f in modules.*; do
run_install $OWNERSHIP -m 0644 $f ${DESTDIR}/usr/share/shorewall/$f
echo "Module file $f installed as ${DESTDIR}/usr/share/shorewall/$f"
done
#
# Install the Module Helpers file
#
run_install $OWNERSHIP -m 0600 helpers ${DESTDIR}/usr/share/shorewall
run_install $OWNERSHIP -m 0644 helpers ${DESTDIR}/usr/share/shorewall
echo "Helper modules file installed as ${DESTDIR}/usr/share/shorewall/helpers"
#
# Install the TC Rules file
#
run_install $OWNERSHIP -m 0644 configfiles/tcrules ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcrules ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcrules.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/tcrules ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcrules ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/tcrules${suffix} ${DESTDIR}/etc/shorewall/tcrules
echo "TC Rules file installed as ${DESTDIR}/etc/shorewall/tcrules"
fi
#
# Install the TC Interfaces file
#
run_install $OWNERSHIP -m 0644 configfiles/tcinterfaces ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcinterfaces ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcinterfaces.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/tcinterfaces ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcinterfaces ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/tcinterfaces${suffix} ${DESTDIR}/etc/shorewall/tcinterfaces
echo "TC Interfaces file installed as ${DESTDIR}/etc/shorewall/tcinterfaces"
fi
#
# Install the TC Priority file
#
run_install $OWNERSHIP -m 0644 configfiles/tcpri ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcpri ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcpri.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/tcpri ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcpri ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/tcpri${suffix} ${DESTDIR}/etc/shorewall/tcpri
echo "TC Priority file installed as ${DESTDIR}/etc/shorewall/tcpri"
fi
#
# Install the TOS file
#
run_install $OWNERSHIP -m 0644 configfiles/tos ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tos ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tos.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/tos ]; then
run_install $OWNERSHIP -m 0600 configfiles/tos ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/tos${suffix} ${DESTDIR}/etc/shorewall/tos
echo "TOS file installed as ${DESTDIR}/etc/shorewall/tos"
fi
#
# Install the Tunnels file
#
run_install $OWNERSHIP -m 0644 configfiles/tunnels ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tunnels ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tunnels.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/tunnels ]; then
run_install $OWNERSHIP -m 0600 configfiles/tunnels ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/tunnels${suffix} ${DESTDIR}/etc/shorewall/tunnels
echo "Tunnels file installed as ${DESTDIR}/etc/shorewall/tunnels"
fi
#
# Install the blacklist file
#
run_install $OWNERSHIP -m 0644 configfiles/blacklist ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/blacklist ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/blacklist.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/blacklist ]; then
run_install $OWNERSHIP -m 0600 configfiles/blacklist ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/blacklist${suffix} ${DESTDIR}/etc/shorewall/blacklist
echo "Blacklist file installed as ${DESTDIR}/etc/shorewall/blacklist"
fi
#
@@ -539,60 +623,66 @@ delete_file ${DESTDIR}/usr/share/shorewall/xmodules
#
# Install the Providers file
#
run_install $OWNERSHIP -m 0644 configfiles/providers ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/providers ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/providers.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/providers ]; then
run_install $OWNERSHIP -m 0600 configfiles/providers ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/providers${suffix} ${DESTDIR}/etc/shorewall/providers
echo "Providers file installed as ${DESTDIR}/etc/shorewall/providers"
fi
#
# Install the Route Rules file
#
run_install $OWNERSHIP -m 0644 configfiles/route_rules ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/route_rules ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/route_rules.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/route_rules ]; then
run_install $OWNERSHIP -m 0600 configfiles/route_rules ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/route_rules${suffix} ${DESTDIR}/etc/shorewall/route_rules
echo "Routing rules file installed as ${DESTDIR}/etc/shorewall/route_rules"
fi
#
# Install the tcclasses file
#
run_install $OWNERSHIP -m 0644 configfiles/tcclasses ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcclasses ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcclasses.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/tcclasses ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcclasses ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/tcclasses${suffix} ${DESTDIR}/etc/shorewall/tcclasses
echo "TC Classes file installed as ${DESTDIR}/etc/shorewall/tcclasses"
fi
#
# Install the tcdevices file
#
run_install $OWNERSHIP -m 0644 configfiles/tcdevices ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcdevices ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcdevices.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/tcdevices ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcdevices ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/tcdevices${suffix} ${DESTDIR}/etc/shorewall/tcdevices
echo "TC Devices file installed as ${DESTDIR}/etc/shorewall/tcdevices"
fi
#
# Install the tcfilters file
#
run_install $OWNERSHIP -m 0644 configfiles/tcfilters ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcfilters ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/tcfilters.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/tcfilters ]; then
run_install $OWNERSHIP -m 0600 configfiles/tcfilters ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/tcfilters${suffix} ${DESTDIR}/etc/shorewall/tcfilters
echo "TC Filters file installed as ${DESTDIR}/etc/shorewall/tcfilters"
fi
#
# Install the secmarks file
#
run_install $OWNERSHIP -m 0644 configfiles/secmarks ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/secmarks ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/secmarks.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/secmarks ]; then
run_install $OWNERSHIP -m 0600 configfiles/secmarks ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/secmarks${suffix} ${DESTDIR}/etc/shorewall/secmarks
echo "Secmarks file installed as ${DESTDIR}/etc/shorewall/secmarks"
fi
@@ -649,19 +739,21 @@ fi
#
# Install the ECN file
#
run_install $OWNERSHIP -m 0644 configfiles/ecn ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/ecn ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/ecn.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/ecn ]; then
run_install $OWNERSHIP -m 0600 configfiles/ecn ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/ecn${suffix} ${DESTDIR}/etc/shorewall/ecn
echo "ECN file installed as ${DESTDIR}/etc/shorewall/ecn"
fi
#
# Install the Accounting file
#
run_install $OWNERSHIP -m 0644 configfiles/accounting ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/accounting ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/accounting.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/accounting ]; then
run_install $OWNERSHIP -m 0600 configfiles/accounting ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0600 configfiles/accounting${suffix} ${DESTDIR}/etc/shorewall/accounting
echo "Accounting file installed as ${DESTDIR}/etc/shorewall/accounting"
fi
#
@@ -737,6 +829,15 @@ if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/tcclear ]; then
echo "Tcclear file installed as ${DESTDIR}/etc/shorewall/tcclear"
fi
#
# Install the Scfilter file
#
run_install $OWNERSHIP -m 644 configfiles/scfilter ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/scfilter ]; then
run_install $OWNERSHIP -m 0600 configfiles/scfilter ${DESTDIR}/etc/shorewall
echo "Scfilter file installed as ${DESTDIR}/etc/shorewall/scfilter"
fi
#
# Install the Standard Actions file
#
install_file actions.std ${DESTDIR}/usr/share/shorewall/actions.std 0644
@@ -745,10 +846,11 @@ echo "Standard actions file installed as ${DESTDIR}/usr/shared/shorewall/actions
#
# Install the Actions file
#
run_install $OWNERSHIP -m 0644 configfiles/actions ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/actions ${DESTDIR}/usr/share/shorewall/configfiles
run_install $OWNERSHIP -m 0644 configfiles/actions.annotated ${DESTDIR}/usr/share/shorewall/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}/etc/shorewall/actions ]; then
run_install $OWNERSHIP -m 0644 configfiles/actions ${DESTDIR}/etc/shorewall
run_install $OWNERSHIP -m 0644 configfiles/actions${suffix} ${DESTDIR}/etc/shorewall/actions
echo "Actions file installed as ${DESTDIR}/etc/shorewall/actions"
fi
@@ -802,16 +904,23 @@ chmod 755 ${DESTDIR}/usr/share/shorewall/Shorewall
#
cd Perl
install_file compiler.pl ${DESTDIR}/usr/share/shorewall/compiler.pl 0755
install_file compiler.pl ${DESTDIR}${LIBEXEC}/shorewall/compiler.pl 0755
echo
echo "Compiler installed in ${DESTDIR}/usr/share/shorewall/compiler.pl"
echo "Compiler installed in ${DESTDIR}${LIBEXEC}/shorewall/compiler.pl"
#
# Install the params file helper
#
install_file getparams ${DESTDIR}${LIBEXEC}/shorewall/getparams 0755
echo
echo "Params file helper installed in ${DESTDIR}${LIBEXEC}/shorewall/getparams"
#
# Install the libraries
#
for f in Shorewall/*.pm ; do
install_file $f ${DESTDIR}/usr/share/shorewall/$f 0644
echo "Module ${f%.*} installed as ${DESTDIR}/usr/share/shorewall/$f"
install_file $f ${DESTDIR}${PERLLIB}/$f 0644
echo "Module ${f%.*} installed as ${DESTDIR}${PERLLIB}/$f"
done
#
# Install the program skeleton files
@@ -872,17 +981,14 @@ fi
if [ -z "$DESTDIR" ]; then
rm -rf /usr/share/shorewall-perl
rm -rf /usr/share/shorewall-shell
[ "$PERLLIB" != /usr/share/shorewall ] && rm -rf /usr/share/shorewall/Shorewall
fi
if [ -z "$DESTDIR" -a -n "$first_install" -a -z "${CYGWIN}${MAC}" ]; then
if [ -n "$DEBIAN" ]; then
install_file default.debian /etc/default/shorewall 0644
if [ -x /sbin/insserv ]; then
insserv /etc/init.d/shorewall
else
ln -s ../init.d/shorewall /etc/rcS.d/S40shorewall
fi
update-rc.d shorewall defaults
echo "shorewall will start automatically at boot"
echo "Set startup=1 in /etc/default/shorewall to enable"

View File

@@ -1,11 +1,2 @@
1) On systems running Upstart, shorewall-init cannot reliably start the
firewall before interfaces are brought up.
2) The date/time formatting in the STARTUP_LOG is not uniform.
Fixed in 4.4.13.1
3) The blacklisting change in 4.4.13 broke blacklisting in some simple
configurations with the effect that blacklisting was not enabled.
Fixed in 4.4.13.1
1) On systems running Upstart, shorewall-init cannot reliably secure
the firewall before interfaces are brought up.

View File

@@ -29,7 +29,7 @@
#
SHOREWALL_LIBVERSION=40407
SHOREWALL_CAPVERSION=40413
SHOREWALL_CAPVERSION=40421
[ -n "${VARDIR:=/var/lib/shorewall}" ]
[ -n "${SHAREDIR:=/usr/share/shorewall}" ]

View File

@@ -339,7 +339,7 @@ do_save() {
#
# Don't save an 'empty' file
#
grep -q '^-N' ${VARDIR}/ipsets.tmp && mv -f ${VARDIR}/ipsets.tmp ${g_restorepath}-ipsets
grep -qE -- '^(-N|create )' ${VARDIR}/ipsets.tmp && mv -f ${VARDIR}/ipsets.tmp ${g_restorepath}-ipsets
fi
fi
;;
@@ -399,6 +399,11 @@ show_routing() {
heading "Table $table:"
ip route list table $table
done
if [ -n "$g_routecache" ]; then
heading "Route Cache"
ip -4 route list cache
fi
else
heading "Routing Table"
ip route list
@@ -422,7 +427,9 @@ list_zone() {
[ -n "$(mywhich ipset)" ] || fatal_error "The ipset utility cannot be located"
sets=$(find_sets $1)
sets=$(ipset -L -n | grep '^$1_');
[ -n "$sets" ] || sets=$(find_sets $1)
for setname in $sets; do
echo "${setname#${1}_}:"
@@ -433,6 +440,36 @@ list_zone() {
done
}
#
# Show Filter - For Shorewall-lite, if there was an scfilter file at compile-time,
# then the compiler generated another version of this function and
# embedded it in the firewall.conf file. That version supersedes this
# one.
#
show_connections_filter() {
local filter
local command
local first
command=${SHOREWALL_SHELL}
filter=$(find_file scfilter)
if [ -f $filter ]; then
first=$(head -n1 $filter)
case $first in
\#!*)
command=${first#\#!}
;;
esac
$command $filter
else
cat -
fi
}
#
# Show Command Executor
#
@@ -505,6 +542,10 @@ show_command() {
g_ipt_options1="--line-numbers"
option=${option#l}
;;
c*)
g_routecache=Yes
option=${option#c}
;;
*)
usage 1
;;
@@ -520,15 +561,33 @@ show_command() {
g_ipt_options="$g_ipt_options $g_ipt_options1"
[ -n "$g_debugging" ] && set -x
case "$1" in
connections)
[ $# -gt 1 ] && usage 1
local count=$(cat /proc/sys/net/netfilter/nf_conntrack_count)
local max=$(cat /proc/sys/net/netfilter/nf_conntrack_max)
echo "$g_product $SHOREWALL_VERSION Connections ($count out of $max) at $g_hostname - $(date)"
if [ -d /proc/sys/net/netfilter/ ]; then
local count
local max
count=$(cat /proc/sys/net/netfilter/nf_conntrack_count)
max=$(cat /proc/sys/net/netfilter/nf_conntrack_max)
echo "$g_product $SHOREWALL_VERSION Connections ($count out of $max) at $g_hostname - $(date)"
else
echo "$g_product $SHOREWALL_VERSION Connections at $g_hostname - $(date)"
fi
echo
[ -f /proc/net/ip_conntrack ] && cat /proc/net/ip_conntrack || grep -v '^ipv6' /proc/net/nf_conntrack
if qt mywhich conntrack ; then
conntrack -f ipv4 -L | show_connections_filter
else
if [ -f /proc/net/ip_conntrack ]; then
cat /proc/net/ip_conntrack | show_connections_filter
else
grep -v '^ipv6' /proc/net/nf_conntrack | show_connections_filter
fi
fi
;;
nat)
[ $# -gt 1 ] && usage 1
@@ -556,7 +615,7 @@ show_command() {
if [ -z "$LOGFILE" ]; then
LOGFILE=/var/log/messages
if [ -n "$(syslog_circular_buffer)" ]; then
g_logread="logread | tac"
elif [ -r $LOGFILE ]; then
@@ -583,6 +642,12 @@ show_command() {
echo "$g_product $SHOREWALL_VERSION Traffic Control at $g_hostname - $(date)"
echo
shift
if [ -z "$1" ]; then
$IPTABLES -t mangle -L -n -v
echo
fi
show_tc $1
;;
classifiers|filters)
@@ -639,8 +704,17 @@ show_command() {
;;
config)
. ${SHAREDIR}/configpath
echo "Default CONFIG_PATH is $CONFIG_PATH"
[ -n "$LITEDIR" ] && echo "LITEDIR is $LITEDIR"
if [ -n "$g_filemode" ]; then
echo "CONFIG_PATH=$CONFIG_PATH"
echo "VARDIR=$VARDIR"
echo "LIBEXEC=$g_libexec"
[ -n "$LITEDIR" ] && echo "LITEDIR=$LITEDIR"
else
echo "Default CONFIG_PATH is $CONFIG_PATH"
echo "Default VARDIR is $VARDIR"
echo "LIBEXEC is $g_libexec"
[ -n "$LITEDIR" ] && echo "LITEDIR is $LITEDIR"
fi
;;
chain)
shift
@@ -665,11 +739,20 @@ show_command() {
echo
[ -f ${VARDIR}/policies ] && cat ${VARDIR}/policies;
;;
ipa)
echo "$g_product $SHOREWALL_VERSION per-IP Accounting at $g_hostname - $(date)"
echo
[ $# -gt 1 ] && usage 1
perip_accounting
;;
*)
if [ "$g_product" = Shorewall ]; then
case $1 in
actions)
[ $# -gt 1 ] && usage 1
echo "A_ACCEPT # Audit and accept the connection"
echo "A_DROP # Audit and drop the connection"
echo "A_REJECT # Audit and reject the connection "
echo "allowBcast # Silently Allow Broadcast/multicast"
echo "allowInvalid # Accept packets that are in the INVALID conntrack state."
echo "allowinUPnP # Allow UPnP inbound (to firewall) traffic"
@@ -677,12 +760,8 @@ show_command() {
echo "dropBcast # Silently Drop Broadcast/multicast"
echo "dropInvalid # Silently Drop packets that are in the INVALID conntrack state"
echo "dropNotSyn # Silently Drop Non-syn TCP packets"
echo "drop1918src # Drop packets with an RFC 1918 source address"
echo "drop1918dst # Drop packets with an RFC 1918 original dest address"
echo "forwardUPnP # Allow traffic that upnpd has redirected from"
echo "rejNotSyn # Silently Reject Non-syn TCP packets"
echo "rej1918src # Reject packets with an RFC 1918 source address"
echo "rej1918dst # Reject packets with an RFC 1918 original dest address"
if [ -f ${CONFDIR}/actions ]; then
cat ${SHAREDIR}/actions.std ${CONFDIR}/actions | grep -Ev '^\#|^$'
@@ -763,10 +842,61 @@ show_command() {
esac
}
perip_accounting() {
if qt mywhich iptaccount; then
local hnames
local hname
hnames=$(iptaccount -a | grep '^Found table:' | cut -d ' ' -f 3)
if [ -n "$hnames" ]; then
for hname in $hnames; do
iptaccount -l $hname | egrep '^IP:|^Show'
echo
done
else
echo " No IP Accounting Tables Defined"
echo
fi
else
echo " iptaccount is not installed"
fi
}
#
# Dump Filter - For Shorewall-lite, if there was a dumpfilter file at compile-time,
# then the compiler generated another version of this function and
# embedded it in the firewall.conf file. That version supersedes this
# one.
#
dump_filter() {
local filter
local command
local first
command=${SHOREWALL_SHELL}
filter=$(find_file dumpfilter)
if [ -f $filter ]; then
first=$(head -n1 $filter)
case $first in
\#!*)
command=${first#\#!}
;;
esac
$command $filter
else
cat -
fi
}
#
# Dump Command Executor
#
dump_command() {
do_dump_command() {
local finished
finished=0
@@ -794,6 +924,10 @@ dump_command() {
g_ipt_options1="--line-numbers"
option=${option#l}
;;
c*)
g_routecache=Yes
option=${option#c}
;;
*)
usage 1
;;
@@ -869,6 +1003,10 @@ dump_command() {
brctl show
fi
heading "Per-IP Counters"
perip_accounting
if qt mywhich setkey; then
heading "PFKEY SPD"
setkey -DP
@@ -912,6 +1050,10 @@ dump_command() {
fi
}
dump_command() {
do_dump_command | dump_filter
}
#
# Restore Comand Executor
#
@@ -1543,6 +1685,7 @@ determine_capabilities() {
OWNER_MATCH=
IPSET_MATCH=
OLD_IPSET_MATCH=
IPSET_V5=
CONNMARK=
XCONNMARK=
CONNMARK_MATCH=
@@ -1577,6 +1720,9 @@ determine_capabilities() {
FLOW_FILTER=
FWMARK_RT_MASK=
MARK_ANYWHERE=
HEADER_MATCH=
ACCOUNT_TARGET=
AUDIT_TARGET=
chain=fooX$$
@@ -1685,7 +1831,16 @@ determine_capabilities() {
if qt mywhich ipset; then
qt ipset -X $chain # Just in case something went wrong the last time
if qt ipset -N $chain iphash ; then
local have_ipset
if qt ipset -N $chain hash:ip family inet; then
IPSET_V5=Yes
have_ipset=Yes
elif qt ipset -N $chain iphash ; then
have_ipset=Yes
fi
if [ -n "$have_ipset" ]; then
if qt $IPTABLES -A $chain -m set --match-set $chain src -j ACCEPT; then
qt $IPTABLES -D $chain -m set --match-set $chain src -j ACCEPT
IPSET_MATCH=Yes
@@ -1715,6 +1870,8 @@ determine_capabilities() {
qt $IPTABLES -A $chain -j LOGMARK && LOGMARK_TARGET=Yes
qt $IPTABLES -A $chain -j LOG || LOG_TARGET=
qt $IPTABLES -A $chain -j MARK --set-mark 5 && MARK_ANYWHERE=Yes
qt $IPTABLES -A $chain -j ACCOUNT --addr 192.168.1.0/29 --tname $chain && ACCOUNT_TARGET=Yes
qt $IPTABLES -A $chain -j AUDIT --type drop && AUDIT_TARGET=Yes
qt $IPTABLES -F $chain
qt $IPTABLES -X $chain
@@ -1795,6 +1952,10 @@ report_capabilities() {
report_capability "FLOW Classifier" $FLOW_FILTER
report_capability "fwmark route mask" $FWMARK_RT_MASK
report_capability "Mark in any table" $MARK_ANYWHERE
report_capability "Header Match" $HEADER_MATCH
report_capability "ACCOUNT Target" $ACCOUNT_TARGET
report_capability "AUDIT Target" $AUDIT_TARGET
report_capability "ipset V5" $IPSET_V5
fi
[ -n "$PKTTYPE" ] || USEPKTTYPE=
@@ -1860,6 +2021,10 @@ report_capabilities1() {
report_capability1 FLOW_FILTER
report_capability1 FWMARK_RT_MASK
report_capability1 MARK_ANYWHERE
report_capability1 HEADER_MATCH
report_capability1 ACCOUNT_TARGET
report_capability1 AUDIT_TARGET
report_capability1 IPSET_V5
echo CAPVERSION=$SHOREWALL_CAPVERSION
echo KERNELVERSION=$KERNELVERSION

View File

@@ -34,6 +34,10 @@ get_script_version() { # $1 = script
local version
local ifs
local digits
local verbosity
verbosity="$VERBOSITY"
VERBOSITY=0
temp=$( $SHOREWALL_SHELL $1 version | sed 's/-.*//' )
@@ -54,6 +58,8 @@ get_script_version() { # $1 = script
fi
echo $version
VERBOSITY="$verbosity"
}
#
@@ -252,7 +258,7 @@ reload_kernel_modules() {
moduleloader=insmod
fi
[ -n "${MODULE_SUFFIX:=o gz ko o.gz ko.gz}" ]
[ -n "${MODULE_SUFFIX:=ko ko.gz o o.gz gz}" ]
[ -z "$MODULESDIR" ] && \
uname=$(uname -r) && \
@@ -514,7 +520,7 @@ find_file()
#
# Set the Shorewall state
#
set_state () # $1 = state $2
set_state () # $1 = state $2
{
if [ $# -gt 1 ]; then
echo "$1 ($(date)) from $2" > ${VARDIR}/state

View File

@@ -16,165 +16,24 @@
#
# Essential Modules
#
loadmodule nfnetlink
loadmodule x_tables
loadmodule ip_tables
loadmodule iptable_filter
loadmodule iptable_mangle
loadmodule ip_conntrack
loadmodule nf_conntrack
loadmodule nf_conntrack_ipv4
loadmodule iptable_nat
loadmodule xt_state
loadmodule xt_tcpudp
loadmodule ipt_LOG
INCLUDE modules.essential
#
# Other xtables modules
#
loadmodule xt_CLASSIFY
loadmodule xt_connmark
loadmodule xt_CONNMARK
loadmodule xt_conntrack
loadmodule xt_dccp
loadmodule xt_dscp
loadmodule xt_DSCP
loadmodule xt_hashlimit
loadmodule xt_helper
loadmodule xt_ipp2p
loadmodule xt_iprange
loadmodule xt_length
loadmodule xt_limit
loadmodule xt_mac
loadmodule xt_mark
loadmodule xt_MARK
loadmodule xt_multiport
loadmodule xt_NFLOG
loadmodule xt_NFQUEUE
loadmodule xt_owner
loadmodule xt_physdev
loadmodule xt_pkttype
loadmodule xt_tcpmss
loadmodule xt_IPMARK
loadmodule xt_TPROXY
INCLUDE modules.xtables
#
# Helpers
#
loadmodule ip_conntrack_amanda
loadmodule ip_conntrack_ftp
loadmodule ip_conntrack_h323
loadmodule ip_conntrack_irc
loadmodule ip_conntrack_netbios_ns
loadmodule ip_conntrack_pptp
loadmodule ip_conntrack_sip
loadmodule ip_conntrack_tftp
loadmodule ip_nat_amanda
loadmodule ip_nat_ftp
loadmodule ip_nat_h323
loadmodule ip_nat_irc
loadmodule ip_nat_pptp
loadmodule ip_nat_sip
loadmodule ip_nat_snmp_basic
loadmodule ip_nat_tftp
loadmodule ip_set
loadmodule ip_set_iphash
loadmodule ip_set_ipmap
loadmodule ip_set_macipmap
loadmodule ip_set_portmap
INCLUDE helpers
#
# Ipset
#
loadmodule ip_set
loadmodule ip_set_iphash
loadmodule ip_set_ipmap
loadmodule ip_set_ipporthash
loadmodule ip_set_iptree
loadmodule ip_set_iptreemap
loadmodule ip_set_macipmap
loadmodule ip_set_nethash
loadmodule ip_set_portmap
loadmodule ipt_SET
loadmodule ipt_set
#
# 2.6.20+ helpers
#
loadmodule nf_conntrack_ftp
loadmodule nf_conntrack_h323
loadmodule nf_conntrack_irc
loadmodule nf_conntrack_netbios_ns
loadmodule nf_conntrack_netlink
loadmodule nf_conntrack_pptp
loadmodule nf_conntrack_proto_gre
loadmodule nf_conntrack_proto_sctp
loadmodule nf_conntrack_sip
loadmodule nf_conntrack_tftp
loadmodule nf_conntrack_sane
loadmodule nf_nat_amanda
loadmodule nf_nat_ftp
loadmodule nf_nat_h323
loadmodule nf_nat_irc
loadmodule nf_nat
loadmodule nf_nat_pptp
loadmodule nf_nat_proto_gre
loadmodule nf_nat_sip
loadmodule nf_nat_snmp_basic
loadmodule nf_nat_tftp
INCLUDE modules.ipset
#
# Traffic Shaping
#
loadmodule sch_sfq
loadmodule sch_ingress
loadmodule sch_hfsc
loadmodule sch_htb
loadmodule cls_u32
loadmodule cls_fw
loadmodule cls_flow
loadmodule act_police
INCLUDE modules.tc
#
# Extensions
#
loadmodule ipt_addrtype
loadmodule ipt_ah
loadmodule ipt_CLASSIFY
loadmodule ipt_CLUSTERIP
loadmodule ipt_comment
loadmodule ipt_connmark
loadmodule ipt_CONNMARK
loadmodule ipt_conntrack
loadmodule ipt_dscp
loadmodule ipt_DSCP
loadmodule ipt_ecn
loadmodule ipt_ECN
loadmodule ipt_esp
loadmodule ipt_hashlimit
loadmodule ipt_helper
loadmodule ipt_ipp2p
loadmodule ipt_iprange
loadmodule ipt_length
loadmodule ipt_limit
loadmodule ipt_LOG
loadmodule ipt_mac
loadmodule ipt_mark
loadmodule ipt_MARK
loadmodule ipt_MASQUERADE
loadmodule ipt_multiport
loadmodule ipt_NETMAP
loadmodule ipt_NOTRACK
loadmodule ipt_owner
loadmodule ipt_physdev
loadmodule ipt_pkttype
loadmodule ipt_policy
loadmodule ipt_realm
loadmodule ipt_recent
loadmodule ipt_REDIRECT
loadmodule ipt_REJECT
loadmodule ipt_SAME
loadmodule ipt_sctp
loadmodule ipt_set
loadmodule ipt_state
loadmodule ipt_tcpmss
loadmodule ipt_TCPMSS
loadmodule ipt_tos
loadmodule ipt_TOS
loadmodule ipt_ttl
loadmodule ipt_TTL
loadmodule ipt_ULOG
INCLUDE modules.extensions

View File

@@ -0,0 +1,30 @@
#
# Shorewall version 4 - Essential Modules File
#
# /usr/share/shorewall/modules.essential
#
# This file loads the modules that may be needed by the firewall.
#
# THE ORDER OF THE COMMANDS BELOW IS IMPORTANT!!!!!! You MUST load in
# dependency order. i.e., if M2 depends on M1 then you must load M1
# before you load M2.
#
# If you need to modify this file, copy it to /etc/shorewall and modify the
# copy.
#
###############################################################################
#
# Essential Modules
#
loadmodule nfnetlink
loadmodule x_tables
loadmodule ip_tables
loadmodule iptable_filter
loadmodule iptable_mangle
loadmodule ip_conntrack
loadmodule nf_conntrack
loadmodule nf_conntrack_ipv4
loadmodule iptable_nat
loadmodule xt_state
loadmodule xt_tcpudp
loadmodule ipt_LOG

View File

@@ -0,0 +1,61 @@
#
# Shorewall version 4 - Extensions Modules File
#
# /usr/share/shorewall/modules.extensions
#
# This file loads the modules that may be needed by the firewall.
#
# THE ORDER OF THE COMMANDS BELOW IS IMPORTANT!!!!!! You MUST load in
# dependency order. i.e., if M2 depends on M1 then you must load M1
# before you load M2.
#
# If you need to modify this file, copy it to /etc/shorewall and modify the
# copy.
#
###############################################################################
loadmodule ipt_addrtype
loadmodule ipt_ah
loadmodule ipt_CLASSIFY
loadmodule ipt_CLUSTERIP
loadmodule ipt_comment
loadmodule ipt_connmark
loadmodule ipt_CONNMARK
loadmodule ipt_conntrack
loadmodule ipt_dscp
loadmodule ipt_DSCP
loadmodule ipt_ecn
loadmodule ipt_ECN
loadmodule ipt_esp
loadmodule ipt_hashlimit
loadmodule ipt_helper
loadmodule ipt_ipp2p
loadmodule ipt_iprange
loadmodule ipt_length
loadmodule ipt_limit
loadmodule ipt_LOG
loadmodule ipt_mac
loadmodule ipt_mark
loadmodule ipt_MARK
loadmodule ipt_MASQUERADE
loadmodule ipt_multiport
loadmodule ipt_NETMAP
loadmodule ipt_NOTRACK
loadmodule ipt_owner
loadmodule ipt_physdev
loadmodule ipt_pkttype
loadmodule ipt_policy
loadmodule ipt_realm
loadmodule ipt_recent
loadmodule ipt_REDIRECT
loadmodule ipt_REJECT
loadmodule ipt_SAME
loadmodule ipt_sctp
loadmodule ipt_set
loadmodule ipt_state
loadmodule ipt_tcpmss
loadmodule ipt_TCPMSS
loadmodule ipt_tos
loadmodule ipt_TOS
loadmodule ipt_ttl
loadmodule ipt_TTL
loadmodule ipt_ULOG

27
Shorewall/modules.ipset Normal file
View File

@@ -0,0 +1,27 @@
#
# Shorewall version 4 - IP Set Modules File
#
# /usr/share/shorewall/modules.ipset
#
# This file loads the modules that may be needed by the firewall.
#
# THE ORDER OF THE COMMANDS BELOW IS IMPORTANT!!!!!! You MUST load in
# dependency order. i.e., if M2 depends on M1 then you must load M1
# before you load M2.
#
# If you need to modify this file, copy it to /etc/shorewall and modify the
# copy.
#
###############################################################################
loadmodule xt_set
loadmodule ip_set
loadmodule ip_set_iphash
loadmodule ip_set_ipmap
loadmodule ip_set_ipporthash
loadmodule ip_set_iptree
loadmodule ip_set_iptreemap
loadmodule ip_set_macipmap
loadmodule ip_set_nethash
loadmodule ip_set_portmap
loadmodule ipt_SET
loadmodule ipt_set

25
Shorewall/modules.tc Normal file
View File

@@ -0,0 +1,25 @@
#
# Shorewall version 4 - Traffic Shaping Modules File
#
# /usr/share/shorewall/modules.tc
#
# This file loads the modules that may be needed by the firewall.
#
# THE ORDER OF THE COMMANDS BELOW IS IMPORTANT!!!!!! You MUST load in
# dependency order. i.e., if M2 depends on M1 then you must load M1
# before you load M2.
#
# If you need to modify this file, copy it to /etc/shorewall and modify the
# copy.
#
###############################################################################
loadmodule sch_sfq
loadmodule sch_ingress
loadmodule sch_hfsc
loadmodule sch_htb
loadmodule sch_prio
loadmodule sch_tbf
loadmodule cls_u32
loadmodule cls_fw
loadmodule cls_flow
loadmodule act_police

41
Shorewall/modules.xtables Normal file
View File

@@ -0,0 +1,41 @@
#
# Shorewall version 4 - Xtables Modules File
#
# /usr/share/shorewall/modules.xtables
#
# This file loads the modules that may be needed by the firewall.
#
# THE ORDER OF THE COMMANDS BELOW IS IMPORTANT!!!!!! You MUST load in
# dependency order. i.e., if M2 depends on M1 then you must load M1
# before you load M2.
#
# If you need to modify this file, copy it to /etc/shorewall and modify the
# copy.
#
###############################################################################
loadmodule xt_AUDIT
loadmodule xt_CLASSIFY
loadmodule xt_connmark
loadmodule xt_CONNMARK
loadmodule xt_conntrack
loadmodule xt_dccp
loadmodule xt_dscp
loadmodule xt_DSCP
loadmodule xt_hashlimit
loadmodule xt_helper
loadmodule xt_ipp2p
loadmodule xt_iprange
loadmodule xt_length
loadmodule xt_limit
loadmodule xt_mac
loadmodule xt_mark
loadmodule xt_MARK
loadmodule xt_multiport
loadmodule xt_NFLOG
loadmodule xt_NFQUEUE
loadmodule xt_owner
loadmodule xt_physdev
loadmodule xt_pkttype
loadmodule xt_tcpmss
loadmodule xt_IPMARK
loadmodule xt_TPROXY

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,8 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011 -
# Tom Eastep (teastep@shorewall.net)
#
# This file should be placed in /sbin/shorewall.
#
@@ -25,7 +26,7 @@
#
# For a list of supported commands, type 'shorewall help'
#
#####################################################################################################
################################################################################################
#
# Set the configuration variables from shorewall.conf
#
@@ -298,10 +299,26 @@ get_config() {
fi
;;
esac
case $LEGACY_FASTSTART in
Yes|yes)
;;
No|no)
LEGACY_FASTSTART=
;;
*)
if [ -n "$LEGACY_FASTSTART" ]; then
echo " ERROR: Invalid LEGACY_FASTSTART setting ($LEGACY_FASTSTART)" >&2
exit 1
fi
LEGACY_FASTSTART=Yes
;;
esac
}
#
# Fatal error
# Issue an error message and die
#
startup_error() {
echo " ERROR: $@" >&2
@@ -309,10 +326,36 @@ startup_error() {
exit 1
}
#
# Determine if there are config files newer than the passed object
#
uptodate() {
[ -f $1 ] || return 1
local dir
local ifs
ifs="$IFS"
IFS=':'
for dir in $CONFIG_PATH; do
if [ -n "$(find ${dir} -newer $1)" ]; then
IFS="$ifs"
return 1;
fi
done
IFS="$ifs"
return 0
}
#
# Run the compiler
#
compiler() {
local pc
pc=$g_libexec/shorewall/compiler.pl
if [ $(id -u) -ne 0 ]; then
if [ -z "$SHOREWALL_DIR" -o "$SHOREWALL_DIR" = /etc/shorewall ]; then
@@ -353,12 +396,9 @@ compiler() {
[ -n "$g_preview" ] && options="$options --preview"
[ "$g_debugging" = trace ] && options="$options --debug"
[ -n "$g_refreshchains" ] && options="$options --refresh=$g_refreshchains"
#
# Run the appropriate params file
#
set -a;
run_user_exit params
set +a
[ -n "$g_confess" ] && options="$options --confess"
[ -n "$g_update" ] && options="$options --update"
[ -n "$g_annotate" ] && options="$options --annotate"
if [ -n "$PERL" ]; then
if [ ! -x "$PERL" ]; then
@@ -369,7 +409,13 @@ compiler() {
PERL=/usr/bin/perl
fi
$PERL $debugflags /usr/share/shorewall/compiler.pl $options $@
if [ $g_perllib = ${g_libexec}/shorewall ]; then
$PERL $debugflags $pc $options $@
else
PERL5LIB=$g_perllib
export PERL5LIB
$PERL $debugflags $pc $options $@
fi
}
#
@@ -378,7 +424,7 @@ compiler() {
start_command() {
local finished
finished=0
local restorefile
local object
do_it() {
local rc
@@ -438,6 +484,10 @@ start_command() {
g_purge=Yes
option=${option%p}
;;
c*)
AUTOMAKE=
option=${option#c}
;;
*)
usage 1
;;
@@ -474,25 +524,19 @@ start_command() {
esac
if [ -n "${g_fast}${AUTOMAKE}" ]; then
if qt mywhich make; then
restorefile=$RESTOREFILE
if [ -z "$g_fast" ]; then
#
# Automake -- use the last compiled script
#
RESTOREFILE=firewall
fi
export RESTOREFILE
if ! make -qf ${CONFDIR}/Makefile; then
g_fast=
AUTOMAKE=
fi
RESTOREFILE=$restorefile
if [ -z "$g_fast" -o -z "$LEGACY_FASTSTART" ]; then
#
# Automake or LEGACY_FASTSTART=No -- use the last compiled script
#
object=firewall
else
#
# 'start -f' with LEGACY_FASTSTART=Yes -- use last saved configuration
#
object=$RESTOREFILE
fi
if ! uptodate ${VARDIR}/$object; then
g_fast=
AUTOMAKE=
fi
@@ -551,6 +595,10 @@ compile_command() {
g_debug=Yes;
option=${option#d}
;;
T*)
g_confess=Yes
option=${option#T}
;;
-)
finished=1
option=
@@ -633,9 +681,17 @@ check_command() {
option=${option#d}
;;
r*)
g_preview=Yes;
g_preview=Yes
option=${option#r}
;;
T*)
g_confess=Yes
option=${option#T}
;;
a*)
g_annotate=Yes
option=${option#a}
;;
*)
usage 1
;;
@@ -705,6 +761,10 @@ restart_command() {
g_fast=Yes
option=${option#f}
;;
c*)
AUTOMAKE=
option=${option#c}
;;
n*)
g_noroutes=Yes
option=${option#n}
@@ -753,15 +813,7 @@ restart_command() {
[ -n "$STARTUP_ENABLED" ] || fatal_error "Startup is disabled"
if [ -z "$g_fast" -a -n "$AUTOMAKE" ]; then
if qt mywhich make; then
#
# RESTOREFILE is exported by get_config()
#
restorefile=$RESTOREFILE
RESTOREFILE=firewall
make -qf ${CONFDIR}/Makefile && g_fast=Yes
RESTOREFILE=$restorefile
fi
uptodate ${VARDIR}/firewall && g_fast=Yes
fi
if [ -z "$g_fast" ]; then
@@ -827,6 +879,8 @@ refresh_command() {
g_refreshchains="$g_refreshchains,$1"
shift
done
else
g_refreshchains=:refresh:
fi
shorewall_is_started || fatal_error "Shorewall is not running"
@@ -853,6 +907,7 @@ refresh_command() {
safe_commands() {
local finished
finished=0
local command
# test is the shell supports timed read
read -t 0 junk 2> /dev/null
@@ -955,7 +1010,7 @@ safe_commands() {
[ -n "$nolock" ] || mutex_on
if ${VARDIR}/.$command $g_debugging $command; then
if run_it ${VARDIR}/.$command $g_debugging $command; then
echo -n "Do you want to accept the new firewall configuration? [y/n] "
@@ -963,9 +1018,9 @@ safe_commands() {
echo "New configuration has been accepted"
else
if [ "$command" = "restart" ]; then
${VARDIR}/.safe restore
run_it ${VARDIR}/.safe restore
else
${VARDIR}/.$command clear
run_it ${VARDIR}/.$command clear
fi
[ -n "$nolock" ] || mutex_off
@@ -1091,13 +1146,13 @@ try_command() {
[ -n "$nolock" ] || mutex_on
if ${VARDIR}/.$command $command && [ -n "$timeout" ]; then
if run_it ${VARDIR}/.$command $command && [ -n "$timeout" ]; then
sleep $timeout
if [ "$command" = "restart" ]; then
${VARDIR}/.try restore
run_it ${VARDIR}/.try restore
else
${VARDIR}/.$command clear
run_it ${VARDIR}/.$command clear
fi
fi
@@ -1141,6 +1196,8 @@ reload_command() # $* = original arguments less the command.
getcaps=
local root
root=root
local libexec
libexec=/usr/share
litedir=/var/lib/shorewall-lite
@@ -1201,6 +1258,19 @@ reload_command() # $* = original arguments less the command.
[ -n "$temp" ] && litedir="$temp"
temp=$(rsh_command /sbin/shorewall-lite show config 2> /dev/null | grep ^LIBEXEC | sed 's/LIBEXEC is //')
if [ -n "$temp" ]; then
case $temp in
/*)
libexec="$temp"
;;
*)
libexec=/usr/$temp
;;
esac
fi
if [ -z "$getcaps" ]; then
SHOREWALL_DIR=$(resolve_file $directory)
ensure_config_path
@@ -1208,16 +1278,21 @@ reload_command() # $* = original arguments less the command.
[ -f $capabilities ] || getcaps=Yes
fi
if [ -n "$getcaps" ]; then
if [ -f $directory/shorewall.conf ]; then
. $directory/shorewall.conf
ensure_config_path
if [ -f $directory/shorewall.conf ]; then
if [ -f $directory/params ]; then
. $directory/params
fi
. $directory/shorewall.conf
ensure_config_path
fi
if [ -n "$getcaps" ]; then
[ -n "$DONT_LOAD" ] && DONT_LOAD="$(echo $DONT_LOAD | tr ',' ' ')"
progress_message "Getting Capabilities on system $system..."
if ! rsh_command "MODULESDIR=$MODULESDIR MODULE_SUFFIX=\"$MODULE_SUFFIX\" IPTABLES=$IPTABLES DONT_LOAD=\"$DONT_LOAD\" /usr/share/shorewall-lite/shorecap" > $directory/capabilities; then
if ! rsh_command "MODULESDIR=$MODULESDIR MODULE_SUFFIX=\"$MODULE_SUFFIX\" IPTABLES=$IPTABLES DONT_LOAD=\"$DONT_LOAD\" $libexec/shorewall-lite/shorecap" > $directory/capabilities; then
fatal_error "ERROR: Capturing capabilities on system $system failed"
fi
fi
@@ -1334,7 +1409,7 @@ usage() # $1 = exit status
echo "where <command> is one of:"
echo " add <interface>[:<host-list>] ... <zone>"
echo " allow <address> ..."
echo " check [ -e ] [ -r ] [ <directory> ]"
echo " check [ -e ] [ -r ] [ -p ] [ -r ] [ -T ] [ <directory> ]"
echo " clear"
echo " compile [ -e ] [ -d ] [ <directory name> ] [ <path name> ]"
echo " delete <interface>[:<host-list>] ... <zone>"
@@ -1357,7 +1432,7 @@ usage() # $1 = exit status
echo " reject <address> ..."
echo " reload [ -s ] [ -c ] [ -r <root user> ] [ <directory> ] <system>"
echo " reset [ <chain> ... ]"
echo " restart [ -n ] [ -p ] [ -f ] [ <directory> ]"
echo " restart [ -n ] [ -p ] [-d] [ -f ] [ -c ][ <directory> ]"
echo " restore [ -n ] [ <file name> ]"
echo " save [ <file name> ]"
echo " show [ -x ] [ -t {filter|mangle|nat} ] [ {chain [<chain> [ <chain> ... ]"
@@ -1369,6 +1444,7 @@ usage() # $1 = exit status
echo " show dynamic <zone>"
echo " show filters"
echo " show ip"
echo " show ipa"
echo " show [ -m ] log [<regex>]"
echo " show macro <macro>"
echo " show macros"
@@ -1377,17 +1453,67 @@ usage() # $1 = exit status
echo " show tc [ device ]"
echo " show vardir"
echo " show zones"
echo " start [ -f ] [ -n ] [ -p ] [ <directory> ]"
echo " start [ -f ] [ -n ] [ -p ] [ -c ] [ <directory> ]"
echo " stop"
echo " status"
echo " try <directory> [ <timeout> ]"
echo " version [ -a ]"
echo " safe-start [ <directory> ]"
echo " safe-restart [ <directory> ]"
echo " update [ -e ] [ -d ] [ -p ] [ -r ] [ -T ] [ -a ] [ <directory> ]"
echo
exit $1
}
version_command() {
local finished
finished=0
local all
all=
local product
while [ $finished -eq 0 -a $# -gt 0 ]; do
option=$1
case $option in
-*)
option=${option#-}
while [ -n "$option" ]; do
case $option in
-)
finished=1
option=
;;
a*)
all=Yes
option=${option#a}
;;
*)
usage 1
;;
esac
done
shift
;;
*)
finished=1
;;
esac
done
[ $# -gt 0 ] && usage 1
echo $SHOREWALL_VERSION
if [ -n "$all" ]; then
for product in shorewall6 shorewall-lite shorewall6-lite shorewall-init; do
if [ -f /usr/share/$product/version ]; then
echo "$product: $(cat /usr/share/$product/version)"
fi
done
fi
}
#
# Execution begins here
#
@@ -1415,7 +1541,16 @@ g_verbose_offset=0
g_use_verbosity=
g_debug=
g_export=
g_refreshchains=
g_refreshchains=:none:
g_confess=
g_update=
g_annotate=
#
# Make sure that these variables are cleared
#
VERBOSE=
VERBOSITY=
finished=0
@@ -1512,55 +1647,6 @@ while [ $finished -eq 0 ]; do
esac
done
version_command() {
local finished
finished=0
local all
all=
local product
while [ $finished -eq 0 -a $# -gt 0 ]; do
option=$1
case $option in
-*)
option=${option#-}
while [ -n "$option" ]; do
case $option in
-)
finished=1
option=
;;
a*)
all=Yes
option=${option#a}
;;
*)
usage 1
;;
esac
done
shift
;;
*)
finished=1
;;
esac
done
[ $# -gt 0 ] && usage 1
echo $SHOREWALL_VERSION
if [ -n "$all" ]; then
for product in shorewall6 shorewall-lite shorewall6-lite shorewall-init; do
if [ -f /usr/share/$product/version ]; then
echo "$product: $(cat /usr/share/$product/version)"
fi
done
fi
}
if [ $# -eq 0 ]; then
usage 1
fi
@@ -1573,6 +1659,8 @@ CONFDIR=/etc/shorewall
g_product="Shorewall"
g_recovering=
g_timestamp=
g_libexec=/usr/share
g_perllib=/usr/share/shorewall
[ -f ${CONFDIR}/vardir ] && . ${CONFDIR}/vardir
@@ -1628,8 +1716,8 @@ case "$COMMAND" in
start_command $@
;;
stop|clear)
get_config
[ $# -ne 1 ] && usage 1
get_config
[ -x $g_firewall ] || fatal_error "Shorewall has never been started"
[ -n "$nolock" ] || mutex_on
run_it $g_firewall $g_debugging $COMMAND
@@ -1663,6 +1751,12 @@ case "$COMMAND" in
shift
check_command $@
;;
update)
get_config Yes
shift
g_update=Yes
check_command $@
;;
show|list)
get_config Yes No Yes
shift

View File

@@ -1,6 +1,6 @@
%define name shorewall
%define version 4.4.13
%define release 1
%define version 4.4.21
%define release 0base
Summary: Shoreline Firewall is an iptables-based firewall for Linux systems.
Name: %{name}
@@ -12,7 +12,7 @@ Group: Networking/Utilities
Source: %{name}-%{version}.tgz
URL: http://www.shorewall.net/
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRoot: %{_tmppath}/%{name}-%{version}-root1
Requires: iptables iproute perl
Provides: shoreline_firewall = %{version}-%{release}
Obsoletes: shorewall-common shorewall-perl shorewall-shell
@@ -84,19 +84,22 @@ fi
%attr(0644,root,root) /usr/share/shorewall/version
%attr(0644,root,root) /usr/share/shorewall/actions.std
%attr(0644,root,root) /usr/share/shorewall/action.Drop
%attr(0644,root,root) /usr/share/shorewall/action.A_Drop
%attr(0644,root,root) /usr/share/shorewall/action.Reject
%attr(0644,root,root) /usr/share/shorewall/action.A_Reject
%attr(0644,root,root) /usr/share/shorewall/action.template
%attr(- ,root,root) /usr/share/shorewall/functions
%attr(0644,root,root) /usr/share/shorewall/lib.base
%attr(0644,root,root) /usr/share/shorewall/lib.cli
%attr(0644,root,root) /usr/share/shorewall/lib.common
%attr(0644,root,root) /usr/share/shorewall/macro.*
%attr(0644,root,root) /usr/share/shorewall/modules
%attr(0644,root,root) /usr/share/shorewall/modules*
%attr(0644,root,root) /usr/share/shorewall/helpers
%attr(0644,root,root) /usr/share/shorewall/configpath
%attr(0755,root,root) /usr/share/shorewall/wait4ifup
%attr(755,root,root) /usr/share/shorewall/compiler.pl
%attr(755,root,root) /usr/share/shorewall/getparams
%attr(0644,root,root) /usr/share/shorewall/prog.*
%attr(0644,root,root) /usr/share/shorewall/Shorewall/*.pm
@@ -108,10 +111,114 @@ fi
%doc COPYING INSTALL changelog.txt releasenotes.txt Contrib/* Samples
%changelog
* Wed Sep 22 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.13-1
* Mon Sep 20 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.13-0base
* Wed Jul 06 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0base
* Mon Jul 04 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0RC3
* Sun Jul 03 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0RC2
* Thu Jun 23 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0RC1
* Sun Jun 19 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0Beta3
* Sat Jun 18 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0Beta2
* Tue Jun 07 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.21-0Beta1
* Mon Jun 06 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-1
* Tue May 31 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0base
* Fri May 27 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0RC1
* Tue May 24 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0Beta5
* Sun May 22 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0Beta4
* Thu May 19 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0Beta3
* Wed May 18 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0Beta2
* Fri Apr 15 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.20-0Beta1
* Wed Apr 13 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-1
* Sat Apr 09 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-0base
* Sun Apr 03 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-0RC1
* Sun Apr 03 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-0Beta5
* Sat Apr 02 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-0Beta4
* Sat Mar 26 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-0Beta3
* Sat Mar 05 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.19-0Beta1
* Wed Mar 02 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.18-0base
* Mon Feb 28 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.18-0RC1
* Sun Feb 20 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.18-0Beta4
* Sat Feb 19 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.18-0Beta3
* Sun Feb 13 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.18-0Beta2
* Sat Feb 05 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.18-0Beta1
* Fri Feb 04 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.17-0base
* Sun Jan 30 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.17-0RC1
* Fri Jan 28 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.17-0Beta3
* Wed Jan 19 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.17-0Beta2
* Sat Jan 08 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.17-0Beta1
* Mon Jan 03 2011 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0base
* Thu Dec 30 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0RC1
* Thu Dec 30 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta8
* Sun Dec 26 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta7
* Mon Dec 20 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta6
* Fri Dec 10 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta5
* Sat Dec 04 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta4
* Fri Dec 03 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta3
* Fri Dec 03 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta2
* Tue Nov 30 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.16-0Beta1
* Fri Nov 26 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.15-0base
* Mon Nov 22 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.15-0RC1
* Mon Nov 15 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.15-0Beta2
* Sun Nov 14 2010 Tom Eastep tom@shorewall.net
- Added getparams to installed files
* Sat Oct 30 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.15-0Beta1
* Sat Oct 23 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.14-0base
* Wed Oct 06 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.14-0RC1
* Fri Oct 01 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.14-0Beta4
* Sun Sep 26 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.14-0Beta3
* Thu Sep 23 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.14-0Beta2
* Tue Sep 21 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.14-0Beta1
* Fri Sep 17 2010 Tom Eastep tom@shorewall.net
- Updated to 4.4.13-0RC1
* Fri Sep 17 2010 Tom Eastep tom@shorewall.net

View File

@@ -4,7 +4,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 2000-2011 - Tom Eastep (teastep@shorewall.net)
#
# Shorewall documentation is available at http://www.shorewall.net
#
@@ -26,7 +26,7 @@
# You may only use this script to uninstall the version
# shown below. Simply run this script to remove Shorewall Firewall
VERSION=4.4.13.1
VERSION=4.4.21
usage() # $1 = exit status
{
@@ -72,6 +72,9 @@ else
VERSION=""
fi
[ -n "${LIBEXEC:=/usr/share}" ]
[ -n "${PERLLIB:=/usr/share/shorewall}" ]
echo "Uninstalling shorewall $VERSION"
if qt iptables -L shorewall -n && [ ! -f /sbin/shorewall-lite ]; then
@@ -85,7 +88,9 @@ else
fi
if [ -n "$FIREWALL" ]; then
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
if [ -x /usr/sbin/updaterc.d ]; then
updaterc.d shorewall remove
elif [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
insserv -r $FIREWALL
elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
chkconfig --del $(basename $FIREWALL)
@@ -104,6 +109,8 @@ rm -rf /etc/shorewall
rm -rf /etc/shorewall-*.bkout
rm -rf /var/lib/shorewall
rm -rf /var/lib/shorewall-*.bkout
rm -rf $PERLLIB}/Shorewall/*
rm -rf ${LIBEXEC}/shorewall
rm -rf /usr/share/shorewall
rm -rf /usr/share/shorewall-*.bkout
rm -rf /usr/share/man/man5/shorewall*

View File

@@ -2,7 +2,8 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

View File

@@ -17,7 +17,7 @@ SRWL=/sbin/shorewall6-lite
SRWL_OPTS="-tvv"
test -n ${INITLOG:=/var/log/shorewall6-lite-init.log}
[ "$INITLOG" eq "/dev/null" && SHOREWALL_INIT_SCRIPT=1 || SHOREWALL_INIT_SCRIPT=0
[ "$INITLOG" = "/dev/null" ] && SHOREWALL_INIT_SCRIPT=1 || SHOREWALL_INIT_SCRIPT=0
export SHOREWALL_INIT_SCRIPT

View File

@@ -4,7 +4,7 @@
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 2000-2011 - Tom Eastep (teastep@shorewall.net)
#
# Shorewall documentation is available at http://shorewall.net
#
@@ -22,7 +22,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
VERSION=4.4.13.1
VERSION=4.4.21
usage() # $1 = exit status
{
@@ -123,6 +123,16 @@ done
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
[ -n "${LIBEXEC:=/usr/share}" ]
case "$LIBEXEC" in
/*)
;;
*)
LIBEXEC=/usr/${LIBEXEC}
;;
esac
#
# Determine where to install the firewall script
#
@@ -187,6 +197,7 @@ else
rm -rf ${DESTDIR}/etc/shorewall6-lite
rm -rf ${DESTDIR}/usr/share/shorewall6-lite
rm -rf ${DESTDIR}/var/lib/shorewall6-lite
[ "$LIBEXEC" = /usr/share ] || rm -rf /usr/share/shorewall6-lite/wait4ifup /usr/share/shorewall6-lite/shorecap
fi
#
@@ -202,6 +213,8 @@ delete_file ${DESTDIR}/usr/share/shorewall6-lite/xmodules
install_file shorewall6-lite ${DESTDIR}/sbin/shorewall6-lite 0544
eval sed -i \'``s\|g_libexec=.\*\|g_libexec=$LIBEXEC\|\' ${DESTDIR}/sbin/shorewall6-lite
echo "Shorewall6 Lite control program installed in ${DESTDIR}/sbin/shorewall6-lite"
#
@@ -223,6 +236,7 @@ echo "Shorewall6 Lite script installed in ${DESTDIR}${DEST}/$INIT"
#
mkdir -p ${DESTDIR}/etc/shorewall6-lite
mkdir -p ${DESTDIR}/usr/share/shorewall6-lite
mkdir -p ${DESTDIR}${LIBEXEC}/shorewall6-lite
mkdir -p ${DESTDIR}/var/lib/shorewall6-lite
chmod 755 ${DESTDIR}/etc/shorewall6-lite
@@ -275,30 +289,41 @@ echo "Common functions linked through ${DESTDIR}/usr/share/shorewall6-lite/funct
# Install Shorecap
#
install_file shorecap ${DESTDIR}/usr/share/shorewall6-lite/shorecap 0755
install_file shorecap ${DESTDIR}${LIBEXEC}/shorewall6-lite/shorecap 0755
echo
echo "Capability file builder installed in ${DESTDIR}/usr/share/shorewall6-lite/shorecap"
echo "Capability file builder installed in ${DESTDIR}${LIBEXEC}/shorewall6-lite/shorecap"
#
# Install wait4ifup
#
if [ -f wait4ifup ]; then
install_file wait4ifup ${DESTDIR}/usr/share/shorewall6-lite/wait4ifup 0755
install_file wait4ifup ${DESTDIR}${LIBEXEC}/shorewall6-lite/wait4ifup 0755
echo
echo "wait4ifup installed in ${DESTDIR}/usr/share/shorewall6-lite/wait4ifup"
echo "wait4ifup installed in ${DESTDIR}${LIBEXEC}/shorewall6-lite/wait4ifup"
fi
#
# Install the Modules files
#
if [ -f modules ]; then
#
# Install the Modules file
#
run_install $OWNERSHIP -m 0600 modules ${DESTDIR}/usr/share/shorewall6-lite
echo "Modules file installed as ${DESTDIR}/usr/share/shorewall6-lite/modules"
fi
if [ -f helpers ]; then
run_install $OWNERSHIP -m 0600 helpers ${DESTDIR}/usr/share/shorewall6-lite
echo "Helper modules file installed as ${DESTDIR}/usr/share/shorewall6-lite/modules"
fi
for f in modules.*; do
run_install $OWNERSHIP -m 0644 $f ${DESTDIR}/usr/share/shorewall6-lite/$f
echo "Modules file $f installed as ${DESTDIR}/usr/share/shorewall6-lite/$f"
done
if [ -d manpages ]; then
#
# Install the Man Pages
@@ -351,11 +376,7 @@ if [ -z "$DESTDIR" ]; then
if [ -n "$DEBIAN" ]; then
run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall6-lite
if [ -x /sbin/insserv ]; then
insserv /etc/init.d/shorewall6-lite
else
ln -s ../init.d/shorewall6-lite /etc/rcS.d/S40shorewall6-lite
fi
update-rc.d shorewall6-lite defaults
echo "Shorewall6 Lite will start automatically at boot"
else

View File

@@ -1,10 +1,10 @@
#!/bin/sh
#
# Shorewall6 Lite Packet Filtering Firewall Control Program - V4.2
# Shorewall6 Lite Packet Filtering Firewall Control Program - V4.4
#
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
#
# (c) 2006,2007,2008,2009,2010 - Tom Eastep (teastep@shorewall.net)
# (c) 2006,2007,2008,2009,2010,2011 - Tom Eastep (teastep@shorewall.net)
#
# This file should be placed in /sbin/shorewall-lite.
#
@@ -94,9 +94,9 @@ get_config() {
[ -z "$LOGFILE" ] && LOGFILE=/var/log/messages
if ( ps ax 2> /dev/null | grep -v grep | qt grep 'syslogd.*-C' ) ; then
LOGREAD="logread | tac"
g_logread="logread | tac"
elif [ -r $LOGFILE ]; then
LOGREAD="tac $LOGFILE"
g_logread="tac $LOGFILE"
else
echo "LOGFILE ($LOGFILE) does not exist!" >&2
exit 2
@@ -113,10 +113,6 @@ get_config() {
[ -n "$FW" ] || FW=fw
[ -n "LOGFORMAT" ] && LOGFORMAT="${LOGFORMAT%%%*}"
[ -n "$LOGFORMAT" ] || LOGFORMAT="Shorewall:"
if [ -n "$IP6TABLES" ]; then
if [ ! -x "$IP6TABLES" ]; then
echo " ERROR: The program specified in IP6TABLES does not exist or is not executable" >&2
@@ -145,6 +141,12 @@ get_config() {
[ -n "$g_use_verbosity" ] && VERBOSITY=$g_use_verbosity || VERBOSITY=$(($g_verbose_offset + $VERBOSITY))
if [ $VERBOSITY -lt -1 ]; then
VERBOSITY=-1
elif [ $VERBOSITY -gt 2 ]; then
VERBOSITY=2
fi
g_hostname=$(hostname 2> /dev/null)
IP=$(mywhich ip 2> /dev/null)
@@ -174,6 +176,15 @@ verify_firewall_script() {
fi
}
#
# Fatal error
#
startup_error() {
echo " ERROR: $@" >&2
kill $$
exit 1
}
#
# Start Command Executor
#
@@ -447,6 +458,13 @@ g_noroutes=
g_timestamp=
g_recovering=
g_purge=
g_logread=
#
# Make sure that these variables are cleared
#
VERBOSE=
VERBOSITY=
finished=0
@@ -536,6 +554,7 @@ MUTEX_TIMEOUT=
SHAREDIR=/usr/share/shorewall6-lite
CONFDIR=/etc/shorewall6-lite
g_product="Shorewall6 Lite"
g_libexec=share
[ -f ${CONFDIR}/vardir ] && . ${CONFDIR}/vardir ]

View File

@@ -21,6 +21,7 @@
###############################################################################
# V E R B O S I T Y
###############################################################################
VERBOSITY=
###############################################################################
@@ -29,8 +30,6 @@ VERBOSITY=
LOGFILE=
LOGFORMAT=
###############################################################################
# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S
###############################################################################

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