3

I recently read about network address port translation and I have a doubt. Lets say I have a PC(PC1) at 192.168.1.2 under a router with public address 10.74.65.11 . I have another PC(PC2) at 192.168.1.2 under a router with public address 103.14.51.21.

How do I ping PC1 from PC2? ping 10.74.65.11 would just ping the router, no? Further if PC1 has a netcat listener on port 5555 then how can PC2 connect to it?

1
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
    – Ron Maupin
    Commented Dec 15, 2019 at 3:01

1 Answer 1

3

For ping (ICMP echo request) to work across NAT, you'd have to forward ICMP (echo requests) from the public IP router to the private IP host (aka destination NAT or reverse NAT). For a normal TCP service you'd just use port forwarding (also DNAT or reverse NAT).

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.