* connlimit troubles and questions
@ 2012-09-19 19:16 me
2012-09-19 19:53 ` Andrew Beverley
0 siblings, 1 reply; 3+ messages in thread
From: me @ 2012-09-19 19:16 UTC (permalink / raw)
To: netfilter
Hi all
Curious about this, but first:
iptables v1.4.15
linux 2.6.30.10-105.2.23 ( fc11 )
I have:
-A FORWARD -p tcp --syn --dport 4800 -m connlimit --connlimit-above 1 -j LOG
-A FORWARD -p tcp --syn --dport 4800 -m connlimit --connlimit-above 1 -j REJECT
--reject-with tcp-reset
I see some connections limited, but not all. I can look at the end point application to
view the inbound connections.
The end point application - users first connect on tcp port 4800, of which the
application then gives out an udp port number for data.
I haven't been able to find out how long those first tcp connections stay around. Are
they timing out, hence the second connection, or is the udp stuff what is causing me
grief?
If they are timing out, how can I keep limiting connections?
I have a range of udp ports that are given out, can I use those somehow?
Thanks!
todh
--
Todd Hackett Chief Bottle Washer
PoBox 1168
Libby, MT 59923
406.293.3843
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: connlimit troubles and questions
2012-09-19 19:16 connlimit troubles and questions me
@ 2012-09-19 19:53 ` Andrew Beverley
2012-09-19 20:00 ` Andrew Beverley
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Beverley @ 2012-09-19 19:53 UTC (permalink / raw)
To: me; +Cc: netfilter
On Wed, 2012-09-19 at 12:16 -0700, me wrote:
> I haven't been able to find out how long those first tcp connections stay around. Are
> they timing out, hence the second connection, or is the udp stuff what is causing me
> grief?
You can use the conntrack userspace application to view the connection
tracking table. This shows the timeout of each connection, which should
help you. UDP connections are stateless so will time out fairly quickly.
> If they are timing out, how can I keep limiting connections?
Try changing /proc/sys/net/ipv4/netfilter/ip_conntrack_udp_timeout
> I have a range of udp ports that are given out, can I use those somehow?
The multipart match should do the trick. See man iptables.
Andy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: connlimit troubles and questions
2012-09-19 19:53 ` Andrew Beverley
@ 2012-09-19 20:00 ` Andrew Beverley
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Beverley @ 2012-09-19 20:00 UTC (permalink / raw)
To: me; +Cc: netfilter
On Wed, 2012-09-19 at 20:53 +0100, Andrew Beverley wrote:
> The multipart match should do the trick. See man iptables.
Oops. I meant multiport of course.
Andy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-19 20:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-19 19:16 connlimit troubles and questions me
2012-09-19 19:53 ` Andrew Beverley
2012-09-19 20:00 ` Andrew Beverley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).