ldx / python-iptables

Python bindings for iptables
730 stars 182 forks source link

Can't find target JOOL_SIIT when iptables for both ipv4 and ipv6 are used #325

Open bvlarsen opened 2 years ago

bvlarsen commented 2 years ago

Similar issue has been raised before, but this can not be worked around by running v6 before v4, as for instance with target MARK. The target is JOOL_SIIT

OS: Ubuntu 20.04 with kernel 5.4.0-104-generic Python3: 3.8.10 Python3-iptables/focal,now 0.14.0~ds-1ubuntu4 amd64 JOOL_SIIT: jool-dkms/focal,now 4.0.7-1 all

code: table6 = iptc.Table6(iptc.Table.MANGLE) table6.autocommit = True chain6 = iptc.Chain(table6, "PREROUTING") rule6 = iptc.Rule6() rule6.target = iptc.Target(rule6, "JOOL_SIIT") rule6.target.instance = "inst100" chain6.insert_rule(rule6)

table4 = iptc.Table(iptc.Table.MANGLE) table4.autocommit = True chain4 = iptc.Chain(table4, "PREROUTING") rule4 = iptc.Rule() rule4.target = iptc.Target(rule4, "JOOL_SIIT") rule4.target.instance = "inst100" chain4.insert_rule(rule4)

hunbalazs commented 1 year ago

This is libxtables related, the same issue happens with any multi protocol target (for example TPROXY)