In: Computer Science
[Only answer part 2]
part 1:
What is the public IP address of your machine? How can you know
your public IP
address of the machine? (Hint: ask Google.) How does a website know
your public IP address?
Is it different from the IP address shown on the network interface
obtained by ifconfig?
part2:
Why are they different? (Hint: NAT.) What does this NAT thing do
(briefly explain it in one sentence)?
Who did it? (Hint: the VirtualBox software may do it again in
addition to your ISP's firewall or
router.)
`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
If your internet connection connects straight in to your computer, then your computer is assigned the external IP address. However, if your computer connects to a router then the computer will most likely get an internal IP address like 192.168.1.100 and your router will get the external IP address. Even though the internal IP is a different IP address, it's on the same network and all devices connected will share the same external IP.
Network Address Translation (NAT) is the process where a network device, usually a firewall, assigns a public address to a computer (or group of computers) inside a private network. The main use of NAT is to limit the number of public IP addresses an organization or company must use, for both economy and security purposes.
Internet requests that require Network Address Translation (NAT) are quite complex but happen so rapidly that the end user rarely knows it has occurred. A workstation inside a network makes a request to a computer on the Internet. Routers within the network recognize that the request is not for a resource inside the network, so they send the request to the firewall. The firewall sees the request from the computer with the internal IP. It then makes the same request to the Internet using its own public address, and returns the response from the Internet resource to the computer inside the private network. From the perspective of the resource on the Internet, it is sending information to the address of the firewall. From the perspective of the workstation, it appears that communication is directly with the site on the Internet. When NAT is used in this way, all users inside the private network access the Internet have the same public IP address when they use the Internet. That means only one public addresses is needed for hundreds or even thousands of users.
Kindly revert for any queries
Thanks.