Iptables Facts

ip6tables_chains

host.fact.ip6tables_chains(table='filter')

Returns a dict of ip6tables chains & policies:

{
    'NAME': 'POLICY',
}

ip6tables_rules

host.fact.ip6tables_rules(table='filter')

Returns a list of ip6tables rules for a specific table:

[
    {
        'chain': 'PREROUTING',
        'jump': 'DNAT',
        ...
    },
]

iptables_chains

host.fact.iptables_chains(table='filter')

Returns a dict of iptables chains & policies:

{
    'NAME': 'POLICY',
}

iptables_rules

host.fact.iptables_rules(table='filter')

Returns a list of iptables rules for a specific table:

[
    {
        'chain': 'PREROUTING',
        'jump': 'DNAT',
        ...
    },
]