You need to configure the necessary port forwarding so that your applications can connect to each other using public IP addresses. If you search google for this topic there are loads of examples:
You still listen on the internal private IP, as detected when you use TCPConnection.StartListening. The port forwarding will forward any necessary traffic from the public IP to the configured private IP.