1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-05-02 07:07:32 +02:00

51 Commits

Author SHA1 Message Date
Vadim Kurland
3520002f56 merged previous changes, updated release notes 5.0.2 2012-03-18 21:21:30 -07:00
Vadim Kurland
0e9b904d1d fixes #2686 "automatic rules for heartbeat are not generated for
vlan subinterfaces"

fixes #2685 "Clicking "Manage Members" in a vlan subinterface of a
cluster causes crash".
2012-03-18 20:43:01 -07:00
Vadim Kurland
c5ca42940f fixes SF bug 3489096, Shell code that restores old static routing
table entries in case of an error with commands adding new routing
entries was broken and left the machine with no routes at all.

Also, using mktemp to create temporary directory. If mktemp is not
available, fall back onto less secure but guaranteed to work method
where I generate randomized the name of the temporary directory using
process ID.
2012-02-20 14:18:10 -08:00
Vadim Kurland
ca17dccfcc updated test cases 2012-02-20 11:55:46 -08:00
Vadim Kurland
24d8a8db3f fixed SF bug #3468358 "change in rule-compilation between 5.0.0 and
5.0.1". Rule with cluster interface in "Destination" should compile
into matching ip addresses assigned to the cluster interface object
and corresponding member firewall's interface object, but in v5.0.1 it
only matched member interface address. This bug triggered when
iptables version was set to 1.2.11 or greater. This was a regression
from v5.0.0
2012-01-02 16:55:25 -08:00
Vadim Kurland
c26cadeb6a more fixes for SF bug #3439613. Adding "-i" / "-o" clause to match
parent bridge interface. This allows us to correctly match which
bridge the packet comes through in configurations using wildcard
bridge port interfaces. For example, when br0 and br1 have "vnet+"
bridge port interface, iptables can still correctly match which bridge
the packet went through using "-o br0" or "-o br1" clause. This can be
useful in installations with many bridged interfaces that get created
and destroyed dynamically, e.g.  with virtual machines. Note that the
"-i br0" / "-o br0" clause is only added when there is more than one
bridge interface and bridge port name ends with a wild card symbol "+"
2011-11-28 12:27:21 -08:00
Vadim Kurland
99498dc90b fixes #2664 Update error message when "which" command fails. Generated
iptables script uses "which" to check if all utilities it uses exist
on the machine.  We should also check if "which" itself exists and
issue meaningful error message if not.
2011-11-10 12:06:08 -08:00
Vadim Kurland
76da9f905f fixes #2670. Per RFC3021 network with netmask /31 has no network and
direct broadcast addresses. When interface of the firewall is
configured with netmask /31, policy compilers should not treat the
second address of this "subnet" as a broadcast.
2011-11-08 18:40:09 -08:00
Vadim Kurland
bd39f7b6bd fixes #2663 "Rule with "old-broadcast" object results in invalid
iptables INPUT chain".  Compiler was choosing chain INPUT with
direction "outbound" for rules that had old broadcast address in
"Source", this lead to invalid iptables configuration with chain INPUT
and "-o eth0" interface match clause.

fixed bug in the rule processor that replaces AddressRange object that
represents single address with an IPv4 object. Also eliminated code
redundancy.
2011-11-08 18:11:03 -08:00
Vadim Kurland
5aabf164a6 reset test files for iptables 2011-10-19 17:53:44 -07:00
Vadim Kurland
25efaa6a91 fixes #2650 "rules with address range that includes firewall address
in Src are placed in OUTPUT chain even though addresses that do not
match the firewall should go in FORWARD"
2011-08-25 13:56:03 -07:00
Vadim Kurland
15bab71f49 * NATCompiler_ipt.cpp (compile): see #2456 Added support for
single object negation in "Inbound Interface" and "Outbound
Interface" columns in compiler for iptables.

* NATCompiler_pf.cpp (compile): see #2456 Added support for single
object negation in "Interface" rule element of PF NAT rules. Now
compiler can produce PF commands such as "nat on ! em0 ... " (for
PF <4.7) or "match on ! em0 ..." (for PF >= 4.7)

* Compiler.cpp (singleObjectNegation::processNext): moved rule
processor that processes single object negation in any rule
element to the base class Compiler.
2011-06-03 17:54:14 -07:00
Vadim Kurland
ca77bbb51c re-ran tests for iptables 2011-05-26 14:29:14 -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
51774a5bf5 re-ran tests, checking in updated test files 2011-05-05 20:31:41 -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
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
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
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
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
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
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
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
Vadim Kurland
15f8ba513c fixes #1956 rule processor NATCompiler_ipt::splitServices is redundant 2011-01-18 14:44:53 -08:00
Vadim Kurland
104a1bc287 using common rule processor separateSrcAndDstPort instead of the one specifically implemented only for iptables; Added Makefile to ipt test files in order to be able to run tests in parallel 2011-01-17 19:26:30 -08:00
Vadim Kurland
24ac2b56ac fixed #1905, #1879 2011-01-10 16:43:43 -08:00
Vadim Kurland
83646b91fa minor refactoring in NATCompiler::ExpandMultipleAddresses::processNext to include SDNAT rules; rerun tests 2011-01-07 13:27:37 -08:00
Vadim Kurland
00127aac9f fixes #1892 move rule processor class separateServiceObject to PolicyCompiler 2011-01-04 12:00:09 -08:00
Vadim Kurland
d3bfdcf0f7 removed {{$build}} from top_comment configlets since we do not have build number variable anymore 2011-01-03 13:23:17 -08:00