0

I discovered recently that there is two types of ip, i.e. the Public IP and the Private IP. I know that the Public IP is the one the external world can see and the Private IP is local to our network. It is distributed by the router. But which IP do we need to use the SSH someone.

Suppose my Public IP is 47.144.221.167 and my Private IP is 192.168.1.19 (Be aware that they are fake ip addresses).

  1. Is my Private IP unique? In other words, can my Private IP be distributed by another router?
  2. If I want to SSH another computer, do I need to use the Private IP or the Public IP?
  3. If someone tries to track my IP from China, will he get my Private or Public IP?
  • This is a classic Google or Wikipedia question about basic networking. It does not seem to be about Ubuntu. – user535733 Mar 26 '20 at 17:20
  • 1. yes and yes but only in the private IP ranges within one or more private networks connected together locally. 2. If within your private network/s use private IP otherwise use public IP. 3. Public for sure but they might get your private IP as well if the application you use reveals it ... ie mail clients/servers or web browsers ...etc. – Raffa Mar 26 '20 at 17:24
2
  1. Your private IP is distributed by your local router so it is unique to your device on your LAN (Local Area Network). So another device on another home network might use the same IP address but you won't know because you can't contact another device using their Private IP on a different network.
  2. It depends on where that second device is located. If it is on your LAN then you use the Private IP, if it is on a different network then you would use the Public IP.
  3. If they are tracking your IP it is your Public IP address. If they gain access to a device a device on your network then they could determine both.

Also please redact your IP addresses from your question if they are legitimate addresses for your equipment.

  • 1
    They are fake ip addresses – J.Doe Mar 26 '20 at 17:24
  • Ok that's good to hear – Robby1212 Mar 26 '20 at 18:22
1

Is my Private IP unique? In other words, can my Private IP be distributed by another router? Ans: No. It is a non-routable address.

If I want to SSH another computer, do I need to use the Private IP or the Public IP? Ans: Public address.

If someone tries to track my IP from China, will he get my Private or Public IP? Ans: Anyone outside your private network, China or Connecticut, will get your Public address.

  • 1
    the private IP is rout-able within private sub-nets via local routers or remote routers if VPN is applied. – Raffa Mar 26 '20 at 17:27

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