anclbob Posted August 28, 2006 Posted August 28, 2006 Некрасивая ситуация если я добавляю правило с номером 100 (ipfw add 100 deny udp from any 135-139 to any) а потом добавляю ещё одно правило с таким же номером (ipfw add 100 deny udp from any 445 to any), то оно почему то добавляется. Или абсолютно одинаковые правила с одинаковым номером дублируются очень много раз. ------------------------------------------------------------------- ipfw show 00100 0 0 deny udp from any 135-139 to any 00100 0 0 deny udp from any 445 to any -------------------------------------------------------------------- Как от этого избавиться? как сделать так что бы при добавлении существующего правила оно либо заменялось либо просто не добавлялось? Вставить ник Quote
Fizban Posted August 29, 2006 Posted August 29, 2006 (edited) Никак. Это фича ipfw. Очень, кстати, удобная местами. Читайте маны, это полезно. :) ---кусь--- rule_number Each rule is associated with a rule_number in the range 1..65535, with the latter reserved for the default rule. Rules are checked sequentially by rule number. Multiple rules can have the same number, in which case they are checked (and listed) according to the order in which they have been added. If a rule is entered without specifying a number, the kernel will assign one in such a way that the rule becomes the last one before the default rule. Automatic rule numbers are assigned by incrementing the last non- default rule number by the value of the sysctl variable net.inet.ip.fw.autoinc_step which defaults to 100. If this is not possible (e.g. because we would go beyond the maximum allowed rule number), the number of the last non-default value is used instead. ---кусь--- Edited August 29, 2006 by Fizban Вставить ник Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.