Отключить ответы ICMPv6 Destination Unreachable

iptables -I OUTPUT -p icmp --icmp-type destination-unreachable -j DROP

Приведенная выше команда работает для IPv4, какой должна быть команда для IPv6, чтобы отбрасывать пакеты ICMPv6 о недоступности назначения. Я попытался использовать ip6tables, но не смог выбрать правильный вариант.

ip6tables -I OUTPUT -p icmpv6 <icmpv6 type> -j DROP

Для чего должно работать?

-1
задан 30 September 2016 в 18:58
1 ответ

На странице руководства iptables-extensions (8) приведен синтаксис:

   icmp6 (IPv6-specific)
       This extension can be used if  `--protocol  ipv6-icmp'  or  `--protocol
       icmpv6' is specified. It provides the following option:

       [!] --icmpv6-type type[/code]|typename
              This  allows  specification  of  the ICMPv6 type, which can be a
              numeric ICMPv6 type, type and code, or one of  the  ICMPv6  type
              names shown by the command
               ip6tables -p ipv6-icmp -h

Вы можете перечислить типы ICMPv6 с помощью ip6tables -p ipv6-icmp -h , как описано на странице руководства.

Valid ICMPv6 Types:
destination-unreachable
   no-route
   communication-prohibited
   address-unreachable
   port-unreachable
packet-too-big
time-exceeded (ttl-exceeded)
   ttl-zero-during-transit
   ttl-zero-during-reassembly
parameter-problem
   bad-header
   unknown-header-type
   unknown-option
echo-request (ping)
echo-reply (pong)
router-solicitation
router-advertisement
neighbour-solicitation (neighbor-solicitation)
neighbour-advertisement (neighbor-advertisement)
redirect

Конечно, вы не должны пытаться заблокировать эти пакеты. Это приведет к неправильной работе приложений.

4
ответ дан 5 December 2019 в 19:07

Теги

Похожие вопросы