dedicated server security question

How do you manage security on a server with a dedicated server?

For example, you built a server with the default map in Project A and ran the server in AWS.

However, if you enter ip at the open level in the client of project B, which is not related to project A, it enters server A.

How can I resolve this phenomenon? Is it just because you use the same template map?

I also want a way to manage the version while updating the game to block other versions of client access.

The sentence can be awkward because it’s a translator.
Thank you.