Query on Public IP address

Issues related to configuring your network
Post Reply
Boopalan
Posts: 8
Joined: 2022/02/07 20:53:59

Query on Public IP address

Post by Boopalan » 2022/02/07 21:28:38

With Vmware player, I installed CentOS, on my Windows PC.

On checking, could see Public IP address of my Windows PC and CentOS are same.

In Windows PC, could see DHCP is enabled. So I might have dynamic IP.

Is is possible to have a different Public IP address on CentOS, than Windows PC?

lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: Query on Public IP address

Post by lightman47 » 2022/02/07 21:50:22

That is your address from the "outside world' for your cable modem or whatever device that connects you to your ISP.
As far as different internal I.P.s for a dual/multi-booting device, I imagine you can do that - but they'll be INTERNAL (local network) I.P. assignments. Your ISP connection will still have that 'public' address.

Boopalan
Posts: 8
Joined: 2022/02/07 20:53:59

Re: Query on Public IP address

Post by Boopalan » 2022/02/08 22:09:59

Got your point. I thought, public IP addresses belongs to the respective computer system.

Thanks for clarification.

Also I observed, My router public IP address & The public IP address which I got via sites like "https://www.whatismyip.com", are different.

After little search, I understand, It might be because my router/ISP settings on NAT/Double NAT.

lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: Query on Public IP address

Post by lightman47 » 2022/02/08 22:16:35

If your 'router' address is different from your 'public' address, that would lead me to believe your router is behind another device (perhaps a cable modem) that gets the public address. That public address is the very first device the Internet sees from outside.

If this is indeed the case, then your router is probably getting it's (internal) address from your modem.

User avatar
jlehtone
Posts: 4532
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Query on Public IP address

Post by jlehtone » 2022/02/09 09:18:05

Is the "public address" of your router really "public", or is it in these "private" address ranges: https://en.wikipedia.org/wiki/Private_network


If there is NAT (aka source NAT, sNAT, or masquerade), then "outside" can reach a port "inside" only if the router that does NAT offers "port forwarding" (aka destination NAT, dNAT). If you do not have control of the device that does NAT, then you can't enable port forwarding in it.

I do know ISP's that do NAT and give private addresses to their clients (and then you have double NAT, since you want to separate your home LAN subnet from the subnet that the ISP offers).

I also know ISP's that can afford to offer more than one public address for each client.

My ISP offers both IPv4 and IPv6. My router does NAT on the IPv4 traffic, but all my devices do get public IPv6 addresses (if they support IPv6).
The router does have firewall to filter both IPv4 and IPv6 traffic.


DHCP is "dynamic", because it can propagate network configuration changes to clients; network config can be changed centrally and without reboot. Typical home DHCP server offers addresses from "dynamic pool", but most can be configured to offer "persistent address"; device always gets same, predictable address. Even the "pool" tends to offer same address to device as it had given to that device in previous lease. I prefer to remove the pool completely and use only persistent addresses and only for known devices.

ISP might use primarily an address pool, but sell persistent address as separate "product". ISP's do filter traffic too; the fine print on consumer contract might say: "thou shalt not have a server". Again, for business-price you get address for "server".

Boopalan
Posts: 8
Joined: 2022/02/07 20:53:59

Re: Query on Public IP address

Post by Boopalan » 2022/02/15 20:35:45

Yes, the "public address" of my router is really "public" only. It is not 10.x.x.x OR 172.x.x.x OR 192.x.x.x

Actually it is JioFi network router, from India.

I tried enabling port forward. It worked, but only within Jio network, but not outside of it.

Post Reply