This has been asked before and as far as I know this is not possible.
ROS uses the regular TCP/IP stack of your OS and does not do anything special to request specific ports.
You could see whether limiting the ephemeral port range used by Linux works, but know that limiting it as you are suggesting can potentially lead to problems.
Edit: see #q12206 for a related / basically a duplicate of this question.
Edit2:
Since our application is going to be in public domain [..]
do you mean public domain as in licensing, or on a publicly accessible IP?
If the latter: you probably already know, but there is no security (ie: authentication, auditing, encryption, etc) in ROS1, so make sure you take sufficient measures to protect your infrastructure.
Would a VPN not work?
Originally posted by gvdhoorn with karma: 86574 on 2017-08-07
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by ros_a on 2017-08-07:
Right, we are currently running on a VPN but just want to see if we can limit the port creation..Thanks for your response.