1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-22 11:17:31 +01:00

119 Commits

Author SHA1 Message Date
Vadim Kurland
4d4ae0b63e fixes #1080 2010-01-13 23:00:21 +00:00
Vadim Kurland
f6e1886d4f * PolicyCompiler_PrintRuleIptRst.cpp (PrintRuleIptRst::_printRuleLabel):
really fixed #869 "compile rule" should also print the comment.
Printing rule comment in the compiler output in the single rule
compile mode when firewall object is configured to use
iptables-restore. Code that prints rule label and comment has been
unified for compilers for all firewall platforms.
2010-01-13 21:21:07 +00:00
Vadim Kurland
3b3a4678e4 * NATCompiler_ipt.cpp (AssignInterface::processNext): fixed bug
#1064: "Dedicated IPv6 interfaces show up in IPv4-NAT rules". Use
interface only if it has addresses that match address family we
compile for.

fixes #1064
2010-01-08 19:32:20 +00:00
Vadim Kurland
ffe230a9c2 speed up policy compile (changes in libfwbuilder:r499) 2009-12-24 22:22:22 +00:00
Vadim Kurland
37db19faf9 fixes #939 Add backup ssh access rule to the "stop" section of generated iptables script. Now with dialog control to make this optional 2009-12-18 23:44:58 +00:00
Vadim Kurland
986bddd400 fixes #876 2009-12-15 22:08:26 +00:00
Vadim Kurland
493d22fd1c 2009-12-14 vadim <vadim@vk.crocodile.org>
* src/res/configlets/linux24/automatic_rules: Generation of the
automatic rules (matching ESTABLISHED and INVALID states,
backup ssh access and others) now uses configlet. Fixes #883

* src/res/configlets/linux24/automatic_rules: generated script can
now include automatic rules to match IPv6 neighbor discovery ICMP6
packets. This is controlled by a checkbox in the iptables
"advanced" settings dialog and is off by default. Fixes #878
2009-12-15 00:15:58 +00:00
Vadim Kurland
301d037988 see #803 take user name for the batch install from the dialog, overriding the name set in the fw object settings 2009-12-07 23:25:10 +00:00
Vadim Kurland
5001ba1d92 fixes #802 2009-12-07 21:12:26 +00:00
Vadim Kurland
ecfeec779b fixes #475 Added check for address a.b.c.d/0 in libfwbuilder and test for it in tets/ipt/ 2009-12-04 19:06:25 +00:00
Vadim Kurland
6934331544 fixes #97 2009-12-04 18:23:28 +00:00
Vadim Kurland
488a50251e fixes #651 Shell functions that read ip addresses of interfaces moved to configlet run_time_wrappers; using shell loops in generated script since now we read all ipv4 and ipv6 addresses of dynamic interfaces 2009-12-02 04:27:09 +00:00
Vadim Kurland
005507969c fixes #712 (ipt_mangle_only_rulesets option converted) fixes #713 2009-11-26 02:37:38 +00:00
Vadim Kurland
1572ef1fdb fixes #709 RuleSetDialog gets option "mangle_only_rule_set" from RuleSetOptions object 2009-11-25 23:35:35 +00:00
Vadim Kurland
011ca8ca27 fixes #603 added command line switch -xc to compilers 2009-11-13 17:53:49 +00:00
Vadim Kurland
b03edc79ef fixes #602 move method CompilerDriver_ipt::processStateSyncGroups to the base class CompilerDriver 2009-11-11 14:29:17 +00:00
Vadim Kurland
cdc45a911e supprot for router-alert ip option in fwb_ipt; minor reformatting; test for the IPService object with DSCP bits matching and ip options matching at the same time 2009-11-08 21:28:47 +00:00
Vadim Kurland
02e767f799 support for IPService with "any options" attribute. Fixes #563 2009-11-04 19:14:38 +00:00
Vadim Kurland
f8142047d7 2009-11-03 Vadim Kurland <vadim@vk.crocodile.org>
* NATCompiler_ipt.cpp (dynamicInterfaceInTSrc::processNext):
Implemented feature request #2829661: "SNAT instead of MASQUERADE
on dynamic interfaces". NAT rule options dialog now has a checkbox
that makes compiler use SNAT target instead of MASQUERADING when
checked when TSrc has dynamic interface. Apparently MASQ target
has problems when iptables NAT is used in combination with policy
routing. Using SNAT with a variable that gets interface address
solves the problem. By default this option is off, that is
compiler uses MASQUERADE target when TSrc has dynamic interface.
Fixes #560
2009-11-03 17:21:00 +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
7d672c2169 Support for NAT branching for iptables; see #84 2009-10-20 19:31:55 +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
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
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
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
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
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
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
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
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