Is it possible to set a max number of clients on an ethernet-interface created with nmcli
?
Example: I would like max 2 devices to get a successful connection, even if I add a network-switch and connect 10 devices.
That's not how Ethernet works; there's no "connections" in ethernet; that's a concept from two layers higher.
So, you could try to make a firewall behave in a way that limits specific kind of activity, e.g. the ability to send TCP/IP packets, to a certain number of IP addresses. This would probably mean writing a daemon or BPF script beyond my experience in the Linux networking stack, to monitor the number of clients.
But: What is the number of clients?
In all honesty, this sounds like an application-level problem you're trying to solve at some deeper layer in the network. But the deeper layers of the network were never meant for access control. Simply don't. Whatever the service is your clients access, make it have authentication and a notion of a session – and simply reject if the maximum number of sessions is exhausted.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments