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

511 Commits

Author SHA1 Message Date
Vadim Kurland
1fd2ac3a95 fixes #2590 "PF: NAT compiler fails when run-time address table object
is used in a rule"
2011-07-21 14:22:40 -07:00
Vadim Kurland
a47d102c30 fixed SF bug 3371301 "Error compiling with VLAN and
masquerade". Iptables NAT rules with vlan interface configured as
"dynamic" and no ip address in Translated Source caused compiler
crash.
2011-07-19 19:07:56 -07:00
Vadim Kurland
0790bb8509 see #2513 "Group and Address Table name persistence in generated
config". Compiler for PF can now preserve names of object groups,
dynamic groups, compile-time AddressTable and compile-time DNSName
objects in the generated pf.conf file. This is optional and is
controlled by a checkbox in the firewall settings dialog.
2011-07-11 18:43:29 -07:00
Vadim Kurland
bde7cd1043 clear option "prolog_place" in compiler for iosacl to make sure function CompilerDriver::assembleFwScriptInternal() does not get confused if user switched fw platform 2011-07-06 18:06:11 -07:00
Vadim Kurland
0f7f4ed790 added right test files and re-ran tests for PF 2011-07-05 18:06:35 -07:00
Vadim Kurland
021cadf062 better behavior of FWObjectTypedChildIterator::operator--(); deleted test file that should have been recycled but wasnt 2011-07-05 18:00:48 -07:00
Vadim Kurland
531c5a83fe PolicyCompiler_pf_writers.cpp (processNext): see #2549 "Update
generated route-to configuration for PF versions 4.7 and later",
SF bug 3348931. The "route-to" parameter moved to the end of
pass rules in PF 4.7
2011-07-05 14:00:35 -07:00
Vadim Kurland
93883953b5 upgraded .fwb files in all unit tests; fixed GroupObjectDialogTest 2011-07-01 13:02:00 -07:00
Vadim Kurland
510e6897dd upgraded test files 2011-06-22 15:28:48 -07:00
Vadim Kurland
344a22feed see #2524 'avoid " {tcp udp icmp} " in place of protocol'. NAT
compiler for PF does not need to generate protocol match "proto {tcp
udp icmp}" when service object used in the NAT rule is "any". The
reason this was done this way is lost in the mist of time; it's been
like this since very early versions of fwbuilder.
2011-06-22 11:03:07 -07:00
Vadim Kurland
3a2041d16d per Mikes request, the GUI now opens rule set object of the firewall
when user opens the firewall or any of its children objects in the
editor. This includes any rule set, interface or any other child
object.

Also moved function Interface::getParentHost() from class Interface to
class Host as static FWObject* Host::getParentHost(FWObject *o). Its
behavior is now more logical, it returns non-NULL pointer only if an
object actually has a parent that is host, firewall or cluster. Old
function Interface::getParentHost() returned non-NULL pointer even
when object was not in the proper position in the tree.

Now this function can be used to get parent host/firewall/cluster for
any child object rather than only interface.

I had to fix bunch of problems in unit tests that got uncovered because
new function behaves in a more strict way (returns NULL when there is
no parent of correct type).
2011-06-05 21:38:46 -07:00
Vadim Kurland
33259ebf81 see #2460 added test for the nat rule with multiple objects in TDst; looks like it works 2011-06-03 19:10:40 -07:00
Vadim Kurland
6a9fdbf3af NATCompiler_pf.cpp (_expand_addr): see #2455 NAT Compiler for PF
should use "(interface)" syntax to the right of "->" in NAT rules.
This now works for all interfaces, including those that have ip
addresses in fwbuilder configuration, when interface object appears in
"Translated Source" in a nat rule. When firewall object appears in
"Translated Source", it gets replaced with a set of its interfaces
which also get translated into "-> (interface)".
2011-06-03 18:59:44 -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
f9f78fe7bd using "port 1000:*" in PF nat commands 2011-05-30 21:59:40 -07:00
Vadim Kurland
ca77bbb51c re-ran tests for iptables 2011-05-26 14:29:14 -07:00
Vadim Kurland
a544492ced see #2434 "PF compiler should use 'self' keyword where
appropriate". Compiler for PF now uses keyword 'self' in rules
where firewall object is used in Source or Destination.
2011-05-26 14:13:26 -07:00
Vadim Kurland
29bf29f892 see #2394 grammar clean-up; creating policy rules in the right ruleset and renumbering rule set in the end 2011-05-26 12:06:50 -07:00
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
1c5fbb98a5 fixed xslt script dtd20 -> dtd21 to handle pf_classify_terminating properly 2011-05-06 15:10:48 -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
15fca061ec fixed bug (no #): "clear" commands were not added when option "generate only access-list, access-group, nat, static..." was in effect; also making sure "clear" commands for object-groups and ssh are not added when option "do not add clear commands" is on 2011-04-20 10:45:20 -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
db80629918 see #2264 added test case for the "short" script format 2011-04-15 12:49:07 -07:00
Vadim Kurland
0a50274c28 see #2295 added FWSM version 3.2 2011-04-14 16:34:38 -07:00
Vadim Kurland
9fd0a00218 see #2347 attach temporary acl to all interfaces 2011-04-14 16:06:21 -07:00
Vadim Kurland
59f40e5d71 * PolicyCompiler_pix.cpp (printPreambleCommands): see #2347 "FWSM
move up the "access-list mode auto-commit" command". Command that
configures access list commit mode should be issued before any
commands that clear and configure access lists. Also in this
change moving commands that set up temporary access list to the
top of the script.
2011-04-14 12:11:15 -07:00
Vadim Kurland
3c0554c003 * PolicyCompiler_pix.cpp (printClearCommands): see #2322 If this
is FWSM and if manual commit mode is used, need to commit after
clearing ACLs before we clear object groups.
2011-04-14 11:47:05 -07:00
Vadim Kurland
457fcd1660 see #2344 disabled ntp configuraton when host os is FWSM 2011-04-13 17:24:55 -07:00
Vadim Kurland
aa6be186da see #2345 updated test files 2011-04-13 17:11:43 -07:00
Vadim Kurland
0e303fe444 see #2343 updated unit tests 2011-04-13 15:42:51 -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
126b561e32 * PolicyCompiler_cisco.cpp (processNext): see #2308 "ASA rules
with service set to "http" and destination set to asa firewall
object should generate different command syntax". Policy rules
that have firewall object in Destination and http object in
Service now generate "http" commands. This is similar to how
fwbuilder generates "ssh", "telnet" and "icmp" commands to permit
corresponding services to the firewall itself.
2011-04-08 18:08:56 -07:00