0

On current system I have this rule for ip6tables

-A INPUT -d <ip6address> -p udp -m udp --dport <port> -m state --state NEW -j ACCEPT

For new system I wrote an ansible playbook:

- name: Allow someport for ipv6
  ansible.builtin.iptables:
    chain: INPUT
    protocol: udp
    match: udp
    ip_version: ipv6
    ctstate: NEW
    destination_port: 'port'
    destination: 'ip6address'
    jump: ACCEPT
  tags:
    - iptables6

But when I try to play this I get an error:

{... "stderr_lines": ["ip6tables v1.8.7 (nf_tables): unknown option \"--destination-port\"", "Try `ip6tables -h' or 'ip6tables --help' for more information."], "stdout": "", "stdout_lines": []}
  • Ansible 2.10.8
  • Debian 11

How to properly define this rule?

GarfieldCat
  • 101
  • 3

0 Answers0