IPv4 – How to Ping a Private IP Address in Another Network

ip addressipv4nat;ping

We all know that PCs on a LAN use private IP addresses such as 192.168.2.3, etc.

Now my question is, how can a PC say mine having a private address of 192.168.2.3 communicate with other LAN PC having a private address of say 192.168.2.5 because not every PCs have public addresses.

To make it more clear let's say I want to ping to your PC having an IP address 192.168.2.5.

So how will my PC or the router know to which PC it must send the message to as there can be many PCs with that same private IP address of 192.168.2.5.

Best Answer

A PC in a private IP range can't be acccesed from the public internet.

Devices in private range connecting to internet use a proxy or router/NAT device that replaces the local source IP for a single public IP address that redides in your router/NAT.

However, you can make an exception to that, opening a port in the router and allowing that traffic directed to your public IP adddress and that specific port (for example, 80) get through the router and finally to your PC.

Now your PC is public at least on port 80. Internet knows how to get to your PC using the public address and the router translate that public Ip to the private that your device uses.

An example:

Your PC has the private IP address 192.168.2.3 and is connected to an internet router that has the public IP 54.239.25.200.

Now, if you open the port 80 in the router then anyone in the public internet could connect to your PC using the URL http://54.239.25.200:80

The public internet doesn't know your private IP, they know your public IP address.

Related Topic