1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-21 18:57:14 +01:00

264 Commits

Author SHA1 Message Date
Vadim Kurland
255f420f6c test files upgrade and some formatting for code style 2009-11-02 14:44:20 +00:00
Vadim Kurland
2310dad6ff 2009-11-01 Vadim Kurland <vadim@vk.crocodile.org>
* CompilerDriver_pf.cpp (CompilerDriver_pf::printStaticOptions):
Added support for PF configuration parameter "set state-policy"
which can have values "if-bound" or "floating". The GUI input
element provides these options in addition to the default empty
option. If empty list item is selected, command "set state-policy"
is not added to the generated .conf file at all. Fixes #423
2009-11-01 17:50:34 +00:00
Vadim Kurland
3215817bf8 fixes #539: ALL TCP and AL UDP objects should shadow any TCP/UDP service below 2009-10-22 21:07:04 +00:00
Vadim Kurland
b5eff7ec40 detect cluster interfaces in NAT rules and process accordingly 2009-10-22 19:48:43 +00:00
Vadim Kurland
f78806dcf8 . Added PF versions 4.0-4.2 and >4.3 to the list. Using keywords nat-anchor and rdr-anchor if PF version is <4.3. Refs #84 2009-10-21 00:49:39 +00:00
Vadim Kurland
a47cd5c817 Support for branching NAT rules for PF. Refs #84 2009-10-21 00:14:22 +00:00
Vadim Kurland
7d672c2169 Support for NAT branching for iptables; see #84 2009-10-20 19:31:55 +00:00
Vadim Kurland
68c8b0aa93 fixes #512 2009-10-15 22:17:19 +00:00
Vadim Kurland
4fc1735694 fixes #353, #355, #356 Using configlets to generate .fw script for pf, ipfilter and ipfw 2009-10-09 18:23:54 +00:00
Vadim Kurland
fd621eefc3 tests for routing rules with clusters 2009-09-25 21:06:42 +00:00
Vadim Kurland
23ee2d9531 merge from v3_1_merge 2009-09-23 17:00:48 +00:00
Vadim Kurland
b97470d09e 2009-09-18 vadim <vadim@vk.crocodile.org>
* PolicyCompiler.cpp (ItfNegation::processNext): fix for bug
#2710034 "PF Compiler in 3.0.3 Unprotected Interface Bug". When we
expand "interface" rule element which uses negation, skip
unprotected interfaces.
2009-09-18 18:02:56 +00:00
Vadim Kurland
5d1ca8d171 * instDialog_ui_ops.cpp (instDialog::addToLog): fixed bug #2847263
"Batch compiling incrementally slow". The time it took to add a
log line to the progress window in the "Compile" dialog slowed
down a lot as amount of text in QTextEditor increased.
2009-08-31 01:12:48 +00:00
Vadim Kurland
5aaea155ec 2009-08-12 vadim <vadim@vk.crocodile.org>
* NATCompiler_ipt.cpp (splitSDNATRule::processNext): fixed bug
#2836321: "SNAT rule that changes Trans Src and Trans Port does
not work". Dual translation rule that changes source address and
destination port was not supported.
2009-08-12 17:51:41 +00:00
Vadim Kurland
213d270623 * PolicyCompiler_pf_writers.cpp (PrintRule::processNext): For bug
#2835193: "Modulate state doesnt work for PF". Check variable
"modulate state" in rule optiopns and global firewall options. If
checkbox is turned on in the firewall options, then we always use
"modulate state". This option can also be turned on for an
individual rule using rule options dialog.

* pfAdvancedDialog.cpp (pfAdvancedDialog::pfAdvancedDialog): Fixed
bug #2835193: "Modulate state doesnt work for PF".  The name Xml
attribute used to hold the value of "module state" option was
entered incorrectly in the dialog.
2009-08-10 22:33:16 +00:00
Vadim Kurland
674589476e 2009-07-19 vadim <vadim@vk.crocodile.org>
* PolicyCompiler_ipt.cpp (specialCaseWithFWInDstAndOutbound::processNext):
fixed bug #2823951: "unnecessary rules in FORWARD chain". Policy
rules that have interface object in "Interface" column and
direction "Both" generate unnecessary iptables commands in the
FORWARD chain when destination matches one of the addresses that
belong to the firewall.
2009-07-19 19:17:42 +00:00
Vadim Kurland
664c564037 * PolicyCompiler_ipt_optimizer.cpp (optimizeForMinusIOPlus::processNext):
fixed bug #2822098: "IPT: adds useless "-i +" iin some cases".
Added optimization to remove redundant "-i +" and "-o +" if
chain is INPUT or OUTPUT.
2009-07-16 00:30:12 +00:00
Vadim Kurland
baba332a12 test examples for bug 2822098 2009-07-15 22:39:11 +00:00
Vadim Kurland
1f29579740 added comments to rules per bug #2822098 2009-07-15 20:56:21 +00:00
Vadim Kurland
92abc2b58e * PolicyCompiler_ipt.cpp (singleItfNegation::processNext): fixed
bug #2819901: "sub-optimal expansion of negated interface". Policy
rules with single interface object in "interface" rule element
with negation should generate iptables commands using "-i ! itf"
or "-o ! itf" rather than multiply the rule using all other
interfaces of the firewall. Note that for iptables v1.4.3 and
later, extrapositioned syntax is used, such as "! -i itf".
2009-07-14 23:59:02 +00:00
Vadim Kurland
ef15df93fc * PolicyCompiler_PrintRule.cpp, NATCompiler_PrintRule.cpp: fixed
bug #2821050: "loading new fw rules on iptables 1.4.3.2+ gives
warnings". starting with v1.4.3.1 iptables started giving warnings
when negation ("!")  is used after --option. This fix adds version
"1.4.3" to the list of recognized iptables versions in fwbuilder
and makes compiler generate extrapositioned version of the option
such as "!  --option arg".
2009-07-14 21:26:34 +00:00
Vadim Kurland
8ae2ef2d9c * iptAdvancedDialog.cpp (iptAdvancedDialog::iptAdvancedDialog):
fixed bug #2820840: "IPT: prolog script+iptables-restore silent
incompatibility". With this fix the GUI does not allow for the
prolog script to be placed after policy reset if iptables-restore
is used to activate iptables rules. Also policy compiler for
iptables checks for this condition and aborts with an error
message if prolog place is set to "after reset" but
iptables-restore is used to activate policy. Configuration may end
up with this combination of options if user set prolog place to
"after reset" first and switched activation method to
iptables-restore later.
2009-07-13 23:14:55 +00:00
Vadim Kurland
a08e47cc69 * ACL.cpp (ciscoACL::addRemark): fixed bug #1778536 "IOSACL -
remark command". Remarks now include rule comments; if comment
consists of several lines, each line is added using separate
remark statement. This works for both IOS ACL and PIX platforms.
2009-07-13 15:45:49 +00:00
Vadim Kurland
251aaddd54 started 3.0.6
2009-07-11  vadim  <vadim@vk.crocodile.org>

* AddressRange.h (libfwbuilder): fixed bug #2820152: "Address
ranges and other such need IPv4/v6 typing". AddressRange object
should be recognized and removed from the rule if it is used in
ipv6 rule set. To do this, add virtual method
hasInetAddress() (should return true) to indicate that this object
has an address. This works since virtual method getAddressPtr()
has been implemented anyway.
2009-07-12 02:03:46 +00:00
Vadim Kurland
405aa3d937 more test cases for bug #2820152 2009-07-12 00:02:51 +00:00
Vadim Kurland
f2428e7962 test case for bug #2820152 2009-07-11 22:39:00 +00:00
Vadim Kurland
a8393d34d7 2009-06-11 vadim <vadim@vk.crocodile.org>
* PolicyCompiler_iosacl_writers.cpp (PrintRule::_printRule):
implemented feature request #1778536: "IOSACL - remark command".
This adds support for the "remark" command in generated IOS
ACL configuration. Controlled by the checkbox "Add ACL remarks"
in the "Script" tab of the firewall object settings dialog.
2009-06-11 20:17:10 +00:00
Vadim Kurland
f9eb5e1a8c 2009-06-09 vadim <vadim@vk.crocodile.org>
* NATCompiler_pf_writers.cpp (PrintRule::_printSrcPort): fixed bug
#2803702 "NAT rule with source port range in TSrv is broken for
PF".  NAT rules matching source port ranges and translating source
port ranges should be possible.

* NATCompiler.cpp (classifyNATRule::processNext): (change in
libfwbuilder) fixed bug #2803689 "NAT rule matching dport but
chaning sport is broken".  NAT rules that match destination port
but translate source port should be possible (and the opposite
too).
2009-06-09 22:36:41 +00:00
Vadim Kurland
37cb4e4afa 2009-06-08 vadim <vadim@vk.crocodile.org>
* NATCompiler_ipt.cpp (splitSDNATRule::processNext): Improved
support for NAT rules that translate both source and destination:
now a rule like this can translate both source and destination
addresses and at the same time source and destination port ranges.
Compiler generates two iptables commands, one with SNAT and
another with DNAT translation for a rule like this.
2009-06-08 20:03:24 +00:00
Vadim Kurland
71ca455795 2009-06-08 vadim <vadim@vk.crocodile.org>
* NATCompiler_PrintRule.cpp (PrintRule::processNext): Added
support for SNAT rules that translate only source port of udp or
tcp packets. This rule generate "-j SNAT --to-source :<port>"
with no address part.


;
2009-06-08 17:04:53 +00:00
Vadim Kurland
34be1c5f47 2009-06-06 vadim <vadim@vk.crocodile.org>
* PolicyCompiler_pf.cpp (PolicyCompiler_pf::compile): fixed
bug (no #): compiler for PF did not remove rules using IPv4
objects while compiling policy set to be "combined IPv4 and IPv6"
for IPv6 and vice versa. As the result, it used to double some
rules because the would appear both in IPv4 and IPv6 sections of
generated .conf file.
2009-06-06 20:19:10 +00:00
Vadim Kurland
0815275873 2009-06-05 vadim <vadim@vk.crocodile.org>
* PolicyCompiler_PrintRule.cpp (PrintRule::_printIP): fixed bug
#2801548 "fwb_ipt should issue error for ipsrv with options for
ipv6". Since IP options lsrr, ssrr, rr do not exist in ipv6,
compiler should refuse to compile rules that request matching
these options.

* PolicyCompiler_iosacl_writers.cpp (PrintRule::_printIPServiceOptions):
fixed bug #2801547 "fwb_iosacl should issue an error for ipservice
with options". IOS access lists can not match source routing
options set in IPService object, compiler should issue an error
and abort processing when an object like this is encountered in a
rule.

* IPServiceDialog.cpp (IPServiceDialog::loadFWObject): fixed bug
#2801545 "IP Service object: lsrr, ssrr, rr options not saved".

* PolicyCompiler_pf_writers.cpp (PrintRule::_printDstService):
fixed bug #2801544 "missing space after tos option in pf config"
2009-06-05 16:58:28 +00:00
Vadim Kurland
68103fe615 2009-05-27 vadim <vadim@vk.crocodile.org>
* RCSFilePreview.cpp (RCSViewItem::operator<): implemented feature
req. #2796238 "3.0.4 - FEAT REQ: Sort order for RCSFilePreview".
RCS file preview dialog (the one that shows RCS revisions and RCS
log records) can display revisions in the tree or list view style,
controlled by radio-buttons. Style setting is saved in user
preferences and persists from session to session. In both cases
the view can be sorted by revision number or data. Sort column
choice is also saved in preferences. By default program sorts by
date and selects the latest revision.

* ObjectManipulator.cpp (ObjectManipulator::actuallyPasteTo):
fixed bug (no #): the GUI did not allow to copy/paste an address
from one interface to another. This should be possible.
2009-05-27 20:40:51 +00:00
Vadim Kurland
0a191e2fdd 2009-05-27 vadim <vadim@vk.crocodile.org>
* PolicyCompiler_pf_writers.cpp (PrintRule::_printAddr): fixed
bug (no #): policy compiler for pf crashed when dynamic interface
was used in source or destination of a policy rule.

* ObjectManipulator.cpp (ObjectManipulator::contextMenuRequested):
fixed bug #2793144 "Context menu item for the new User Service
object is missing".
2009-05-27 16:37:35 +00:00
Vadim Kurland
c46b23de3a sending guid with update check 2009-05-27 06:03:41 +00:00
Vadim Kurland
b4d1dd35fa 2009-05-16 vadim <vadim@vk.crocodile.org>
* PolicyCompiler_ipt.cpp (checkInterfaceAgainstAddressFamily::processNext):
fixed bug #2792888: "interface with only v4 address is used in v6
rules". Compiler should drop rule if it is associate with an
interface that does not have address that belongs to the address
family declared for the rule set. If interface has only ipv4
address, it will never see ipv6 packets and therefore rules that
have this interface in the "interface" rule element should not be
included in the output generated for the ipv6 or combined
ipv4+ipv6 rule sets.
2009-05-17 05:54:30 +00:00
Vadim Kurland
444dfb5bb2 2009-05-14 vadim <vadim@vk.crocodile.org>
* PolicyCompiler_pf.cpp (fillDirection::processNext): fixed bug
#2791950 "no way to generate "pass out" rule with no interface".
Compiler created two rules "pass out" and "pass in" for rules with
no interface and direction "in" or "out". It should create one
rule with direction defined by the rule in the GUI.
2009-05-14 21:54:42 +00:00
Vadim Kurland
b5b705e22f added test case for ip range 2009-04-24 15:14:37 +00:00
Vadim Kurland
6ee8a05881 test case for NAT 2009-04-23 03:57:04 +00:00
Vadim Kurland
4f49df2ea4 2009-04-10 vadim <vadim@vk.crocodile.org>
* ipt.cpp (dumpScript): fixed bug #2356131: "Iptables-restore
option broken for multiple policy sets". Compiler inserted
redundant line "echo COMMIT" to the iptables script if
iptables-restore was used and there were no rules in the mangle
table.
2009-04-11 00:53:50 +00:00
Vadim Kurland
896fbc723a pf example for ssh access to fw. per email support request 2009-04-09 23:05:27 +00:00
Vadim Kurland
c18f9a88da 2009-03-24 vadim <vadim@vk.crocodile.org>
* DialogData.cpp (DialogData::loadToWidget): fixed bug #2710309:
"Bug in gui/DialogData.cpp when not using mapping.". There was a
bug in DialogData.cpp that when setting the value of a combobox
and not using a mapping array the requested value would not be
selected. Applied patch provided by Tom Judge ( tomjudge )

* platforms.cpp (init_platforms): fixed bug #2710300 "Bug in
gui/platforms.cpp". there was a discrepancy between the list of
route-to options for PF and UI elements.
2009-03-25 04:43:16 +00:00
Vadim Kurland
f6d1b5b38d 2009-03-24 vadim <vadim@vk.crocodile.org>
* PolicyCompiler_pf_writers.cpp (PrintRule::_printAction): Added
support for anchor names with "/*" suffix for PF. Now the user can
create policy ruleset with name e.g. "ftp-proxy/*" and then set up
branching rule pointing to this ruleset. This ruleset is treated
by the program in a special way. First, it allows characters "/"
and "*" in the name of the ruleset (but only for PF firewalls).
Second, compiler does not create a .conf file with rules from this
ruleset, assuming that it will be controlled by external program
such as ftp-proxy. See man page ftp-proxy(8) for examples.
2009-03-24 07:31:48 +00:00
Vadim Kurland
932b4d2d34 2009-03-23 vadim <vadim@vk.crocodile.org>
* pf.cpp (main): fixed bug (no #): compiler for pf added code
provided in the "prolog" section while option was set to "add
after table definitions" in the incorrect place.
2009-03-24 04:42:54 +00:00
Vadim Kurland
908af65de5 2009-03-19 vadim <vadim@vk.crocodile.org>
* iosacl.cpp (safetyNetInstall): fixed bug #2694146: "IPv6
temporary ACL blocks ICMPv6". Temporary ipv6 access list created
for the "safety net install" should permit icmp.
2009-03-19 14:42:35 +00:00
Vadim Kurland
4ac2dd549b * iosacl.cpp (safetyNetInstall): fixed bug (no #): when "safety
net install" option is used, temporary access list must be
generated only once even when firewall object has multiple
rulesets.



;
2009-03-19 05:03:02 +00:00
Vadim Kurland
0732f536ee 2009-03-18 vadim <vadim@vk.crocodile.org>
* PolicyCompiler_iosacl.cpp (PolicyCompiler_iosacl::prolog): fixed
bug (no #): temporary access list created for IOS when option
"safety net install" is used and ipv6 address is provided should
use keyword "host" if provided address does not specify netmask.


* fwbedit: properly saving data file after "checktree" operation
2009-03-19 04:40:55 +00:00
Vadim Kurland
db7b0961bf test case for iosacl using ccie4u router setup 2009-03-16 05:13:07 +00:00
Vadim Kurland
3ac34b8c2d 2009-03-12 vadim <vadim@vk.crocodile.org>
* PolicyCompiler_iosacl.cpp (PolicyCompiler_iosacl::prolog): fixed
few bugs (no #) in policy compiler for Cisco IPv6 ACLs:

  - The "extended" keyword is not supported by IOS for IPv6 ACLs

  - keyword "established" is only valid in combination with
protocol tcp. If standard CustomService objects "ESTABLISHED" and
"ESTABLISHED ipv6" are used in a rule, enforce protocol to "tcp".

  - command to clear ipv6 access lists should be "no ipv6
access-list ipv6_management_in"

  - command to assign ipv6 acl to interface should be "ipv6
traffic-filter ipv6_acl in"
2009-03-13 05:04:54 +00:00
Vadim Kurland
58f4b70da1 2009-03-11 vadim <vadim@vk.crocodile.org>
* RuleSetView.cpp (RuleSetView::createGroup): fixed bug (no #): if
user selected some rules that belonged to a group and few other
rules that did not belong to any group at the same time and used
context menu to place all these rules in a new group, the GUI used
to crash.

;
2009-03-12 04:50:00 +00:00