Skip to content

iptc.errors.XTablesError: b'recent'.x6_fcheck has failed #279

@ghost

Description

I tried adding a rule with iptc.easy.add_rule(table, chain, rule_d) which has got a 'recent' match, but end up either with the error iptc.errors.XTablesError: b'recent'.x6_fcheck has failed if the name attribute is given as first argument or with an iptables rule with name DEFAULT instead of the one i've given it.

the rule as dictionary which produces the rule below:
>>> rule_d = {'protocol': 'udp', 'recent': {'mask': '255.255.255.255', 'update': '', 'seconds': '60', 'rsource': '', 'name': 'UDP-PORTSCAN'}, 'target': {'REJECT':{'reject-with': 'icmp-port-unreachable'}}}

and the result.
0 0 REJECT udp -- * * 0.0.0.0/0 0.0.0.0/0 recent: SET name: DEFAULT side: source mask: 255.255.255.255 reject-with icmp-port-unreachable

the rule as dictionary which produces the error iptc.errors.XTablesError: b'recent'.x6_fcheck has failed

>>> rule_d = {'protocol': 'udp', 'recent': {'name': 'UDP-PORTSCAN', 'mask': '255.255.255.255', 'update': '', 'seconds': '60', 'rsource': ''}, 'target': {'REJECT':{'reject-with': 'icmp-port-unreachable'}}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions