Server configured to handle dynamic port allocation