Bug 11977 - Deduplication of firewall rules when filtering is performed on hosts/networks known since green0
Summary: Deduplication of firewall rules when filtering is performed on hosts/networks...
Status: ASSIGNED
Alias: None
Product: IPFire
Classification: Unclassified
Component: --- (show other bugs)
Version: 2
Hardware: all Linux
: Will affect all users Security
Assignee: Stefan Schantl
QA Contact:
URL:
Keywords:
Depends on:
Blocks: FWBUGS
  Show dependency treegraph
 
Reported: 2019-01-23 21:07 UTC by julien
Modified: 2021-07-16 18:27 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description julien 2019-01-23 21:07:36 UTC
Hello,

In the case where static roads are known on the green0 side by Ipfire and you want to filter on these networks, the firewall rules are duplicated in 3 specific cases.

1/
When a FORWARD rule has as its source a host or a network known since green0 and as a red0 interface output, we have an unnecessary rule that is added to INPUTWF.

2/
When a SNAT rule has as its source a host or network known from green0 with an IP redirection from green0 and as an output to a host of the same network known from green0, we have an unnecessary rule that is added to INPUTFW

3
When a DNAT rule with any network source and output to the firewall with a redirection of the destination IP to a host on the network known since green0, we have an unnecessary rule that is added to OUTGOINGFW.

An email was sent to the Ipfire development team to detail the 3 bugs. Below is a diagram to understand the infrastructure.

The objective is that Ipfire can filter/NAT on a network known since green0 without creating unwanted rules.


+-----------------------------+
| +----------+                |
| |          |                |
| |  SRV     | +--+           |
| |          |    |           |
| +----------+    |           |      192.168.X.0/24
|                 |           |      +----------->           +----------->
|  192.168.X.0/24 |           |          no NAT                   NAT
|                 |           |
|                 |           |
| +----------+    |      +---------+                 +---------+        +----------+
| |          |    |      |         | 192.168.y.252/30|         |        |          |
| |  PC      | +--+--+   |         | +-------------+ | Ipfire  | +----+ | INTERNET |
| |          |           |         |                 |         |        |          |
| +----------+           +---------+                 +---------+        +----------+
|                             |
+-----------------------------+

With kind regards
Comment 1 Michael Tremer 2019-01-28 11:46:45 UTC
https://lists.ipfire.org/pipermail/development/2019-January/005261.html

There are more details here...