1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-20 18:27:16 +01:00

242 Commits

Author SHA1 Message Date
Vadim Kurland
8c4fd89855 upgraded large_policy_test.fwb, added test case for branch rules and Classify 2011-05-16 14:09:36 -07:00
Vadim Kurland
d2e74f445d minor tweak for the test - added "catch all" rule in ipv6 branch to make sure it compiles for ipv6 2011-05-15 12:04:24 -07:00
Vadim Kurland
1199fd926a see #2405 "Tag and classify actions dont work properly with branches".
When branching rule points to a rule set that has rules with Tag and
Classify options, branching should occur in mangle table even when
checkbox "create branch in mangle table" is not checked. The fix in
this change is tentative as it creates branch in chains PREROUTING,
POSTROUTING and OUTPUT. Since target CLASSIFY is only allowed in
POSTROUTING, this may create conflict. Need to test more.
2011-05-14 15:46:23 -07:00
Vadim Kurland
c8cc37a6f1 see #1580 re-ran tests 2011-05-14 15:45:10 -07:00
Vadim Kurland
6f9add86c3 * PolicyCompiler_ipt.cpp (processNext): see #2402 "Tag action
should be done in PREROUTING so it can be acted on later". If a
rule has both tagging and classification options, the rule should
be split so that iptables command doing tagging goes in PREROUTING
and rule doing classification goes into POSTROUTING chain.
;
2011-05-13 18:21:56 -07:00
Vadim Kurland
a787f35fd0 see #2401 "Deprecating
Route option for iptables"
2011-05-13 16:14:34 -07:00
Vadim Kurland
2b67a0a491 see #2399, #2340 rules that require tagging, classification or routing are now split so that regular actions such as Accept are implemented using normal rules in the table "filter" and rules in table "mangle" only implement tagging, classification and routing. See ChangeLog for longer description 2011-05-13 13:06:42 -07:00
Vadim Kurland
7ef3e583e5 see #2367 added test cases for options tag, classify and route and combinations - test object firewall111 2011-05-10 14:57:12 -07:00
Vadim Kurland
38540cec7c merge from development 4.2.1.3540 2011-05-09 17:08:17 -07:00
Vadim Kurland
61929176e1 see #2367 no need to split iptables rules with option route because it is terminating by default; checking platform in xslt transformation to dtd21 to correctly set action 2011-05-06 18:11:52 -07:00
Vadim Kurland
7f2dbe58e9 See #2367 upgraded all test files to the latest dtd v21 2011-05-06 16:07:55 -07:00
Vadim Kurland
51774a5bf5 re-ran tests, checking in updated test files 2011-05-05 20:31:41 -07:00
Vadim Kurland
8773642198 see #2367 merge from development 2011-05-05 19:16:47 -07:00
Vadim Kurland
e24a73a560 see #2385 "PF action Classify uses
wrong parameter". This change fixes a bug introduced in 4.2.0
that affects rules with action Classify in PF firewalls.
2011-05-05 18:50:32 -07:00
Vadim Kurland
7232a2195b see #2385 bumped XML DTD version to 21 to make room for the transformation to fix bug #2385. That will be done in branch development 2011-05-05 12:01:18 -07:00
Vadim Kurland
c096684c20 see #2367 merged latest changes from development branch; this merged transformation for v18->v19 XML file upgrades; upgraded test files for PF 2011-05-04 16:44:08 -07:00
Vadim Kurland
49e65c2775 see #2367 upgraded unit test files and made sure tests pass. Some chain names have changed after this change but overall script structure has improved. Still need to add more tests for various combinations of Classify, Tag and Route options with different actions 2011-05-03 20:43:38 -07:00
Vadim Kurland
9ba2dc42ee * RoutingCompiler_ipt.cpp (compile): see #2359 "Crash when
compiling single rule with IPv6 destination and IPv4 gateway or
interface". Routing compiler for iptables does not support ipv6 at
this time and will issue a warning when user tries to place ipv6
address or network in a routing rule. The warning does not appear
when ipv6 address is a member of a group used in the rule. Also
see #1575.
2011-04-19 14:18:33 -07:00
Vadim Kurland
d64b12221a * PolicyCompiler_PrintRule.cpp (_printTarget): see #2235 "Modified
rule action for Continue". Rules with action "Continue" should
translate into iptables commands without "-j TARGET" parameter. If
such rule also has logging enabled, it should use target "-j LOG"
instead of generating additional chain.
2011-04-11 19:35:42 -07:00
Vadim Kurland
aa4c661395 * utils.cpp (expand_interface_with_phys_address): see #2324 "NAT +
MAC-matching rules not generated properly". Iptables NAT rules
matching a group of host objects with both IP and MAC addresses each
in "Original Source" were not generated properly.
2011-04-10 18:58:29 -07:00
Vadim Kurland
f366e2dc66 * PolicyCompiler_PrintRule.cpp (_printOptionalGlobalRules): SF bug
3178186 "Add ND/NS allow rules for the FORWARD chain". Rules that are
added automatically to ipv6 Linux firewall to permit neighbor discovery
packets should be also added to the FORWARD chain if the firewall is
a bridge.

see #2323
2011-04-10 17:58:32 -07:00
Vadim Kurland
f46bd98736 updated unit test file 2011-03-13 00:06:35 -08:00
Vadim Kurland
0aa3eac4d4 * Compiler.cpp (expandGroupsInRuleElement): sorting objects in the
rule element by name after group is expanded, this helps ensure
stable ordering of objects in generated configuration.

* Compiler.cpp (replaceClusterInterfaceInItfRE::processNext):
sorting objects in rule element after cluster interfaces have been
replaced, this helps ensure stable ordering of objects in generated
configuration.

* FWObject.h (FWObjectNameCmpPredicate): moved this class from
gui-specific module to libfwbuilder as it is universally useful.
It can compare FWObject objects by name and can optionally can
follow references; it can be used with std::sort() to sort lists
of FWObject pointers or directly sort rule elements.
2011-03-12 19:50:24 -08:00
Vadim Kurland
fd5eb7d8ce see #2220 AutomaticRules classes for ipt and pf 2011-03-12 15:52:09 -08:00
Vadim Kurland
7ebdc6c238 see #2207, #2209, fixes #2213 all objects created by compilers are placed in persistent_objects library; CompilerDriver creates and manages persistent_objects lib; changes in libfwbuilder - an object can be a child of only one parent in the tree, method FWObject::add() enforces this and FWObject::findDuplicateLinks() can be used to find objects with multiple parents 2011-03-11 10:11:42 -08:00
Vadim Kurland
a1111b83bd * PolicyCompiler.cpp (checkForShadowing): see #2204 "Shadowing
detected for rule with action Continue". Policy rules with action
"Continue" should not shadow other rules and can not be shadowed.
2011-03-08 19:02:19 -08:00
Vadim Kurland
2717d09f7e see #2170 checking combination of -i and -o interface and chain 2011-03-06 19:57:45 -08:00
Vadim Kurland
7e312722dc added test case for a group of hosts with mac addresses in a nat rule (SF bug should be opened later); re-ran tests 2011-02-27 22:37:16 -08:00
Vadim Kurland
e84751e95c see #2008 compiler avoids INPUT/OUTPUT chain if interface in the rule column "Interface" is a bridge port and firewall is bridging firewall (which means we are going to use --physdev-in or --physdev-out option for this rule) 2011-02-21 17:06:43 -08:00
Vadim Kurland
56f81407f1 fixes #2124 some error messages get multiplied when compiler splits rules 2011-02-20 21:32:58 -08:00
Vadim Kurland
2b342aa67d see #2057 detection of loops in branching rules ; see #2124 some error messages appeared multiple times in generated script 2011-02-20 20:12:18 -08:00
Vadim Kurland
344010c873 see #1920 Setting host interface to unnumbered after it has been assigned IP address doesnt have desired effect 2011-02-20 18:11:16 -08:00
Vadim Kurland
f817ddfe24 see #133 test case for SF feature request 1954286 2011-02-20 17:34:36 -08:00
Vadim Kurland
6f5f1ac075 fixes #153 Deprecate Rule::getInterfaceStr() fixes #2123 deprecate rule processor convertInterfaceIdToStr 2011-02-20 17:27:24 -08:00
Vadim Kurland
aea53d35eb see #2116 "When CARP interface IP address cant be assigned error or warning should appear". Script should abort if command trying to add an ip address to an interface fails 2011-02-19 15:33:30 -08:00
Vadim Kurland
3a871d5f06 getting rid of sprintf where I can 2011-02-18 22:25:52 -08:00
Vadim Kurland
2542b082f3 see #153 #2097 got rid of getInterfaceStr and getInterfaceId in policy and nat compilers for iptables 2011-02-18 18:48:16 -08:00
Vadim Kurland
faece9e40c see #2097 more test cases with negation and vlan interfaces 2011-02-17 18:39:17 -08:00
Vadim Kurland
581ccdc68e see #2097 #133 additional test cases 2011-02-17 18:01:45 -08:00
Vadim Kurland
6f30bc3446 * NATCompiler_ipt.cpp (processNext): see #2097 #133 "support for
inbound and outbound interface columns in iptables NAT
rules". This also addresses SF feature requests 1954286 "DNAT with
interface as condition not possible" and 621023 "manipulating
interface in NAT rule".
2011-02-17 17:48:04 -08:00
Vadim Kurland
d0ae7bac01 * NATCompiler_ipt.cpp (processNext): see #2097 #133 "support for
inbound and outbound interface columns in iptables NAT
rules". This also addresses SF feature requests 1954286 "DNAT with
interface as condition not possible" and 621023 "manipulating
interface in NAT rule".
2011-02-17 17:47:42 -08:00
Vadim Kurland
cf17bb995c see #2097 showing "interface" columns in iptables NAT ruels 2011-02-17 15:27:37 -08:00
Vadim Kurland
4d9abebb64 new build, reran tests for ipt 2011-02-15 14:29:43 -08:00
Vadim Kurland
35749e782c fixes #1999 using tool "command" to make sure utilities we need are available and can be accessed either by full path or using PATH env variable; this includes logger as requested in the ticket 2011-02-10 14:53:44 -08:00
Vadim Kurland
8d97c4ab6e fixes SF bug 3102044 "Colon in (runtime) Address Table name" 2011-02-10 12:12:26 -08:00
Vadim Kurland
8459b6e061 see #2023 refactoring determineOutputFileNames() 2011-02-03 15:44:24 -08:00
Vadim Kurland
58ed0f4df2 re-ran tests 2011-02-03 10:06:20 -08:00
Vadim Kurland
2995ee37f5 re-ran tests 2011-02-03 10:03:49 -08:00
Vadim Kurland
78e177f759 see #1890 re-ran tests 2011-01-31 18:38:08 -08:00
Vadim Kurland
d331ee7840 fixes #1966 IOSACL: object-group can get name that consists of only suffix 2011-01-24 18:28:48 -08:00