LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-25-2005, 11:21 AM   #1
ewerta
LQ Newbie
 
Registered: Jul 2005
Posts: 1

Rep: Reputation: 0
Need a way to limit TCP connections


Greetings,
I am relatively new to the networking systems available in Linux and I was wondering if there is a built in way to limit the number of simultaneous incoming TCP connections to a given port.

For example, if I only wanted 10 simultaneous telnet/TCP connections to port 7500, is there a way to do this using iptables or some other built-in system?

Also, is there a way to log when a TCP connection is established to a given port, and how long it remains connected?

Please note, it is not possible to have the application running on port 7500 log when a connection is established, nor is it possible to have that application limit the number of connections made to it.

The purpose of this system is to limit the number of connections made to a customers application at the same time.

Thanks for your help in advance!
 
Old 07-25-2005, 03:54 PM   #2
nixcraft
Member
 
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379

Rep: Reputation: 30
Yup you can do this with iptables, it provides lot of stuff using the recent and –limit-rate and –limit-burst. You can get info on this via offical web site http://www.netfilter.org/documentati...ons-HOWTO.html and
an example http://www.cyberciti.biz/nixcraft/vi...it-number.html

Hope this helps!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to force kill TCP connections minil Programming 3 04-19-2005 06:04 AM
limit connections Smokey Slackware 1 10-13-2004 02:22 AM
Limit on Telnet Connections ** Urgent powerhouse Linux - Software 3 03-31-2004 07:24 AM
half-open tcp connections r_m_carlsson Linux - Networking 1 02-03-2004 05:51 AM
How to limit the number of TCP connections for a certain port? mussons Linux - Security 1 01-28-2004 06:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration