Home IP address

Before saying anything about IP addresses, it is important to know how the internet works, how the networks are connected to each other, and what exactly is going on. Assuming that every home has a router, each home has an IP address that is not static thus, it is changing without alerting you. In your local network, all your IP addresses have the same network part and a different host part. This means that if your local network is 192.168.1.X, the three blocks are the same for all your devices, including your router and the last one marked as X differs according to the device. Usually, the router has X = 1, your first connected device has X = 2, and so on. However, this is not a rule and it is not guaranteed. Your home (or router) may have an IP, such as 46.34.6.23, which must be used to retrieve messages and data from the internet servers. What happens now is each time you send a package from your computer to IP 192.168.1.125 on the internet, your router is responsible for changing the IP address 192.168.1.125 to the home IP 46.34.6.23.

When it comes back, it changes 46.34.6.23 again with IP 192.168.1.125. This procedure is called NAT, which stands for Network Address Translation. The following image shows an example of NAT:

In the preceding image, all the IPs that start with 10.0.0.X are hosts and the routers have local IP 10.0.0.1. and external IP 88.66.88.66. The problem here is that your home IP address changes because your contract with your ISP provider has a dynamic IP address. Either you have to change it to a static IP address or you have to find a way of knowing your home IP address. Of course, since static IP addresses are not unlimited, you have to pay some extra money, so if your budget is big enough, go for this solution. As a result, you only have to find your home IP address once and it will not change. For all the others that do not want to pay, there are not many things you can do. A solution that I have figured out is to simply write a Python code that creates a connection to a server. This server can be free or paid (in case you own one). At this point, your server knows your home IP address. So, what you have to do is simply request your home address from your server.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.77.4