СОбственно почему спрашиваю, есть сервер:
~ # iptables -V
iptables v1.4.12
~ # ipset -V
ipset v6.8, protocol version: 6
~ # uname -r
2.6.39.3-bgeth1 Link encap:Ethernet HWaddr 00:26:82:03:7c:3e
inet addr:193.43.210.32 Bcast:193.43.210.255 Mask:255.255.255.0~ # ipset -L iUser
Name: iUser
Type: bitmap:ip,mac
Header: range 193.43.210.10-193.43.210.215
Size in memory: 3408
References: 3
Members:
193.43.210.32,00:26:82:03:7C:3EДелаю вот что:
~ # iptables -p icmp -A INPUT -m set --match-set iUser src -j DROPПотом смотрим счетчики, а там по нулям:
~ # iptables -nvL INPUT
Chain INPUT (policy ACCEPT 356 packets, 41541 bytes)
pkts bytes target prot opt in out source destination
0 0 DROP icmp -- * * 0.0.0.0/0 0.0.0.0/0
match-set iUser srcпотом делаю:
iptables -A INPUT -s 193.43.210.32 -p icmp -j DROPи снова пингую, смотрим счетчики:
~ # iptables -nvL INPUT
Chain INPUT (policy ACCEPT 114 packets, 7790 bytes)
pkts bytes target prot opt in out source destination
0 0 DROP icmp -- * * 0.0.0.0/0 0.0.0.0/0
match-set iUser src
17 1428 DROP icmp -- * * 193.43.210.32 0.0.0.0/0Собственно вопрос, может я делаю что-то не правильно?
> ~ # ipset -L iUser
> Name: iUserМожет в этом дело:
> Type: bitmap:ip,mac
-
> Header: range 193.43.210.10-193.43.210.215
> Size in memory: 3408
> References: 3
> Members:
> 193.43.210.32,00:26:82:03:7C:3E
>> ~ # ipset -L iUser
>> Name: iUser
> Может в этом дело:
>> Type: bitmap:ip,mac
> -
>> Header: range 193.43.210.10-193.43.210.215
>> Size in memory: 3408
>> References: 3
>> Members:
>> 193.43.210.32,00:26:82:03:7C:3EНе, тут как раз все правильно.. Так же оно и работает, вопрос вот в чем:
The bitmap:ip,mac type of sets require two src/dst parameters of the set match and SET target netfilter kernel modules and the second one must be
src to match, add or delete entries because the set match and SET target have access to the source MAC address only.оно хочет 2 параметра src/src или dst/src.. или я не тот ман курю.