Is it possible that the vpn is "stuck" at a certain location?

The setup:

I have wireguard server installed on my Raspberry pi (using pivpn) and I use it as a way to access my home services when I’m not home/traveling. I have a few clients; my iphone, my macbook, my partner’s iphone and ipad and a smart TV at home. I also generated a new client when I was traveling overseas and gave it to a family member to use.

On the same raspberry pi I also have PiHole for filtering and I use it as my local DNS as well.


The problem:

I traveled to multiple different countries and then now I’m back. I have used the vpn a lot because I ran out of iCloud storage and started backing up photos on nextcloud from my phone. I also used it to get past some sanctioned apps and visit websites that are blocked by the government of the country I was in.
When I got back to my apartment I noticed a few odd things going on. My google home isn’t working (tells me something went wrong) or something like the google home isn’t setup (it is and have been using it for years). The smart TV google’s functionalities also aren’t working (google assistant). Then when I was shopping for a product, I saw that the results are different than the usual stores near me. So I open incognito window and search “my location” and here I find that my location is the first country that I visited. I’m not connected to the vpn here since I’m at home at this point. I scramble deleting cache and cookies but nothing changed. I start checking out my google settings and change passwords and still nothing. Then I go to google timeline to delete the month of my locations maybe that’s what’s causing it? I can’t access the timeline because it thinks I’m in that country and in that country lots of google services are blocked. Uber eats and just uber not working, snapchat isn’t either (just as if I’m in that country).

A few days go by the same scenario. Then one day I did the same and opened incognito mode and type “My location”, now I’m in the second country I was in, which also has some restrictions on some apps. Google doesn’t tell me the precise location in that country just the city and shows me a zoomed out map of that city. Also in incognito mode, when I search for a product, it shows me their currency and stores in that place instead of local currency and local shops. I ran out of things to think about that could possibly be causing this.

I’m scared to ask this dumb question, but is it even possible that I’ve used the VPN in that country very often to connect to my home network, and now that home network thinks that it is in that location? I don’t know if that makes any sense but I’m not sure how to fix it and not sure what’s going on.

I tried clearing cache and cookies and data from firefox, safari, google chrome. It happens on all browsers. It’s probably not specifically a Gmail/Google thing because other apps are also not functioning. But also I’m not sure. I tried clearing data from the devices themselves, still no help.

On my phone when I use the data instead of the home wifi, everything works fine (apps, my location is correct etc…) but when I connect to my home network, things go weird.

Any ideas come to you for more testing to see what’s happening? I’m going to post this in r/pihole as well and maybe a networking subreddit because I still can’t pin point what is the source.

Does it simply take time for devices to catch up when you’ve been away for a month or so? Now I’m typing this, it’s not device specific thing because also the TV is acting up, so does it take a while for accounts to adjust their locations?

This happened to me, and it’s not wireguard specific, it’s a Google problem.

They determine your devices location through a variety of means, including geoip and gps from your phone.

When your phone sends some bit of data about where you are that comes from GPS, and it doesn’t match with geoip, it updates the geoip.

So when you’re on the vpn, you can accidentally teach Google that your home IP address is actually located in a different country.

It appears as though it doesn’t want to change this too often, since it doesn’t change back when you get home.

The only way I was able to fix it was by getting a new IP address for my house, which if you’re not doing anything fancy should be as simple as fully disconnecting your modem for a bit, and then reconnecting it, or possibly calling support and asking for a new DHCP assignment.

The exact same thing happened to me. Either Google or one of the geoip services have updated the location they think your ip I’d located in to be the country you visited. Not a WireGuard issue.

It will fix itself over time but you can speed it up by making sure you’ve set your location correctly in Google and checking your location in the other geoip services (you may need to do this for more than one).

And for Google specifically you can send them a request to change the location of your ip using this form:

as others have said, its google’s problem. Not you or wireguard.

Here is a fun one. I work in an satellite office In Tasmania (Australia) with a private fibre connection to Sydney. My connection to the internet is in Sydney despite my actual location.

I have chrome installed with a few profiles, My Personal Profile and my Work profile. If I Google “Where am I” on my Personal profile, Hey its shows Tasmania. Why? Well I am signed in on my mobile phone with the same account and its using THAT as my location.

If I google “Where am I” on my chrome Work profile, well that shows Sydney. why? Well there are no other ties to my account, no other devices to look at. Google using its Ip data, geo IP and a bunch of other methods can only see the connection terminate is Sydney. What Google can’t see (as its inside the corporate network) is that traffic is being piped into a private fibre cable going south for 1000km, well and truly outside of Sydney.

I thought about that as a possibility too, that Google kind of teaches itself the more I use it in a different location. But didn’t know that it could effect the IP address itself too. I’ll wait it out and see what happens. Maybe I will get a new IP (if that’s possible) if things didn’t fix themselves.

Thanks! Yeah I just wasn’t sure really what to think of with this problem. I’ll look into that form. It’s interesting to hear that it happened to people too. I didn’t even know what to research to see if it happened to someone before and what their solution was. “IP address has different location after traveling and using a VPN”? Haha I understood what’s going on but I still don’t know how I would have looked that up or worded my question.

Yeah that’s really interesting! This whole issue kind of gave me the idea to create a VM that would be very isolated from my network. I tried achieving that, but I know that it’s not very secure/isolated. So no I want to learn more about networking and maybe I could achieve that.

I just gave Whonix a shot on a vm, but so far it’s too slow to be functional as a nice “work machine” haha.

Yeah, after a few weeks it still hadn’t cleared up for us.
Fortunately if you’re using Comcast you can just unplug your modem and router and wait a few minutes, and when you turn them back on you get a new address.

If I were you, I’d just start the new IP process. It’s too annoying having everything ne wrong about where your house is.

I have been talking on discord with some peeps that works at an ISP and every someone will sign up get a static ip and then ask why Google thinks they are in, say Egypt. My ISP uses recycled ip addresses and sometimes google goes “oh the last place we saw that was in Egypt”

Sometimes someone will say "oh I appear to be in (insert other state here) and the ISP guys will apologise because they forgot to update the geoip database.

Also some isps are just plain lazy. Despite me living in the capital city of Tasmania, Telstra (the biggest ISP/mobile provider in Australia) places my GeoIp in Melbourne Victoria. Why? Because for Tasmania is classed as rural they dump us in with another state.

My ISP (not Telstra) andnas far as I know almost all isps in Australia don’t put the correct city in the GEOIP database, they go will this block of IP addresses is in “Launceston, Tasmania” for example. So my geo ip right now is 200km North in another city. No ISP (here in Australia) gets its down to the city level, but usually state is right.

I don’t think I have been on an ISP in my life that has had my geoip in the correct city.

Geo ip is the easiest way to get someone’s rough location, websites like BBC (UK) and foxtel (Australia) use it to determine your country to region block content

Wow this is interesting. I didn’t know it’s a thing. Definitely will give them a call and ask what they can do.

I live in Canada and my current location on google is Dubai and I think some apps think I’m in Damascus, because some apps that I’ve always used and they work in Canada and Dubai aren’t working right now when I connect to my wifi (Strava, Snapchat, Amazon iOS app, google assistant, etc)

Just google ip locator, pick a website, throw in your ip and see where it tells you are. If Dubai, call your isp. If Canada there is nothing they can do.

If you have a dynamic ip (like most residential internet plans do) restarting your router will give you a new ip address.

I have a static and my ISP gave me a recycled one and for a while I showed up in Egypt. Foxtel refused to serve me content. I just messaged my ISP (on Facebook messenger) and they flicked me a new one after an hour or so. (my ISP has excellent customer support) and that worked.

Just something to be aware of, with recycled ip addresses becoming more of a thing.

Good to know! I’ll try resetting it and see what happens. Although I think I did that as one of the things I wanted to do to fix this but my ip didn’t change. So I’ll contact the isp too. Thanks for the info!

Depending on the ISP setup (how they have configured their network) it’s not guaranteed to change. My ISP had to change their DNS lease time from 1min to 15min so I have to wait 15min between reboots if I want a new ip.