Автор Тема: Чем отличается -j DROP от -f -j DROP ?  (Прочитано 300 раз)

Оффлайн Maxik

  • Давно тут
  • **
  • Сообщений: 288
    • Вегетарианское сообщество сурового климата.
    • Email
Здравствуйте!

ifaces/default/fw/ip6tables/filter

Стоит ли писать две строчки вместо одной?
-j DROP
-f -j DROP



С уважением, Максим.

Оффлайн Александр Ерещенко

  • Завсегдатай
  • *
  • Сообщений: 1 160
Re: Чем отличается -j DROP от -f -j DROP ?
« Ответ #1 : 20.04.2021 09:03:54 »
ifaces/default/fw/ip6tables/filter
Стоит ли писать две строчки вместо одной?
-j DROP
-f -j DROP

$ man iptables
...
[!] -f, --fragment
    This means that the rule only refers to second and further IPv4 fragments of fragmented packets.
    Since there is no way to tell the source or destination ports of such a packet (or ICMP  type),  such
    a packet  will  not match any rules which specify them.  When the "!" argument precedes the "-f" flag,
    the rule will only match head fragments, or unfragmented packets.
    This option is IPv4 specific, it is not available in ip6tables.
...
Так что указывать -f в ip6tables бессмысленно. Более того, должен ругаться на это правило.
« Последнее редактирование: 20.04.2021 09:06:18 от Александр Ерещенко »