I have a C++ Server socket who runs within a virtual machine. I have enabled the port forwarding for the port where the server socket is listening. However, due to dynamic binding I do not know on which port the communication will be done. The OS i have within the virtual machine accepts dynamic binding in the following range:
cat /proc/sys/net/ipv4/ip_local_port_range
32768 61000
Is there a way (like a parameter to the bind/accept) in which i could specify to my server socket that he has to reduce this range to few ports ie: [35000 35010]
Cheers