1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-22 19:27:13 +01:00

535 Commits

Author SHA1 Message Date
Vadim Kurland
24416b751a removed test objects for secuwall 2012-03-18 21:32:32 -07:00
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
739edc8c35 fixes #2674 NAT compiler for PF crashed when AttachedNetworks
object was used in Translated Source of a NAT rule.
2011-11-30 18:43:18 -08:00
Vadim Kurland
8e2fabca2c fixed SF bug #3443609 Return of ID: 3059893": iptables "--set" option
deprecated".  Need to use --match-set instead of --set if iptables
version is >= 1.4.4. The fix done for #3059893 was only in the policy
compiler but needs to be done in both policy and nat compilers.
2011-11-28 13:43:17 -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
e681556c0f see #2671, #2672
group and addresses table object names" is in effect. This happened if
the same user-defined group was used in multiple rules or different
rule element of the same rule. In this case generated PF table would
have several copies of the same addresses.

not work right when the same object is used in several different
groups. If the same object was a member of multiple groups and these
groups were used in the same or different rules of the same PF
firewall, compiler used all groups in all rules.
2011-11-21 17:55:53 -08:00
Vadim Kurland
f5759fa905 SF bug #3439613. physdev module does not allow --physdev-out for
non-bridged traffic anymore. We should add --physdev-is-bridged to
make sure this matches only bridged packets.
2011-11-21 12:16:59 -08:00
Vadim Kurland
734069f16f see #2667
fixed bug (no number) introduced when I was working on #2667.
Setting broadcast address in the network object with netmask /31
to 255.255.255.255 broke rule shadowing algorithm.
2011-11-16 10:47: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
0ba45e6569 fixed SF bug 3435004: "Empty lines in comment result in "Incomplete
Command" in IOS".
2011-11-08 08:42:56 -08:00
Vadim Kurland
5aabf164a6 reset test files for iptables 2011-10-19 17:53:44 -07:00
Vadim Kurland
68cc6c1332 see #2662 "Crash when compiling ASA rule with IP range". Need to split
address range if it is used in "source" of a rule that controls
telnet, ssh or http to the firewall itself and firewall's version is
>= 8.3.
2011-10-19 17:49:36 -07:00
Vadim Kurland
680d23d824 reset pix test files to v5.0.1.3581 2011-10-19 16:52:21 -07:00
Vadim Kurland
f1153c4dc6 fixes SF bug #3414382 "Segfault in fwb_ipt dealing with empty
groups". Compiler for iptables used to crash when an empty group
was used in the "Interface" column of a policy rule.
2011-09-29 13:46:41 -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
7a614b0908 see #2638 "When CARP password is empty the advskew value is not
read". Should skip "pass <word>" parameter of the ifconfig command
that creates carp interface if user did not set up any password.
2011-08-11 16:55:08 -07:00
Vadim Kurland
de1e3698a7 see #2639 "support for vlan subinterfaces of bridge interfaces (e.g.
br0.5)". Currently fwbuilder can not generate script to configure vlan
subinterfaces of bridge interfaces, however if user did not request
this configuration script to be generated, compiler should not abort
when it encounters this combination.
2011-08-11 16:35:50 -07:00
Vadim Kurland
6e0654aaa6 see #2636 "carp : Incorrect output in rc.conf.local format". Should
use create_args_carp0 instead of ifconfig_carp0 to set up CARP
interface vhid, pass and adskew parameters.
2011-08-08 15:35:25 -07:00
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