Skip to content

query icmp ype from rule #310

Open
Open
@dmzoneill

Description

@dmzoneill

Hi,

I have the following rules:

ACCEPT icmp -- 10.246.0.0/16 10.255.253.4 icmptype 8 state NEW,RELATED,ESTABLISHED
ACCEPT tcp -- 10.246.0.0/16 10.255.253.4 tcp dpt:22 ctstate NEW,ESTABLISHED
ACCEPT all -- 10.246.0.0/16 10.255.253.4 state RELATED,ESTABLISHED
DROP all -- 10.246.0.0/16 10.255.253.4

how do you query icmpttype =8 from the rule?
Cant see it anywhere, and there is no documentation. related to it.

also, when i iterate the rules in a chain 'all' returns are 'ip'.
and 'icmp' returns as 'ip'.

Whilst i understand the underlying network layer 3.
Its not consistent with the iptables command output.
any feedback appreciated.

for chain in table.chains:
for rule in chain.rules:
if hasattr(rule, "protocol"):
logging.info("???: " + rule.get_protocol())

???: ip
???: tcp
???: ip
???: ip

thank you

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