Lets say i have a device with private IP address in one network with public IP address Then there is another device with the same private IP address in another network with public IP address of

How does the communication between these two devices work assuming I want these two devices to stay in their respective networks?

  • 1
    Never use addresses that do not belong to you. The and actually belong to other companies. If you are trying to give examples of public addresses, remember to use addresses from the three IPv4 (,, and or one IPv6 (2001:db8::/32) ranges IANA has set aside for that.
    – Ron Maupin
    Aug 8, 2022 at 12:21

2 Answers 2


The communication between devices in different private LANs doesn't work without additional setup. Duplicate addressing requires an additional workaround.

You could set up a VPN (tunnel) with additional NAT, e.g. 192.168.1.x from one side is translated to/from 192.168.251.x, and 192.168.1.x from the other side is translated to/from 192.168.252.x

Another approach with NAT uses destination NAT only by forwarding a single port from the public router to the private host.

I'd use the VPN approach but would seriously recommend renumbering at least one network or add unambiguous addresses to the required hosts.


NAT will translate the private IP on one side to address, while it will translate the private IP on the other side to If you're asking the keyword as a question, the answer is NAT. If the question is how do I do this, please check if NAT is enabled on the ISP router device.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.