MongoDB replicaSet error AuthenticationFailed (code 18)

Does your idea is set up a VPN?

If no, in secondary02 I exposed container 0.0.0.0:27017:27019 to outside VPS2. And I can ping directly from container docker in VPS1 (subnet 10.5.0.1/24) with static IP 10.5.0.11 to VPS2 (178.128.xx.xxx):27019 that was exposed from container:27017.

But the opposite, I worried that Secondary can’t ping back to Primary

Please clarify your idea, many thanks!