If you can connect after disabling the firewall, then you can adjust the firewall rules on your systems to allow the traffic to pass.
However, these ports can be set to a specific static port for various reasons, such as firewall rules, business policies, and so on.