1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-20 02:07:23 +01:00

476 Commits

Author SHA1 Message Date
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
Vadim Kurland
b089416403 * RoutingCompiler_ipt.cpp (addressRangesInDst::processNext): fixed
bug #2666971 "fwb_ipt crashes when Address Range object in routing
rule". Policy compiler for iptables crashed if Address Range
object was used in "Destination" of a routing rule.
2009-03-06 04:47:58 +00:00
Vadim Kurland
0ff42b7fff * RoutingCompiler_ipt_writers.cpp (PrintRule::processNext): fixed
bug #2540389: "Routing Broken from 2.1 to 3.0.3". Generated script
preserved default route when it deleted route entries before
installing new ones. This was different compared to the behavior
of the v2.1 where default was deleted together with other routing
entries. The reason for this change (made some time in summer of
2008) was that if user did not define default route in their
routing ruleset, the script would delete existing default without
installing new one, leaving firewall with no default route at all.
Now the script deletes default if there is new one to install and
preserves it otherwise.

* RoutingCompiler_ipt_writers.cpp (PrintRule::processNext): fixed
bug (no #): if generated firewall script detects an error from one
of the commands that install routing rules and runs function that
restores previous routing entries, it should also run epilog
commands.
2009-02-28 06:55:33 +00:00
Vadim Kurland
e099726bef * OSConfigurator_linux24.cpp: add empty line after user's code
in prolog and epilog shell functions to make sure shell syntax
        is not violated if user does not end prolog or epilog code
        with linefeed.
2009-02-06 00:58:01 +00:00
Vadim Kurland
c654b0b698 fixed bug #2568819 "generated script
created on windows is not executable".
2009-02-05 16:22:48 +00:00
Vadim Kurland
0516743140 bug #535146 2009-01-30 04:54:03 +00:00
Vadim Kurland
067cfb650e * objects_init.xml.in: Added CustomService object "ESTABLISHED
ipv6" which defines code for iptables, ipfw and IOS extended
access lists for IPv6.

* PolicyCompiler_ipfw_writers.cpp (PrintRule::_printProtocol):
fixed behavior or policy compiler for ipfw which was broken in
rev714 - it should print protocol "tcp" when custom service object
that adds option "established" is used. This compiler worked like
that before attribute "protocol" was added to the CustomService
object.
2009-01-25 06:35:06 +00:00
Vadim Kurland
f1dded95b3 2009-01-23 vadim <vadim@vk.crocodile.org>
* PolicyCompiler_PrintRule.cpp (PrintRule::_printAddr): fixed bug
#2526173: "fwb_ipt crashes due to old-broadcast". This bug was
introduced when support for module iprange was sadded. Need
special check for AddressRange objects where start and end of
range addresses are equal.

* NetworkDialog.cpp (NetworkDialog::addressEntered): fixed bug (no
#): the GUI used to check ip address entered for the network
object whenever user switched focus from the address input widget
in the network object dialog to another widget or even a different
application to look up the address. This caused the program to
show error dialog if this happened when the address was
incomplete. This change makes the program verify the address only
when user clicks "Apply".
2009-01-23 21:37:12 +00:00
Vadim Kurland
8bb882cccd 2009-01-05 vadim <vadim@vk.crocodile.org>
* RoutingCompiler_cisco.cpp (RoutingCompiler_cisco::compile):
fixed bug (no #): routing compiler for pix refused to add more
than one routing rule with an error saying that other rules were
duplicates. Error was introduced in build 732.
2009-01-06 03:56:35 +00:00
Vadim Kurland
5422511d63 added test/example for the case of inheritance of a common polict by firewalls that run different platforms 2009-01-04 20:15:45 +00:00
Vadim Kurland
743c601984 2009-01-02 vadim <vadim@vk.crocodile.org>
* RoutingCompiler_iosacl.cpp (RoutingCompiler_iosacl::compile):
Added support for generation of "ip route" commands for Cisco IOS.
Variant of Cisco IOS "ip route" command where gateway is the name
of one of the interfaces of the router is also supported. To get
this, put interface object in the "gateway" column of the routing
rule.

* pix.xml.in, RuleSetView.cpp: Routing ruleset view shows column
"interface" only for platforms that require it. Currently IOS does
not require it, while other platforms for which routing commands
generation is supported require it (iptables and PIX).
2009-01-02 08:26:24 +00:00
Vadim Kurland
e6010add12 only sending keepalive chars to unix firewalls; prperly setting installation status to "failure" if user refuses to accept firewall host ssh key 2009-01-02 00:53:35 +00:00
Vadim Kurland
bff50df97e bugfixes in routing compiler for pix 2009-01-02 00:19:01 +00:00
Vadim Kurland
56212319d6 2009-01-01 vadim <vadim@vk.crocodile.org>
* RoutingCompiler_pix.cpp: applied patch by Steven Mestdagh
<steven@openbsd.org> that adds support for static routing
configuration for PIX.
2009-01-01 20:55:43 +00:00
Vadim Kurland
31d4f59bef bug #2477775 2008-12-31 01:46:42 +00:00
Vadim Kurland
dde6bf116d added test case per question asked on the mailing list 2008-12-31 00:06:10 +00:00
Vadim Kurland
78a73c0e58 support for custom service in ios acl compiler 2008-12-28 22:58:55 +00:00
Vadim Kurland
1166213ef8 support for protocol in CustomService in compilers for ipf and ipfw 2008-12-28 21:06:00 +00:00
Vadim Kurland
53844b8060 checking for "proto ..." in the custom service code string before printing protocol in policy and nat compilers for pf" 2008-12-28 12:17:26 +00:00
Vadim Kurland
a720640ffe bugs 1111267, 2463048 2008-12-28 07:12:12 +00:00
Vadim Kurland
5ef36c5a52 2008-12-25 vadim <vadim@vk.crocodile.org>
* All policy compilers: using FWObjectDatabase::createClass
methods to create rules and other objects in compilers wherever
the type is known at the (code) compile time. This makes code
cleaner and speeds it up a little because of eliminated cast() and
string comparison.

* changes in libfbuilder: eliminated excessive use of dynamic_cast
and long chains of "if" comparing object type names in
FWObjectDatabase in methods that create new objects of given type.
2008-12-25 20:38:53 +00:00
Vadim Kurland
d720f16c7e test case for bug 2462927 2008-12-24 00:30:42 +00:00
Vadim Kurland
fdcce42e35 2008-12-23 vadim <vadim@vk.crocodile.org>
* PolicyCompiler_PrintRule.cpp (PrintRule::_printSrcAddr):
implemented feature req. #2353737 "use -m iprange". Using module
iprange for AddressRange objects if iptables version is set to
>=1.2.11.
2008-12-23 08:21:10 +00:00
Vadim Kurland
b62891ba69 * SSHSession.cpp (SSHSession::heartBeat): built-in installer
periodically "pings" the other end to keep ssh session alive. This
helps recreate state in the firewall state table if it is cleared
when rules are reloaded, which in turn prevents installer from
hanging.
2008-12-22 05:10:11 +00:00
Vadim Kurland
742f0b6791 test for compined ruleset for pf 2008-12-16 05:18:21 +00:00
Vadim Kurland
1037ff3b0a properly using IP6TABLES in NAT rules 2008-12-16 05:15:07 +00:00
Vadim Kurland
1ac206288e 2008-12-15 vadim <vadim@vk.crocodile.org>
* ipt.cpp, ipfw.cpp, pf.cpp, iosacl.cpp: changes for FR #2431602:
support for rulesets configured as "dual address family", that is,
rulesets that should be compiled for both ipv4 and ipv6.

* RuleSetDialog.cpp (RuleSetDialog::applyChanges): implemented
feature request #2431602: "Feature request: Unified
policies (IPv4/v6)". RuleSet object now has two variables that
define which address family it should be compiled for - ipv4 or
ipv6. It is possible to have both set, in which case the same
ruleset will be compiled for both address families.
2008-12-16 05:03:50 +00:00
Vadim Kurland
4cb259c543 2008-12-08 Vadim Kurland <vadim@vk.crocodile.org>
* RuleSetView.cpp (RuleSetView::contextMenu): fixed bug #2407141
"label markers". Color label text set in Preferences was not used
in the contet menus where user can actually apply those colors to
rules.
2008-12-09 03:40:40 +00:00
Vadim Kurland
0572a9850f * ipt.cpp (dumpScript): fixed bug 2356131 "Iptables-restore option
broken for multiple policy sets". If firewall was configured to
use iptables-restore to activate policy and if it had two or more
policy rule sets, compiler used to put "echo COMMIT" line at the
bottom of each ruleset. This was incorrect, iptables-restore
expects only one COMMIT line at the end of each table.
2008-11-28 18:05:31 +00:00
Vadim Kurland
21b6cf5084 2008-11-20 vadim <vadim@vk.crocodile.org>
* PolicyCompiler_PrintRule.cpp (PrintRule::_printLogPrefix): fixed
bug #2318639: "bug in logging (rule number)". Added logging prefix
macro %R that gets expanded to the ruleset name. This can be
useful in logging prefixes for rules in branch rulesets.

;
2008-11-21 06:40:07 +00:00
Vadim Kurland
0cbf11fa16 2008-11-17 Vadim Kurland <vadim@vk.crocodile.org>
* ObjectManipulator.cpp (ObjectManipulator::duplicateObject): fix
bug #2303486: "Operation of duplicating firewall should switch
policy". When firewall object is duplicated, the GUI should
automatically open policy of the new object rather than keep
policy of the original open. At the same time, reset lastModified,
lastCompiled, lastInstalled of the new firewall instead of keeping
copies from the original.

* instDialog.cpp (instDialog::testFirewall): Check to make sure
paths to ssh and scp utilities are properly configured in
Preferences before running install. Show aprropriate error dialog
to the user if path to ssh or scp is not configured.
2008-11-17 16:45:14 +00:00
Vadim Kurland
88a6dadf4b icmpv6 test rules 2008-10-29 02:28:37 +00:00
Vadim Kurland
ef3ba6527d * PolicyCompiler_ipt.cpp (isChainDescendantOfOutput): more for the
bug #2186568 "Again User service - group/negate". Support for
groups of user service with negation. Now have a framework to keep
track of chain "descendants", so that compiler can tell if some
chain can be traced back to INPUT or OUTPUT through the sequence
of chains calling each other.
2008-10-24 02:22:46 +00:00
Vadim Kurland
e130f68d2e * various dialogs: fixed bug #2187094: "fwbuilder does not use
system colors for text boxes".  Some dialogs would not properly
pick up KDE theme. This was especially visible if theme used dark
background colors and white font, in which case many input fields
in dialogs would use white text on white background.

* PolicyCompiler_ipt.cpp (separateUserServices::processNext):
fixed bug #2186568 "Again User service - group/negate".  Compiler
for iptables did not support groups and negation of the
UserService objects.
2008-10-23 04:51:36 +00:00
Vadim Kurland
d022671ddf * dns.cpp (list): (change in libfwbuilder) getHostByName() used to
insert duplicate IP addresses into the list of the results. Now
making sure ip addresses in the result are unique.
2008-10-21 03:21:32 +00:00
Vadim Kurland
483dab7051 * Compiler.cpp (Compiler::_expand_addr_recursive): change in the
algorithm used to decide which interfaces of the host or firewall
object to use in a rule when this host or firewall object is found
in source or destination.
2008-10-21 02:49:41 +00:00
Vadim Kurland
e3dc662a00 test case for rule in mangle-only ruleset with action Accept and direction Outbound 2008-10-20 02:44:42 +00:00
Vadim Kurland
2095091b80 * PolicyCompiler_PrintRule.cpp (PrintRule::_printTimeInterval):
fixed bug #2180556: "broken support for the "old" time module for
iptables". Compiler generated incorrect parameters for the "time"
module for versions <1.4.0
2008-10-19 20:05:38 +00:00
Vadim Kurland
ef3931f4da * PolicyCompiler_ipt.cpp (singleDstNegation::processNext): fixed
bug (no #): policy compiler for iptables did not handle correctly
rules where a host that has multiple addresses was a single object
in a rule element and had negation.

* NATCompiler_ipt.cpp (singleObjectNegation::processNext): added
support for single object negation in OSrc and ODst in NAT rules.
This provides for more compact iptables script in the often used
case where single object is used with negation in these elements
of a NAT rule. Other improvements in handling NAT rules with
negation.
2008-10-18 18:45:02 +00:00