Getting a Static IP for yourself
Day 339 / 366
Today’s blog would be a boring one for most people but an interesting one for anyone who has the same specific problem that I have.
I have been working for a US-based client for the past 2 years. They are a bit secure about their code and servers. All of it is behind firewalls. Usually, all I have to do to get access to a client’s servers or their code repositories is to share my public SSH key with them. But with this client, I have to share my IP with them so they can whitelist it. Here is what causes the issue.
You get assigned a public IP whenever you connect with any network, be it your home Wifi or your phone’s hotspot. The IP is chosen from a set of available IPs and can change when you change connections. This meant that every few days I had to get my IP whitelisted again. This was a real pain because of the timezone difference. If I faced this issue during my day, I would have to wait till their day starts before they could add my new IP.
I work sometimes from my home and sometimes from my office. So I get 2 IP addresses daily. Moreover, I use multiple machines, including my Mac Mini, my MacBook Pro and my PC. So I needed a way to get a static IP that could be constant regardless of what machine or what Wifi I was using.
What came to mind straightaway was a VPN. A quick Google search revealed that lots of VPNs offer static IP addresses at an additional cost. NordVPN is one of them, and I had used it before so that is what I went with. At around 10k, I was able to get a 16-month subscription. That included the additional cost of the IP as well. At around 600rs per month, I think that is pretty reasonable.
I did research some free ways of doing this as well. One way I found was to get a free ec2 instance on AWS and attach an elastic IP to it. Now you can set up OpenVPN on that AWS instance and connect to it from your local machine. But it was too much work and it was just easier for now to get the paid solution, so that is what I went with.