Why is my public IP address the same as my private IP address? - networking

It should be impossible right? But I used ipconfig and it is exactly the same as when I use a website to check my public IP address. They both start with 76.

It is possible to have public IP the same as your private one of course.
It seems like you are plugged directly into your ISP's network, without any NAT or other router in your way.

Related

How we can access a localhost of a computer through its public IP if some other devices in the same network also have the same public IP?

I want to access localhost of a computer but other computers in the same network also has the same public IP. Can we access its localhost host by knowing both(public and private) IP address of that computer. I want to connect to it directly(not through any software like ngrok or VPN).
Thanks in advance.
You can only access localhost on the computer itself. Localhost refers to 'this node' by definition.
When communicating on an internal network you usually use the private IP addresses, not the public one(s). Connecting to a computer with a private IP behind a public IP requires reverse NAT aka destination NAT aka port mapping.
Connecting out from and right back into the same network through NAT may require a special firewall setup aka hairpinning. It's usually easier and faster to use split-brain DNS and resolve the public name to the private IP address of the device.

Why can't I access a local file from my public ip address if I can from my private ip address?

I'm able to open the website being served on port 4568 on 127.0.0.1 (localhost) and my private ip address, but I can't seem to do so on my public ip address. I've tried to access the website by typing :4568 after my public ip like I did for my localhost and private ip.
Is it possible to open a site running locally on my computer through my public IP? If so, how? If not, why not?
NOTE: I'm not exactly clear what tags are appropriate. Feel free to add or remove any you deem inappropriate.
You are likly behind a NAT. What this means is that your public IP address and private IP address are not necessarily mapped to each other fully. To explicitly map your application to your public address, try the following:
Go to your modems management page
Look for a 'Port Forwarding' tab (might be under an advanced or
router menu)
There will probably be two or three field to enter:
The port on the public ip address to forward traffic from
The IP address to forward traffic to (your private IP)
(might be there) The port to send it to on the private IP
Assuming this works, all traffic going to your public IP address on that port will now go to your private IP address.
WARNING This is a simple rule and everyone on the internet can now access that port
Also make sure your web server is listening on 0.0.0.0 (all IP addresses) and your local firewall is allowing remote connections on the port in question.

NET: Implementation in C#

I have a router that runs on two VM. The second VM has IP address of 9.1.2.2
I have look IP address overview,
Private networks should use private network addresses like 192.168.x or 10.x. It is not a good idea to use a public IP address that has not been assigned to you. At this moment reverse DNS seems to say that 9.1.2.2 is unassigned but that doesn't make it safe to use.

Why is my IP adress different when displayed by different methods

I am new to all this, so I am sorry if the question is stupid. I am learning about networking and I want to find out IP address of my own computer.
When I try to display it through ipconfig, my router's configuration page and by simply googling, I see different IP-address
Thank you in advance for help
in ip-config it starts with 10. ...
in router's conf page 192.168.1. ...
when googling 213. ...
ipconfig will give you the address of your machine. This will be some private IP address. Your router will have two IP address - One public and one private. All machines in your local network (house probably) will talk to the router via its private address, while everything out in the Internet talk to your router via its public address.
So, ipconfig provides the address of your computer, your router's config page shows its private address, and Google will show you your router's public address.
Some terms to look up: Look up Public vs Private IP addresses and how NAT works and this will all make more sense.

network address translation and public IP address

can one NAT have multiple public IP addreses for same end hosts behind it?
also
can one NAT have multiple public IP addreses one for each end hosts behind it?
Yes, and yes. NAT potentially represents a complete abstraction between private and public IP addresses; a single private address could make two outgoing connections and use a different public IP for each.
Whether that's useful is questionable, particularly since some protocols assume that a single application will always have the same public-facing IP address. And I don't know why you'd ever do 1:1 NAT. But you could, if you really wanted.

Resources