python-iptables icon indicating copy to clipboard operation
python-iptables copied to clipboard

Cannot create a target if it is a chain existing only in the ip6 nat table

Open BenHSTremblay opened this issue 6 years ago • 3 comments

Replication is simple. Create a new chain in the nat ip6table, e.g.

# ip6tables -t nat -N foo

Try to add that chain as the target of a rule:

>>> iptc.Table6('nat').create_rule().create_target('foo')
iptc.xtables.XTablesError: can't find target foo

Currently I am working around this by adding a chain with the same name to a different table, e.g.

# ip6tables -t mangle -N foo
>>> iptc.Table6('nat').create_rule().create_target('foo')
<iptc.ip4tc.Target object at 0x7f48e9d92278>

BenHSTremblay avatar Feb 23 '19 00:02 BenHSTremblay

Works for me without the workaround - what version are you on?

ldx avatar Mar 02 '19 00:03 ldx

0.11.0-2

I will try upgrading dependencies and get back to you. Thanks.

BenHSTremblay avatar Mar 13 '19 18:03 BenHSTremblay

Hi @BenHSTremblay , were you able to solve the issue?

jllorente avatar Jan 30 '21 20:01 jllorente