by Fredy Künzler
Reading time: 5 Minuten
GeoIP: How the internet recognises your location
It is well known that there are countless applications that evaluate and display the position of users on the basis of GPS data. For example, consider Google Maps, navigation systems in vehicles, or hiking apps such as Swisstopo. This also includes public transport apps such as FAIRTIQ or EasyRide, which ensure that tickets are charged correctly. Today, it is hard to imagine that, less than 20 years ago, people were still travelling with a compass and a 1:25,000-scale map.

Source: swisstopo
But GPS is not the only way to record a position, even if it allows very precise localisation outdoors. For many applications, it is sufficient to reliably determine only the country and, in some cases, the region. It is therefore important for the advertising industry that adverts are only shown to the appropriate target group. Film and television rights have also always been a nuisance. TV stations worldwide only buy broadcasting rights for their respective target markets. This means that people outside the designated region will at best see a message saying “You are outside Switzerland”, or receive nothing but pixel mash or a black screen. In recent decades, the film industry in Hollywood and elsewhere has released new blockbusters more frequently than fans would have liked: the original English version was often shown in the USA months before the dubbed version in Europe. At the time, there were even DVD players with a country code that prevented DVDs with the “wrong” code from being played.
The history of hacking attempts is long and resembles a game of cat and mouse. Whenever a new method of receiving encrypted TV channels via satellite became known, a new type of encryption or prevention soon followed. As always, the driving force behind the content industry was and is money. The Swiss company Kudelski is famous for its encryption technology with the product Nagravision, which is used worldwide. Their innovation has disappointed many a fan of a certain film or series because reception was prevented. It took a long time for legal distribution channels such as video-on-demand or music streaming services to curb widespread piracy.
However, Netflix, for example, also has different catalogues depending on the country. There are certainly cultural and linguistic reasons for this. It is already apparent within Switzerland that residents of French-speaking Switzerland generally do not want to watch films in Swiss-German dialect, while German-speaking Swiss rarely like political talk shows from French-speaking Switzerland. After all, the streaming portal Play Suisse does not impose any restrictions on SRG: all content is equally accessible throughout Switzerland.
But only in Switzerland: Play Suisse content is actually blocked abroad. However, if you are resident in Switzerland and have a Swiss telephone number, you can at least activate access in EU countries. If you access Play Suisse from Germany, for example, the question “Are you abroad?” appears.

Source: Play Suisse
This means that Play Suisse and SRG are comparatively user-friendly when it comes to accessing content outside the country. Other content owners, such as the Swiss Football League (SFL), are significantly more restrictive. In Switzerland, Blue (Swisscom) has secured the broadcasting rights to the Super League and sells access as pay TV for CHF 34.90 per month (annual subscription) or for CHF 49.90 if viewers don’t want to commit to a longer-term subscription. That’s a hefty sum for someone who perhaps only wants to watch two or three games a year on TV and otherwise supports their favourite team in the stadium, whether at home or away.
For fans outside Switzerland, Germany, France, Italy, Austria and Liechtenstein, the SFL offers the website https://tv.sfl.ch/ – which is significantly more granular and therefore considerably cheaper. A single match can be booked for EUR 5; a monthly subscription for a favourite team costs EUR 9.90. This works without any problems, provided the user is located in the relevant country. However, if they are in Switzerland or the neighbouring countries mentioned above, they will simply receive the message “Content not available”, which is of course rarely in the interests of football fans.

Source: SFL TV
But how does the SFL or other content providers actually know which country a user is in, especially when accessing content on a laptop that does not support GPS reception? The answer is: GeoIP. Databases are used to assign IP addresses to a specific country and in some cases even to a specific location. The accuracy can be remarkably high: in individual cases, the coordinates provided by MaxMind were only about 100 metres away from the actual residential address.

Source: MaxMind
The content provider’s web server checks the client’s IP address on access and compares it with a GeoIP database. Depending on the country, access is granted or the information “Access blocked” is displayed. MaxMind is of course not the only commercial GeoIP provider, but it is probably the best known. Large CDN (Content Delivery Network) networks such as Akamai operate their own databases in order to deliver the content correctly for each country – see https://geolocation.akamaized.net/

Source: Akamai
Sometimes, it can make sense to travel virtually to another country. There are legitimate reasons for this, for example if certain content, such as German-language children’s films that you would like to watch during your holiday abroad, is not available in the Netflix streaming catalogue at your holiday destination. However, access can be enabled with a Squid proxy server on a virtual Linux server.
Most users first think of a VPN service when they want to temporarily use the IP address of another country. One of the best-known providers is NordVPN, which provides VPN servers in almost all parts of the world for a monthly fee. This makes it easy to “travel” from country to country and “borrow” a local IP address to gain access to the desired content. However, the use of a VPN service is not completely problem-free, particularly with regard to data protection. And there is no guarantee that access will actually work. This is because content providers and VPN service providers are often engaged in the cat-and-mouse game described above, although no longer with the same intensity as during the days of rampant piracy. After all, Netflix subscriptions are paid for today. This blog cannot say which commercial VPN provider is the best. At this point, reference should therefore be made to other sources.
For private use, do-it-yourself is often a better solution than commercial VPN services. Many broadband routers allow users to configure their own VPN access. So those who travel abroad frequently can set up a VPN gateway on their home Fiber7 connection to ensure that they can surf the web as if they were in Switzerland at virtually any time. (Note: Easy7 is not suitable for this, as CGNAT is used here).
Alternatively, a VPN gateway or web proxy on a virtual Linux server abroad is also an option. So the customer rents a Virtual Private Server (VPS), sometimes also called a root server, from a commercial provider in the desired country and configures the desired VPN or proxy application on the pre-installed Linux. Normally, the lowest-performance offer for a few euros or dollars a month is sufficient for this purpose. The least expensive VPS server offer with a Swiss IP address is currently available from Infomaniak for three francs per month.
The advantage of a do-it-yourself solution: the IP address is not shared with other customers of a commercial provider. The risk of being blocked by the desired content provider one day is therefore relatively low. A DIY solution is also preferable in terms of data protection. But of course, this isn’t suitable for everyone – it’s important to have a reasonable understanding of Linux and at least some experience with tutorials. Or you can engage the most tech-savvy person in the family or circle of friends and persuade them to configure and maintain the VPN or proxy function in exchange for usage rights.
While the use of a VPN is relatively well known, web proxies are rarely used. They are quite useful for streaming services from “virtual” foreign countries. Champions League matches that are only available in Germany on Amazon Prime, for example, can also be accessed from Italy thanks to a German proxy server. Unfortunately, however, the German commentator can’t be replaced by an Italian one at the touch of a button. A Squid proxy can be set up quickly with the help of numerous tutorials. It’s only necessary to configure the authorized IP addresses or a password to prevent unwanted access by third parties, which can occur more quickly than might be expected. Firefox offers the option of configuring the Squid proxy individually for each browser instead of system-wide. This allows the browser to be used for streaming via the proxy while the primary browser works without a proxy (Settings → General → Network Settings). With VPNs, this kind of separation is only possible with considerable effort.

Source: Init7
And last but not least: websites that display the IP address currently in use are always helpful. This allows you to check at a glance whether the proxy or VPN is actually active. We also offer this kind of IP address test: https://www.as13030.net/ip-address-test.php.

Source: Init7