1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-19 01:37:17 +01:00

164 Commits

Author SHA1 Message Date
Vadim Kurland
d0ae7bac01 * NATCompiler_ipt.cpp (processNext): see #2097 #133 "support for
inbound and outbound interface columns in iptables NAT
rules". This also addresses SF feature requests 1954286 "DNAT with
interface as condition not possible" and 621023 "manipulating
interface in NAT rule".
2011-02-17 17:47:42 -08:00
Vadim Kurland
cf17bb995c see #2097 showing "interface" columns in iptables NAT ruels 2011-02-17 15:27:37 -08:00
Vadim Kurland
8d97c4ab6e fixes SF bug 3102044 "Colon in (runtime) Address Table name" 2011-02-10 12:12:26 -08:00
Vadim Kurland
d9641e730f fixed #1856 "Pemit - in Linux interface names". OpenWRT uses
name "ppp-dsl" for PPPoE interfaces. In addition to that, Linux
      bridge interfaces may have names with a "-" such as
      "br-lan". We will now permit a "-" in Linux interface names.
2010-12-02 10:21:27 -08:00
Vadim Kurland
a76c1a21a1 * PolicyCompiler_ipt.cpp (checkForStatefulICMP6Rules::processNext):
fixed SF bug 3094273 "no state needed for ipv6-icmp in
ip6tables". Rules that match ICMPv6 objects should be
stateless. Compiler will check for this and reset "stateful" flag
of a rule and issue warning if the rule was built stateful in the
GUI.
2010-10-29 18:04:48 -07:00
Vadim Kurland
4b1ecbfc93 added test cases for SF bug 3077132 2010-10-05 19:40:29 +00:00
Vadim Kurland
c3aa139f22 * NATCompiler_PrintRule.cpp (processNext): fixed SF bug 3057503
"DNAT rule with dynamic IP has a white space, causing error".
2010-09-14 21:59:13 +00:00
Vadim Kurland
d438b220a0 * NATCompiler_ipt.cpp (VerifyRules2::processNext): fixed #1685
"iptables redirecting NAT rules in the OUTPUT chain". NAT rules
should be allowed to translate from CustomService to TCP or UDP
service, provided CustomService object is configured with matching
protocol. See also change in libfwbuilder NATCompiler::classifyNATRule::processNext.
2010-08-19 19:21:16 +00:00
Vadim Kurland
4c60f2a610 * NATCompiler_ipt.cpp (localNATRule::processNext): see #1685
"iptables redirecting NAT rules in the OUTPUT chain". This fix
makes it possible to create iptables NAT rule with target REDIRECT
in the OUTPUT chain. The rule should have firewall object in OSrc
and TDst rule elements.
2010-08-19 18:40:48 +00:00
Vadim Kurland
c993ccd943 * NATCompiler_ipt.cpp (splitNATBranchRule::processNext): fixed #1686
"can not generate basic NAT branching rule". NAT branching rules
were not generated in single rule compile mode.
2010-08-19 18:13:22 +00:00
Vadim Kurland
2ea02ccf67 fixed #1693 , SF bug 3048516: "NAT rule with 'Use SNAT instead MASQ'
doesn't work".
2010-08-19 17:05:26 +00:00
Vadim Kurland
0060ee84fa fixed SF bug3038636: support for the new syntax of ipv4options module 2010-08-04 01:36:30 +00:00
Vadim Kurland
c83b04f36b Fixes SF bug #3036541 "IPV6
only firewall resets ipv4 stack" only reset ipv4 iptables when there are some ip4 rules; also added action block to usage string of the generated iptables script
2010-07-29 18:12:06 +00:00
Vadim Kurland
89d504f639 better algorithm to find loops in rule branches and a test case for it for iptables; als fix for SF bug 3034628 "iptables does not allow target REJECT in mangle table" 2010-07-29 01:57:28 +00:00
Vadim Kurland
a51d1733fc fixed #1640 "default policy when the script is stopped should be
optional".
2010-07-27 22:10:53 +00:00
Vadim Kurland
1a8d8cd1ea fixed #1633 use ipset module in NATCompiler_ipt 2010-07-24 06:03:48 +00:00
Vadim Kurland
e82f770956 * PolicyCompiler_PrintRule.cpp: added support for iptables module
"set" used to generate iptables command for rules with run-time
AddressTable objects. This module is only available in iptables
1.4.1.1 and later, however some embedded platforms do not have it
even though they ship later versions ofiptables (e.g. OpenWRT).
Use of this module is controlled by a checkbox in the iptables 
"advanced" settings dialog which is off by default. This checkbox
becomes disabled when iptables version is set to < 1.4.1.1.
2010-07-23 05:15:05 +00:00
Vadim Kurland
8a4fb97afe upgraded test data files for 4.1 2010-07-20 23:45:05 +00:00
Vadim Kurland
1ee9ca248d * PolicyCompiler_ipt.cpp (specialCaseWithFWInDstAndOutbound::processNext):
fixed #1523 "outbound ipv6 rule matching multicast ipv6 destination
is not generated". The rule with network object fe80::/10 in source
and ipv6 muticast ff00::/8 in destination did not produce correspondign
ip6tables command. The change affects other cases with rules using
broadcast or multicast objects that should be considered matching
the firewall object.
2010-06-17 23:58:17 +00:00
Vadim Kurland
d670e07a6a test case for #1523 2010-06-16 15:18:07 +00:00
Vadim Kurland
4ecb807f23 * IPTImporter.cpp (IPTImporter::finalize): see #1513 iptables
importer should check default policy in standard chains.
2010-06-11 20:27:35 +00:00
Vadim Kurland
d57bd1cf0b * Preprocessor.cpp (Preprocessor::findMultiAddressObjectsUsedInRules):
change in libfwbuilder: fixed #1485 "dns name object is recognized
as an empty group when it appears in shared rule set"
2010-06-02 16:51:58 +00:00
Vadim Kurland
fe5a13d1b5 * iptables.g (MATCH_RECENT_SET): see #1451 "policy importer should
support some popular iptables modules". Added support for module
"recent" and rules that match standard ip/icmp/udp/tcp protocols
and at the same time module "mark", "length", "limit" or "recent".
Rules like these are translated into a combination of a branching
rule and additional rule in a branch rule set that implements
module match.
2010-05-14 00:54:03 +00:00
Vadim Kurland
388f69537c * CompilerDriver_ipt_policy.cpp (CompilerDriver_ipt::processPolicyRuleSet):
fixes #1432 "automatic rule with --restore-mark is missing if
rules using action Tag are not in the default Policy rule set".
2010-05-01 22:23:01 +00:00
Vadim Kurland
034dd2bfea see #1432 : added test case for the ticket 2010-05-01 00:42:18 +00:00
Vadim Kurland
64bbe7fdb9 fixes #1425 iptables script generated for the empty rule set is broken 2010-04-28 00:38:52 +00:00
Vadim Kurland
b1df2d8932 * SSHSession.cpp (SSHSession::terminate): see #1426, #1428 use
QProcess::waitForFinished() instead of just sleep() after we send
TERM signal to the background process. Also let Qt process events
to update the GUI while waiting.

* instDialog_installer.cpp (instDialog::stopInstall): fixed #1428
button "Stop" in the installer dialog does not stop installer
process
2010-04-27 23:10:46 +00:00
Vadim Kurland
3cfd19c79b * PolicyCompiler_ipt.cpp (PolicyCompiler_ipt::checkForShadowingPlatformSpecific):
see #1417 (SF bug 2992177) rule with greater limit module rate
value shadows rule with lower rate value. Comments in the code explain
why.
2010-04-27 16:58:05 +00:00
Vadim Kurland
ef2d783888 added comment to explain the logic behind shadowing detection with iptables limit modules 2010-04-27 16:15:20 +00:00
Vadim Kurland
72307e1bfa see #1417 (SF bug 2992177): compiler should compare
limit rate value and other parameters set for modules limit, connlimit
and hashlimit while deciding if rules shadow each other.
2010-04-26 16:27:57 +00:00
Vadim Kurland
b9cfc1f5b8 * PolicyCompiler_ipt.cpp (PolicyCompiler_ipt::checkForShadowingPlatformSpecific):
fixes #1417 rule shadowing detection should recognize different rule options.
Policy compiler for iptables takes into account rule options for modules
limit, connlimit and hashlimit when it considers rules for rule shadowing.
2010-04-25 03:00:05 +00:00
Vadim Kurland
5f58d6bcf2 * instDialog.cpp (instDialog::show): fixed #1419: clear progress
log display when instDialog is opened
2010-04-25 01:54:41 +00:00
Vadim Kurland
3360977c2d * MangleTableCompiler_ipt.cpp (keepMangleTableRules::processNext):
fixed #1415 "action branch that creates branch in mangle table
should branch in FORWARD chain". Rule with "any" in src and dst
and action Branch with option "branch in mangle table" will go
into FORWARD chain in addition to the PREROUTING and POSTROUTING
chains as before. Note that choice of PREROUTING or POSTROUTING
chains depends on direction.
2010-04-24 01:41:47 +00:00
Vadim Kurland
4c6518d5d3 * PolicyCompiler_PrintRule.cpp (PrintRule::_printTarget): fixes #1416
leading blank space in front of the custom action is missing.
SF bug 2991397.
2010-04-23 18:22:08 +00:00
Vadim Kurland
3df762b301 * RoutingCompiler.cpp (reachableAddressInRGtw::checkReachableIPAddress):
fixes #1410 "Problem with route for 4.0.0-b2809". Compiler did
not allow vlan subinterface as a gateway in a routing rule.
2010-04-20 18:07:05 +00:00
Vadim Kurland
f05f657700 * RoutingCompiler_ipt.cpp (RoutingCompiler_ipt::epilog): fixed #1404
call to function restore_script_output in the generated iptables
script is sometimes added without function definition
2010-04-09 21:29:29 +00:00
Vadim Kurland
4bbe1c2b12 * NATCompiler_ipt.cpp (AssignInterface::processNext): fixes #1403
refs #1150  "Using ip address of wrong interface" is broken in v4.0.
2010-04-09 19:50:03 +00:00
Vadim Kurland
a0e953a5b8 tests for anti-spoofing rules when ip forwarding and "assume fw is part of any" are turned off. See #1338 2010-03-18 18:27:39 +00:00
Vadim Kurland
d02fd7a11e * PolicyCompiler_PrintRule.cpp (PrintRule::_printTimeInterval):
fixed time format for the iptables parameters --datestart,
--datestop which is supposed to be ISO 8601 "T" notation but
apparently with no support for time zone designators.  Timezone
desginators are an error in iptables 1.4.1.1 and 1.4.5, did not
test newer versions.  Fixes #1286 SourceForge bug #2961532
2010-03-01 22:52:06 +00:00
Vadim Kurland
72165862ca test for when the name of the script on the firewall is different 2010-02-19 19:05:49 +00:00
Vadim Kurland
76dd6e285c * PolicyCompiler_ipt.cpp (decideOnChainIfDstFW::processNext):
fixes #1231 rules are placed FORWARD chain if firewall object is
"bridging firewall". This bugfix concerns specific rule
configuration used with bridging firewall where firewall object or
one of its interfaces is used in "destination" and an interface
which is not a bridge port is in the "interface" rule column. Rule
like this should go into INPUT chain but compiler used to splut it
and put generated iptables rules in both INPUT and FORWARD chains.
Rule should be placed in the FORWARD chain only if interface in
"interface" column is bridge port. The same algorithm also applies
to rules with firewall or one if its interfaces in the "Source"
column.
2010-02-14 18:54:47 +00:00
Vadim Kurland
9757f61c34 add missing #include, add test rules for bug 1231 2010-02-14 17:34:58 +00:00
Vadim Kurland
c73c00658f * PolicyCompiler_ipt.cpp (specialCaseWithFWInDstAndOutbound::processNext):
fixes #1220 "bridging fw rule using all multicast object in
destination does not produce any iptables rules".
2010-02-10 22:10:44 +00:00
Vadim Kurland
2b8a352c58 * NATCompiler_PrintRule.cpp (PrintRule::processNext): fixes #1147
--persistent option for DNAT and SNAT
2010-01-27 01:06:12 +00:00
Vadim Kurland
f0a11a64b4 * NATCompiler_PrintRule.cpp (PrintRule::processNext): fixes #1146
support for NAT MASQUERADE source port randomization. This adds
support for the "--random" option for SNAT, DNAT and MASQUERADE
targets in iptables NAT rules. User needs to turn on the checkbox
that adds this option in NAT rules again
2010-01-27 00:39:17 +00:00
Vadim Kurland
1687a2efcb fixes #1150
"fwb_ipt should check AddressRange in TSrc against addresses of
interfaces".
2010-01-26 03:39:52 +00:00
Vadim Kurland
df34d27ca0 * PolicyCompiler_PrintRule.cpp (PrintRule::_printModules): fixes
#1123, #1124: Text label next to the option that translates into
--connlimit-above clause for the iptables "connlimit" module
now matches description in the iptables manual. Added checkbox
that allows the user to add negation to the generated code

fixes #1123, #1124
2010-01-21 03:50:38 +00:00
Vadim Kurland
0ee88506b5 * ../src/iptlib/NATCompiler_ipt.cpp (VerifyRules2::processNext):
fixes #1109: "rules that do not pass verifyRules() checks may
cause compiler crash in test mode or gui crash in single rule
compile mode"
2010-01-20 02:55:38 +00:00
Vadim Kurland
4a88afc651 fixes #1094 2010-01-17 23:09:51 +00:00
Vadim Kurland
2e27954947 * PolicyCompiler_ipt.cpp (PolicyCompiler_ipt::compile): Using rule
processor Compiler::checkForObjectsWithErrors to find objects with
errors and generate proper calls to abort(). This exposes errors
that happened when Preprocessor failed to resolve compile-time
AddressTable and DNSName objects. If compiler runs in test mode,
preprocessor did not abort but used dummy substitution addresses
and continued. Call to checkForObjectsWithErrors generates proper
error messages tied to rules. Using this rule processor in all
compilers. Fixes #1087
2010-01-16 00:26:01 +00:00