<html>
<head>
<base href="https://bugzilla.netfilter.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Access decision from previous priority"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1295">1295</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Access decision from previous priority
</td>
</tr>
<tr>
<th>Product</th>
<td>nftables
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86_64
</td>
</tr>
<tr>
<th>OS</th>
<td>Debian GNU/Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P5
</td>
</tr>
<tr>
<th>Component</th>
<td>nft
</td>
</tr>
<tr>
<th>Assignee</th>
<td>pablo@netfilter.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>Vincent.VSmeets@GMail.com
</td>
</tr></table>
<p>
<div>
<pre>Hallo,
<a href="https://wiki.nftables.org/wiki-nftables/index.php/Configuring_chains#Base_chain_priority">https://wiki.nftables.org/wiki-nftables/index.php/Configuring_chains#Base_chain_priority</a>
describes that all the chains for a hook are executed in the order of the
priority. The higher priority chains overrule the decision of the lower
priority chains. The example from the wiki:
table inet filter {
# this chain is evaluated first due to priority
chain ssh {
type filter hook input priority 0; policy drop;
# ssh packet accepted
tcp dport ssh accept
}
# this chain is evaluated last due to priority
chain input {
type filter hook input priority 1; policy drop;
# the same ssh packet is dropped here by means of default
policy
}
}
Now my question: is it possible to access the previous decision in the current
chain? Something like:
# this chain is evaluated last due to priority
chain input {
type filter hook input priority 1; policy drop;
# In case the previous decision was accept, then accept it here
too.
meta previous-decision accept accept
}
The source of this problem is: I want to use Docker in combination with my own
firewall rules. Docker uses the chain ip/filter/FORWARD (and some DOCKER-*) at
priority 0 to implement the network isolation. I don't want to change those
chains because Docker will change them at runtime and relies on them. But I
still want to control the forwarding of the packets.
My idea was to create my own chain ip/filter/my-forward at priority -1. This
will be executed before the docker chain. Docker provides a chain for user
modifications DOCKER-USER. In that chain, I want to drop all the packets that
were already droped by the previous (my-forward) chain. All other packets may
then be processed by the docker chains. Something like:
chain my-forward {
type filter hook forward priority -1; policy drop;
# The web server lives in a docker container.
iifname "eth0" oifname "docker0" tcp dport { 80, 443 } accept
}
chain DOCKER-USER {
# In case the previous decision was drop, then drop it here
too.
meta previous-decision drop drop
# All other packets are procesed by the docker chain(s).
}
Is it possible to have this implemented?
Regards,
Vincent Smeets</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>