While using the 4G/LTE technology as my primary internet connection for over four years now proved good enough compared to any kind of cable connection, there was a one major challenge that I had hard times overcoming for some quite time.
The thing is, most telecom providers do not offer static IP on their SIM cards because of, what I believe is called CGNAT (Carrier-Grade Network Address Translation). I for some time needed a static IP too, but at my current location, it was at least 5 times as expensive to pay for a cable connection with a static IP. Being a tinker, I though I will find a different way. And I did.
VPN and tunelling
What I found is that most common solution to get a "static IP over mobile network" is to buy a VPS, setup a VPN there and connect to the third party service via VPN from that server. That way, the third party service will always see the same IP address, one that is assigned to my VPS. It is not a static IP address per se, but for all the practical reasons, this setup serves the purpose well.
These day, setting up Tailscale network on my computer, then on my VPS and finally setting the one on the VPS as an so called exit node takes less than 15 minutes via my bad estimation. I did it a few times already and it felt definitely way faster than when I had to mess up with the OpenVPN. Tailscale setup felt to me almost like a plug-and-play and it works wonders. Tailscale is based on Wireguard while OpenVPN could run on older protocols like L2TP over IPsec (and many more).
Disclaimer: I am in no way associated to Tailscale, I am just a happy user of their free tier.
While my experience with any L2TP VPN connection could be described as "any stream, download or voice call gets stuck when turning the VPN on or off", this was definitely not the case with Tailscale. With Tailscale, I can turn the VPN on or off at any monent and all the running services are not disturbed at all. This, combined wit hand easy setup made me stick to if. And it worked for me very well for at least year and a half now, proving a quasi static IP on my mobile network, despite the fact this internet provider does not offer static IP service at all.
Troubles to come
While this all looks lame (anybody these days can buy a VPS and setup a Tailscale exit node there Peter, this could be a Reddit comment and not a blog post), not everything is OK with this setup. One particular problem I had during these almost two years is that my Google search results are now tailored for a different country, with a different language and a different market solutions, proving most my searches while having "static IP" turned on almost useless. Sigh.
Here's a list of things I tried/considered but did not solve the problem or made a new ones along the way
- Switching to a VPS in my geographic location - all of VPS that satisfy this condition cost at least four time as much as my current VPS, not worth it, just for running a Tailscale service.
- Switching to a 4G/LTE provider that offers a static IP on a mobile internet - for triple the price and quarter of speed.
- Switching to a cable connection with a static IP - already mentioned this, the cost was absolutely prohibitive.
- Changing Google language on the web - there is a guide I thought it could help.
Everything considered, I decided not to pay more and just such up the fact that my Google search is now broken most of the day. Not ideal.
Frustration to the rescue
While exploring the possibilities from option 2., which was switching to another mobile provider who did actually offer a static IP address, probably doing it the same way as I do, via tunelling, but either offering speeds from 90s or asking exorbitant prices, a sudden frustration filled my soul. How could there be no simple fix for such a problem?
Full with resentment I did another search around and actually got the search results right this time, because somehow I have gotten to this reddit comment which provided an actual solution to my problem. Bingo!
Language & Region
For the sake of completeness I copy the guide verbatim here, because I might need it in the future:
- Go to google.com
- Top-right corner, click on the Google Account [round] icon --- a menu pops-up
- At the bottom left of that menu (April 2024) is a tab called More Settings, click on it.
- It then brings you to a Google Search Settings page.
- In the left pane you'll see Privacy & Safety, and Other settings -- click on Other settings.
- At the top of the Other settings page is Language & region -- click on that, it'll take you to the Languages & region page.
- On the Language and Region page, at the bottom of the Results language & region section, you'll see Results region.
Setting the option from Current Region
to my country, Slovakia
solved
my static IP address problem for good! One another side benefit is that
when traveling, I usually buy a local data enabled SIM for work, and the
same problem happened. I could either have search results for the local
country or for the foreign country via my VPN, both irrelevant. Adding a
screenshot of what the settings look like at the time of writing:
Hope this helps someone. Enjoy!