
在目前系統上,我對 ip6tables 有這個規則
-A INPUT -d <ip6address> -p udp -m udp --dport <port> -m state --state NEW -j ACCEPT
對於新系統,我寫了一個 ansible 劇本:
- 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
但是當我嘗試玩這個時,我收到一個錯誤:
{... "stderr_lines": ["ip6tables v1.8.7 (nf_tables): unknown option \"--destination-port\"", "Try `ip6tables -h' or 'ip6tables --help' for more information."], "stdout": "", "stdout_lines": []}
- 安塞布爾2.10.8
- Debian 11
如何正確定義這個規則?