Just a bit puzzled about ports, no doubt because of ignorance. I opened TCP and UDP ports 22000 in the NAT routers of 2 computers connecting across the internet. When I go into the UI section “Remote Devices” one of them shows IP:22000 where IP is the correct IPv4 for the remote device. But going into the other one (using remote access software as if I’m actually at the other computer) it shows IP:56789 (example) which doesn’t correspond to any open port. How can this port be in use?
In the connection settings of both I have “Enable NAT traversal”, “Local Discovery”, “Global Discovery” ticked but not “Enable Relaying”. Sync Protocol Listen Addresses are set as default.
The connection, at least for TCP, is always initiated on one side. The “host” might be listening on destination port 22000, but the outgoing packets are sent with a random source port usually, like you are seeing. The roles could be exchanged, depending on which side succeeds first with its connection attempt. I think the same applies to UDP based (QUIC) connections, except maybe when firewall hole punching is at play.
OK. Thanks for the explanation. I was concerned that it might be somehow using some less efficient route but I suppose that given it has the correct IP address and relaying is not ticked it must be communicating direct.