You can configure and limit port usage for situations that involve firewalls, for example, between client-server or server-server connections.
Be aware of possible connection problems that can result from running a firewall on your machine.
Make sure your port settings are configured correctly for firewalls.