я пытаюсь разрешить IPv6-адресу подключаться к определенному IP на моем сервере, но не к другим. Следующее не работает с ip6tables, но работает только с обычными iptables. Когда я удаляю -d xx.xx.xx.77
из команды ip6tables, она, однако, будет работать, что позволит этому IP-адресу подключаться к любому IP-адресу в ящике, который мне не нужен.
ip6tables -I INPUT -d xx.xx.xx.77 -i enp2s0f0 -p tcp -m multiport --dports http,https -s 2400:cb00::/32 -j ACCEPT
ip6tables v1.6.0: host/network `xx.xx.xx.77' not found
man ip6tables
показывает следующее для -d
и -s
:
[!] -s, --source address[/mask][,...]
Source specification. Address can be either a network name, a hostname, a network IP address (with /mask), or a plain IP address. Hostnames will be resolved once only, before the rule is submitted to the kernel. Please note that
specifying any name to be resolved with a remote query such as DNS is a really bad idea. The mask can be either an ipv4 network mask (for iptables) or a plain number, specifying the number of 1's at the left side of the network mask.
Thus, an iptables mask of 24 is equivalent to 255.255.255.0. A "!" argument before the address specification inverts the sense of the address. The flag --src is an alias for this option. Multiple addresses can be specified, but this
will expand to multiple rules (when adding with -A), or will cause multiple rules to be deleted (with -D).
[!] -d, --destination address[/mask][,...]
Destination specification. See the description of the -s (source) flag for a detailed description of the syntax. The flag --dst is an alias for this option.
IPv6 не может подключиться к IPv4. в ip6tables все должно быть ipv6