Skip to contentSkip to conversation

rate limit by MAC

DISCUSSION Самусенко Андрей 4 participants 7 messages Jul 1, 2009 – Jul 2, 2009

lore
Share & tools
lore
#1 lore raw

2009/7/1 Самусенко Андрей <[email protected]>:

Quoted 11 lines

Hi!

Can iptables limit rate by MAC? Think it no.

What on Linux can do how i need?

--
To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

You might be able to...

iptables -A FORWARD -m mac --mac-source <<mac address>> -m limit --limit 100/s -j ACCEPT would restrict the given mac address to 100 packets per second... but depending on how many mac addresses you have it might be too much to enter each rule...

The hashlimit might be better if you can use ip addresses instead of mac addresses.

--
Richard Horton
Users are like a virus: Each causing a thousand tiny crises until the host finally dies.
http://www.solstans.co.uk - Solstans Japanese Bobtails and Norwegian Forest Cats
http://www.pbase.com/arimus - My online photogallery

Signature · 5 lines
Richard Horton
Users are like a virus: Each causing a thousand tiny crises until the
host finally dies.
http://www.solstans.co.uk - Solstans Japanese Bobtails and Norwegian Forest Cats
http://www.pbase.com/arimus - My online photogallery
#2 lore raw

Thank you, Richard.
I don't knew about changing MAC on each router.
My question have not sense.
How to fight with IP spoofing? =)

Quoted 33 lines · Richard Horton

2009/7/1 Самусенко Андрей <[email protected]>:

Quoted 12 lines

Hi!

Can iptables limit rate by MAC? Think it no.

What on Linux can do how i need?

--
To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

You might be able to...

iptables -A FORWARD -m mac --mac-source <<mac address>> -m limit --limit 100/s -j ACCEPT would restrict the given mac address to 100 packets per second... but depending on how many mac addresses you have it might be too much to enter each rule...

The hashlimit might be better if you can use ip addresses instead of mac addresses.

--
Richard Horton
Users are like a virus: Each causing a thousand tiny crises until the host finally dies.
http://www.solstans.co.uk - Solstans Japanese Bobtails and Norwegian Forest Cats
http://www.pbase.com/arimus - My online photogallery

#3 lore raw
In reply to Richard Horton
Quoted 6 lines

You might be able to...

iptables -A FORWARD -m mac --mac-source <<mac address>> -m limit --limit 100/s -j ACCEPT would restrict the given mac address to 100 packets per second... but depending on how many mac addresses you have it might be too much to enter each rule...

Sawing this thread,
Iptables doesn't (still) have the capacity to do rate limit by itself, does it?

Jorge,

#4 lore raw

В Срд, 01/07/2009 в 16:44 +0100, Jorge Bastos пишет:

Quoted 10 lines
Quoted 6 lines

You might be able to...

iptables -A FORWARD -m mac --mac-source <<mac address>> -m limit --limit 100/s -j ACCEPT would restrict the given mac address to 100 packets per second... but depending on how many mac addresses you have it might be too much to enter each rule...

Sawing this thread,
Iptables doesn't (still) have the capacity to do rate limit by itself, does it?

Depends on what the "rate" is, packets/time - yes, bytes/time - no.

Signature · 1 line
Покотиленко Костик <[email protected]>
#5 lore raw
Quoted 6 lines
Quoted 3 lines

Sawing this thread,
Iptables doesn't (still) have the capacity to do rate limit by itself, does it?

Depends on what the "rate" is, packets/time - yes, bytes/time - no.

Sorry forgot to specify.
It's bytes.
Oh i see, i use "tc", no problem about it, maybe in the future netfilter will have this builtin and more simplier than tc/iproute tools.

Jorge,

#6 lore raw

В Срд, 01/07/2009 в 18:54 +0100, Jorge Bastos пишет:

Quoted 10 lines
Quoted 6 lines
Quoted 3 lines

Sawing this thread,
Iptables doesn't (still) have the capacity to do rate limit by itself, does it?

Depends on what the "rate" is, packets/time - yes, bytes/time - no.

Sorry forgot to specify.
It's bytes.
Oh i see, i use "tc", no problem about it, maybe in the future netfilter will have this builtin and more simplier than tc/iproute tools.

That's big question. Those two are too different.

Signature · 1 line
Покотиленко Костик <[email protected]>