0

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

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

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

2 Answers 2

1

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.

0

NAT will translate the private IP on one side to 20.156.2.14 address, while it will translate the private IP on the other side to 70.124.89.1. 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.