I'm looking if it's possible to give rights, to only allow the use of one network interface to a specific user on a Linux distribution.
My use case: I want, for my studies, testing the interconnection between about 30 servers, all listening on the same port. For now, I can only launch 7-8 VM and on them my server scripts due to physical material limitations. Even if I'm using a low resource consumption Linux distribution (like SliTaz). The scripts are requiring that I have multiple interfaces because they listening all on the same port.
What I think it can be possible to do, is duplicate an Ethernet interface on a single VM (30 times), create 30 different users, set for each user a different Ethernet interface and launch my server script on each user. Script will listen on each interface available, either a single interface available per user. My script is about 5Mo in RAM, so I don't have to launch 30*128Mo of VM and I can more easily create users, than duplicate VM, set MAC address and IPs on each VM.
I did see that it's possible to create multiple interfaces. How can I set rights on anetwork interface for a specific user? Or is there a better solution for this problem?