Страница 1 из 1

IPFW как забанить по MAC

Добавлено: 2007-10-27 20:44:07
Night_Spirit
Собственно вопрос максимально прост. Как средствами IPFW забанить юзера по MAC-адресу?

Re: IPFW как забанить по MAC

Добавлено: 2007-10-27 21:03:24
Alex Keda
man ipfw писал(а):

Код: Выделить всё

     { MAC | mac } dst-mac src-mac
             Match packets with a given dst-mac and src-mac addresses, speci-
             fied as the any keyword (matching any MAC address), or six groups
             of hex digits separated by colons, and optionally followed by a
             mask indicating the significant bits.  The mask may be specified
             using either of the following methods:

             1.      A slash (/) followed by the number of significant bits.
                     For example, an address with 33 significant bits could be
                     specified as:

                           MAC 10:20:30:40:50:60/33 any

             2.      An ampersand (&) followed by a bitmask specified as six
                     groups of hex digits separated by colons.  For example,
                     an address in which the last 16 bits are significant
                     could be specified as:

                           MAC 10:20:30:40:50:60&00:00:00:00:ff:ff any

                     Note that the ampersand character has a special meaning
                     in many shells and should generally be escaped.

             Note that the order of MAC addresses (destination first, source
             second) is the same as on the wire, but the opposite of the one
             used for IP addresses.


Re: IPFW как забанить по MAC

Добавлено: 2007-10-28 13:27:49
Night_Spirit
Забил такое правило ipfw add 99 deny ip from any to any MAC dst 00:11:5B:9B:80:18

Правило прописалось но при листе получается так 10 deny ip from any to any MAC any 00:11:5B:9B:80:18 икаунтеры по нулям... чуствую что сделал что то не так

Re: IPFW как забанить по MAC

Добавлено: 2007-10-29 14:01:22
Night_Spirit
Подскажите плиз правильный синтаксис... :)