0

I am currently physically located in Mainland China, so I use a VPN by a European university. With this VPN, I can normally access censored sites and many websites appear to locate me in Europe, but now I noticed something strange.

When I access linkedin.com with activated VPN on my PC, it forwards me to its Chinese version. So, I looked up my public IP address in several IP address lookup providers. ip.me shows my IPv4 address and locates me correctly in Europe. But other sites, such as whatismyipaddress.com, iplocation.net, etc. list my IPv6 address, which is apparently a Chinese one. Some of them list both addresses and locate them in different countries.

My university uses Cisco AnyConnect for its VPN and I use network-manager to connect to it from my Ubuntu 22.04 PC. IPv4 and IPv6 methods are both set to "automatic". I tried to connect over my room's Wifi and my phone's hotspot with the same effect. On my phone, said IP lookup services locate me in Europe.

Two weeks ago, I was able to use the international version of linkedin.com normally. So, something must have changed. The problem persists after a reboot.

What's wrong here? Does someone has an explanation? What can I do to debug this problem, gather more information and get a picture of the problem source?

5
  • Does your university's VPN provide IPv6 connectivity at all? Does AnyConnect status show a ::/0 route being configured? Commented May 28, 2023 at 13:27
  • I think so. On my Android phone, I'm using Cisco AnyConnect to connect to the VPN. On my phone, LinkedIn doesn't redirect me to its Chinese version, and IP location services locate my IPv6 address in Europe. And as I said, at least 2 weeks ago, I didn't had this problem. Commented May 28, 2023 at 14:17
  • "2 weeks ago" doesn't matter. That's a lot of time for the university IT to change their VPN configuration a million times. The question is whether your AnyConnect app shows an ::/0 route currently, while you're having the problem. Commented May 28, 2023 at 14:20
  • You're right. I probably should contact their IT. Maybe they know something. What does "AnyConnect app shows an ::/0 route currently" mean? Commented May 28, 2023 at 14:25
  • I tried again the next morning. Now, I can access LinkedIn's international website again. Strange. Commented May 29, 2023 at 3:19

1 Answer 1

0

I'm not sure there's a problem as such here.. you clearly have 2 ways to get out on the Internet, IPv4 and IPv6.

If you look up a hostname (i.e. Google.com) in DNS and it happens to have an IPv6 response back, your IPv6 connection is used (and likely preferred by your operating system) as that's the only way your computer thinks it can communicate over IPv6, if the site is IPv4 only then only the IPv4 connection can be used.

If you are not wanting to use IPv6 (and you don't need it to connect to your VPN), then disable IPv6 on your network adapter. Then everything will run over IPv4 (which your VPN software has probably set as the default route and to have the highest priority for IPv4 addresses).

If you want to not use IPv6 addresses but still leave IPv6 enabled, then set your DNS server to one that does not give IPv6 results. Your host will not try to connect to an IPv6 address then so will prefer the IPv4 adapter.

If your VPN supported IPv6 and set a default route to go out via that then your host would prever the VPN for your IPv6 connectivity also. Check to see if your VPN provider supports IPv6 and if it does that your VPN config is set to make use of it and is adding default routes to go out via that provider.

4
  • Google uses IPv6 by default, but I can access it. If this connection would go over IPv6 and the IPv6 data isn't routed over the VPN, then shouldn't the request result in a timeout? Can I look up whether IPv6 is actually used to connect to a specific website in Firefox? Commented May 28, 2023 at 14:21
  • “then shouldn't the request result in a timeout?” - No, it shouldn’t
    – Ramhound
    Commented May 28, 2023 at 16:07
  • @Green绿色 Google does not use IPv6 by default. It is the client which determines which is attempted first, not the server. By default this will be IPv6, however, there are tweeks at the client which can be used to swap them around. Commented May 28, 2023 at 21:00
  • @Bib is correct. Google has DNS answers that contain both IPv4 and IPv6.. the client chooses what to do with the DNS answer. if your computer has an IPv6 address it may choose to use the IPv6 connection, thus not go over the VPN. >nslookup google.com Non-authoritative answer: Name: google.com Addresses: 2a00:1450:4009:823::200e 142.250.178.14 If my computer does not have an IPv6 address then it will use the IPv4 address instead. The IPv4 address of your VPN network adapter is probably set with a high priority. Commented May 29, 2023 at 15:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .