From: ha do <haloha201@yahoo.com>
To: Curby <curby@cur.by>
Cc: netfilter@vger.kernel.org
Subject: Re: Help!!! iptables hashlimit
Date: Wed, 14 Jul 2010 02:39:37 -0700 (PDT) [thread overview]
Message-ID: <117508.97487.qm@web32407.mail.mud.yahoo.com> (raw)
In-Reply-To: <AANLkTilFi9WmIWoRQ16N-iG34klTw_IF76hGafpaHTe3@mail.gmail.com>
Hi Curby
thank you for your reply
SIP server and sip endpoint is in the same LAN so what do you think about
network lantency
do i test with this:
-A INPUT -p udp -i eth0 --dport 5060 -m hashlimit --hashlimit 70/minute
--hashlimit-burst 10 --hashlimit-mode srcip,srcport --hashlimit-name "cucku" -m
string --string "REGISTER sip:" --algo bm --to 80 -j ACCEPT
the iptables still drop packet
i checked again the man page and see :
[--hashlimit-htable-gcinterval] interval between garbage collection runs
could you guide me how to use it
Thank you
Ha`
----- Original Message ----
From: Curby <curby@cur.by>
To: ha do <haloha201@yahoo.com>
Cc: netfilter@vger.kernel.org
Sent: Wed, July 14, 2010 3:39:51 PM
Subject: Re: Help!!! iptables hashlimit
On Wed, Jul 14, 2010 at 2:03 AM, ha do <haloha201@yahoo.com> wrote:
> i just setup the hashlimit for SIP REGISTER on iptables and the rule is:
> -A INPUT -p udp -i eth0 --dport 5060 -m hashlimit --hashlimit 1/minute
> --hashlimit-burst 2 --hashlimit-mode srcip,srcport --hashlimit-name "cucku"
>-m
> string --string "REGISTER sip:" --algo bm --to 80 -j ACCEPT
> i want the iptables just to accept 2 REGISTER packets per minute on per IP
> address:port
There might be other issues, but you need hashlimit 2/minute to accept
2 packets per minute. Having a burst of 2 by itself is not
sufficient.
Sometimes, due to network latency or other timing issues, you need to
be even more accepting. For example, I've found that accepting
"well-behaved" pings requires a minimum hashlimit of 61/min with burst
of 2. When I lower either setting, iptables starts dropping the
occasional ping packet.
--Mike
next prev parent reply other threads:[~2010-07-14 9:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-14 8:03 Help!!! iptables hashlimit ha do
2010-07-14 8:39 ` Curby
2010-07-14 9:39 ` ha do [this message]
2010-07-14 16:26 ` Jan Engelhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=117508.97487.qm@web32407.mail.mud.yahoo.com \
--to=haloha201@yahoo.com \
--cc=curby@cur.by \
--cc=netfilter@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.