What is a VPN tunnel? How your data travels encrypted to the VPN server, who can see what on the way, what the tunnel can't do, and what a router VPN is.
A VPN tunnel is an encrypted connection between your device and a VPN server. Everything you send to the internet travels through it. The Wi-Fi you're sitting on and your internet provider can only see that you're connected to that server. Websites see the server's IP address instead of yours, for example a German one. When people talk about a VPN connection, this is what they mean: the tunnel plus the server at its far end. It doesn't make you anonymous, and it doesn't stop malware or tracking through accounts and cookies.
what a VPN tunnel is, in four stops
The tunnel is easiest to understand if you follow a single request. Say you open a news site on hotel Wi-Fi. With a VPN, the request takes this route:
- Your device: the VPN software encrypts every data packet before it leaves your phone or laptop.
- The encrypted tunnel: the packets cross the hotel Wi-Fi and your internet provider's network. From outside, all anyone can tell is that they're heading for the VPN server. What's inside and which site you're visiting stay hidden.
- The VPN server: it unpacks and decrypts the packets, then sends your request on to the open internet as if it came from the server itself.
- The exit IP: the news site sees the server's IP address. If the server is in Germany, the site treats you as someone in Germany, whatever country the hotel is in.
The site's reply comes back the same way. The server encrypts it, it travels through the tunnel, and only your device turns it back into something readable.
how a VPN tunnel works in more detail
It starts with the connection set-up. Your device and the server check each other and agree on keys, which they then use to encrypt and decrypt. This happens automatically. From that moment on, everything passing between device and server is encrypted. Germany's Federal Office for Information Security (BSI) describes it the same way on its page about virtual private networks.
The core of it is called encapsulation. Every data packet carries a header with a sender and a destination, normally your IP address and the website's. Inside the tunnel, the VPN software encrypts the whole packet, header included, and puts it inside a new packet whose header only names your device and the VPN server. Anyone watching along the way sees only the outer envelope. The Internet Engineering Task Force describes this for IPsec in RFC 4301: in tunnel mode the outer header names the ends of the tunnel, the inner header names the real destination, and the inner part can be encrypted.
At the server it all runs in reverse: unpack, decrypt, pass on. Because every packet takes this detour and gets wrapped an extra time, a connection through a VPN is usually a little slower than one without. The BSI points that out as well.
protocols in brief
How the device and server agree on keys and wrap packets is set by the VPN protocol. You'll meet these three names in guides and settings menus:
- IPsec is an open IETF standard. The key exchange is handled by IKE, currently in version 2, IKEv2 (RFC 7296). Many operating systems have IPsec built in.
- OpenVPN is an open-source project with its own client programs for different operating systems.
- WireGuard is newer and deliberately lean. The WireGuard project says it aims to be faster and simpler than IPsec.
Which protocol a service uses doesn't change the basic principle. All three build an encrypted tunnel between device and server.
who sees what, with and without a VPN tunnel
Four parties sit along the way, and each one sees something different:
- The Wi-Fi operator, say at a café or hotel: without a VPN, it can see which servers you connect to and, on unencrypted sites, the content too. With a VPN, it sees only encrypted data going to a single server. According to the BSI, this makes eavesdropping on public Wi-Fi much harder.
- Your internet provider: without a VPN, it sees which servers you connect to. With a VPN, it sees the VPN server's address, when you're connected and roughly how much data flows. It no longer sees which sites you open.
- The website: without a VPN, it sees your IP address and so roughly where you are. With a VPN, it sees the server's address. If you log in, or it has set a cookie, it still recognises you.
- The VPN provider: it now sits where your internet provider used to sit. It sees your real IP address and where your requests go. It can't read the content of HTTPS pages either, because that is encrypted again between browser and website. That's why the BSI calls choosing a provider a matter of trust.
what the tunnel can't do
It won't make you anonymous. Your VPN provider knows your real address, and websites recognise you by your account or by cookies. According to the BSI, a VPN only makes it harder for internet companies to track your browsing. Our post on how websites still recognise you covers the usual methods.
It doesn't stop malware or phishing either. An infected file or a fake login page travels through the tunnel just as securely encrypted as everything else. Updates, antivirus software and a sceptical look at links are still needed. We answer the question of whether a VPN protects you from viruses in a separate post.
And the encryption stops at the VPN server. From there, your request carries on through the internet as normal. Whether that last stretch is protected depends on whether the website uses HTTPS.
router, company and site-to-site VPNs are something else
Search for VPN tunnels and you'll soon land on guides for routers and company networks. The technology is the same, the purpose isn't. A company VPN connects your laptop at home to your employer's network so you can reach internal drives and software. Your IT department gives you the login details and the software.
In a site-to-site set-up, two routers or gateways link whole networks, for example a head office and a branch. The individual devices don't notice a thing. A router VPN makes your home network reachable while you're out: you connect to your own router and reach the printer or network storage at home. The BSI notes that some routers can run a VPN server themselves, so every device on the home network benefits.
A VPN service works differently. You connect to a provider's server and go out to the internet from there, not into a network of your own. With a router VPN you browse through your connection at home; with a service, through the server location you pick.
when a VPN tunnel helps in everyday life
On public Wi-Fi, at a hotel or an airport, you share the network with strangers and don't know who runs it. With a tunnel, the operator and other guests see only encrypted data. Our post on how safe public Wi-Fi really is explains the risks without one.
Abroad, the tunnel decides which country websites think you're in. Connect through a server in Germany and you show up with a German IP address, which can help with banking apps, catch-up TV or shops that block access from other countries. Big streaming services often detect VPNs, though, so there's no guarantee there. When it works and when it does not is in our guide to getting an IP address from home while abroad.
With AIVPN you can connect through a server in Germany. You'll find the plans on our home page.
frequently asked questions
What is a VPN tunnel? An encrypted connection between your device and a VPN server. Your data crosses other people's networks wrapped and unreadable; the server unwraps it and sends it on with its own IP address. To websites, you then appear to come from the server rather than from your own connection.
Are VPN tunnels legal? In Germany, using a VPN is not prohibited, and the BSI even describes VPNs as a safeguard on public Wi-Fi. What you do through the tunnel still has to be legal, and some services rule out VPNs in their terms of use. A few countries ban VPNs; the BSI names China as an example. Check the rules where you live or travel. This is not legal advice.
Can the police track me even with a VPN? A VPN changes your IP address, not the location your phone's GPS or the mobile network knows. Your internet provider and your VPN provider also know your real address. Investigators can ask providers for information, including by an IP address at a given time. In Germany, for example, section 100j of the Code of Criminal Procedure covers this.
How much does a VPN tunnel cost? It depends which one you mean. Some routers come with a VPN function built in, and a company VPN is provided by your employer. A VPN service usually means a subscription. The BSI advises caution with free offers, because they are often limited and sometimes pay their way with your data. AIVPN's prices are on our home page.
in short
A VPN tunnel carries your data, encrypted, as far as the VPN server. The Wi-Fi operator and your internet provider see only that server, and websites see its IP address. Accounts, cookies, malware and your trust in the provider are questions the tunnel doesn't answer. Router and company VPNs use the same technology to bring you into a particular network instead of out onto the open internet.
If you browse on Wi-Fi you don't control, or need a German IP address abroad, connect with AIVPN through a server in Germany.





