Quote:
Originally Posted by bajangerry
Hi Guys,
I am wondering if there is a way for me to limit the number of devices I can have connected to my Ethernet port.
|
The devices are not really connecting to your ethernet port. Client machines are connecting with an application running on your system. (Connections are tcp, but there is connectionless communication as well with udp.)
Quote:
My understanding of networking is that my Linux server has to learn MAC address using ARP
|
That's true, but you only arp to send a packet to a device that is directly connected to your subnet. (That would include your router, too)
Quote:
...so I am hoping that I can somehow control the number it learns or stop it from learning any more after 5 for instance.
|
You're talking about making a fundamental change to the tcp/ip stack, 'cause I don't think there is any way to do this now.
But even if you could that wouldn't have the effect that you are looking for. If your connections are coming in through a router, they all have the same mac address. So, if your traffic is coming in from another subnet, you could have a very high number of concurrent connections all "funneling" through the one router interface, i.e. mac address.
Quote:
If that is not an option could I possibly prevent the server from communicating with more than 5 devices? maybe somehow allow communication with the first 5 devices that connect and ignore any new ones?
|
Yes, but that would have to be implemented within the application.
Maybe there's a way to limit connections with ip tables. If there are no other responses to this post, perhaps you could post a new question asking if the number of connections to an application can be controlled via ip tables.