Move egress logging rule beside drop rule
Otherwise we might log a blocked connection even though the packet was not dropped.
This commit is contained in:
1 parent
30ce219794
commit
8c52698222
2 files changed
+5
-3
No files matched your search
@@ -193,7 +193,6 @@ func createBaseRules(ipt *iptables.IPTables, ips ipset.Interface) error {
|
||||
ruleSpecs = append(ruleSpecs, [][]string{
|
||||
{"-m", "state", "--state", "NEW", "-j", chains.EgressDefaultChain},
|
||||
{"-m", "state", "--state", "NEW", "-m", "mark", "!", "--mark", npc.EgressMark, "-j", chains.EgressCustomChain},
|
||||
{"-m", "state", "--state", "NEW", "-m", "mark", "!", "--mark", npc.EgressMark, "-j", "NFLOG", "--nflog-group", "86"},
|
||||
}...)
|
||||
if err := net.AddChainWithRules(ipt, npc.TableFilter, chains.EgressChain, ruleSpecs); err != nil {
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user