Using WireGuard® for Privacy Protection - IVPN Help (2024)

    WireGuard® is a new VPN protocol that utilises state-of-the-art cryptography. It aims to be simpler and more performant than IPsec and OpenVPN. This promises huge benefits for its users:

    • Much easier to audit, due to its small codebase
    • Faster speeds
    • Easy to configure
    • More reliable: it supports user roaming and has less overhead

    If you’re not familiar with it, we highly recommend reading the excellent white paper on WireGuard, written by its author, Jason A. Donenfeld.

    Security vs Privacy

    WireGuard was not designed with commercial VPN providers who offer privacy services in mind. As such, it leaves certain issues (e.g. IP address assignment, key distribution etc.) to the implementers.

    The border between privacy and security is very blurred by nature and needs to be specifically defined, so as to understand, where WireGuard makes compromises that need to be addressed.

    We define the split as the following:

    • The security of the protocol is concerned with protecting the data in a tunnel from being accessed by adversaries: either by breaking the encryption, MITM attacks, or by any other means, no matter how complicated.

    • Privacy is concerned with whether an adversary can learn anything about you, your communication or any party you’ve communicated with. It has more to do with the metadata rather than the actual data.

    Privacy can be violated, even when security is rock solid. For example, when the fact that two parties communication can be determined. Or when a certain piece of information about a party becomes known after the communication took place. However, it should be noted that, if security is weak, privacy cannot be guaranteed at all.

    WireGuard provides a very high level of security, let’s take a look at where it is not particularly effective at with protecting privacy, and how we at IVPN fix these issues.

    Problem 1: The public IP address of a peer is stored in memory indefinitely

    If you run WireGuard command line utility wg(8) on a server with root privileges, you will see entries similar to this:

    peer: TmljZSBUcnkgISA6KSB3b3J0aCBjaGVja2luZw==endpoint: 198.51.100.23:39812allowed ips: 192.0.2.131/32 latest handshake: 22 hours, 42 minutes, 5 seconds agotransfer: 1.99 KiB received, 2.76 KiB sent

    As you can see, WireGuard is associating public IP address of a peer (endpoint field in the output above) with the key.

    This is not really any different from any other VPN protocol: it needs to know where to send encrypted packets to.

    What is different is that other protocols keep track if the peer is active. When a peer is determined to be inactive, or if the connection is closed, other VPN protocols purge the peer information. WireGuard doesn’t do this.

    WireGuard doesn’t really have a concept of a connection, it is connection-less, peers can stop exchanging data at any time and expect to be able to continue at any point in the future. This helps, for example, when a peer wakes from sleep mode or when a user is roaming and switches from mobile to Wi-Fi.

    This is not optimal for privacy, however, as a peer’s IP address may be stored long after it stops sending data to the tunnel.

    Solution

    The WireGuard protocol uses sessions to manage various aspects of the peer data exchange, sessions last maximum for 180 seconds.

    Internally WireGuard stores the time of the latest handshake so that it knows what to do when exchanging data with a peer:

    • When fewer than 120 seconds have elapsed, just send data as the session is still active

    • 120 to 179 seconds have elapsed, send data and interleave a handshake to renew the session.

    • More than 180 seconds have elapsed, handshake to renew the session before data is sent.

    Knowing this, we can solve the issue of WireGuard holding on to peer information indefinitely and reduce it to a minimum.

    When it is reasonably clear that the remote peer has stopped talking (i.e. latest handshake is more than 180 seconds ago), the peer’s configuration can be deleted and then reinstated.

    This removes the peer information and configures the server to wait for an incoming handshake. The example above becomes:

    peer: TmljZSBUcnkgISA6KSB3b3J0aCBjaGVja2luZw==allowed ips: 192.0.2.131/32

    We handle this within our “key management daemon” – specially developed software which manages keys on our gateway.

    It scans the list of peers for those that have the latest handshake time greater than 180 seconds ago and deletes/reinstates their configuration.

    Our KMD interacts directly with the WireGuard kernel module to manage the information it requires (we don’t write config files).

    Summary

    We don’t store connection data or metadata about your keys and we take care to ensure that we don’t hold on to data any longer than is required by the WireGuard protocol for optimal usage.

    Problem 2: WireGuard doesn’t provide a mechanism for tunnel IP address allocation.

    In order to operate, each tunnel requires an internal tunnel IP address to be assigned on both ends, regardless of which protocol is used.

    Protocols like OpenVPN and IPSec rely on DHCP to assign a dynamic tunnel IP address during connection to the peer.

    However, as discussed above, WireGuard doesn’t have the concept of connections. And because of its architecture, it cannot rely on mechanisms like DHCP for tunnel IP address assignment to the peers.

    In WireGuard, the responsibility to allocation tunnel IP addresses in shifted away from the protocol and to the user. In some environments, a simple static address assignment may be possible.

    However, this doesn’t scale well to large numbers of clients. A mechanism is required to dynamically generate tunnel IP addresses and distribute public keys prior to the connection being made.

    This mechanism should be implemented in a way that the privacy of customers cannot be compromised.

    Solution

    At IVPN, we solve this by assigning a random tunnel IP address for each key provided.

    It works like this:

    1. You generate a key pair.
    2. You provide us with the public key.
    3. We generate a random IP address from a huge private network range and return it back to you.
    4. We distribute both, your public key and the generated IP address to all our gateways.
    5. You configure your client with the private key you generated in step 1 and the IP address we returned in step 3.

    All of these steps are done automatically in a fraction of a second when using our apps.

    Since the private network range is huge, we can allocate random addresses from it and not worry that we will run out of them. Neither do we have to reclaim any previously-used internal IP addresses to avoid exhaustion.

    IP Addresses are deleted together with keys, either by apps (when you log out), or alternatively when your account gets suspended or cancelled or by you through our website.

    Summary

    We allocate random tunnel IP addresses which we provide to you or our Apps to complete the WireGuard connection setup. There is no need for us to keep track of the usage of these addresses nor reclaim them since they are allocated from the huge private network range.

    For added privacy, we provide a mechanism to rotate these addresses at your request, as described below.

    Problem 3: Without real dynamic IP address allocation, users can be tracked under some circ*mstances.

    As discussed in previous sections, WireGuard relies on statically assigned tunnel IP addresses, while other protocols like OpenVPN and IPSec, can change the tunnel IP address on every connection.

    The private tunnel IP address should never be seen on the public internet, as it’s always secured by the protocol’s encryption.

    If an adversary monitors the traffic, there is no way to know that the packet from a specific user on the public internet is associated with a particular device or internal tunnel IP address.

    However, software running on the user’s computer may actually see your tunnel interface and the associated internal IP address.

    Another option to extract this tunnel IP address is through WebRTC if it is enabled in a browser etc.

    If extracted, this can serve as an identifier, when other measures are not implemented.

    Solution

    All IVPN clients apps support periodically changing IP addresses. This process is implemented together with key regeneration (see below).

    By default, this happens once per day and can be changed from within the app’s settings to up to once every 30 days.

    Summary

    Your tunnel IP address is no longer static and it becomes more difficult to track a user if it gets exposed through WebRTC or by software.

    Problem 4: WireGuard doesn’t offer “identity-hiding forward secrecy”

    As discussed on the WireGuard mailing list, the WireGuard protocol doesn’t offer identity-hiding forward secrecy.

    If an attacker records all traffic to/from a server, then breaks into the server and extracts the WireGuard private key from it, they will be able to correlate traffic with specific users.

    Solution

    All IVPN client apps support periodic, automatic key regeneration which also changes the internal IP address. During this process, the client creates a new key pair and uploads a new key to the server, and we provide the client with a new IP address.

    The new key is distributed to our servers and the client switches to using it and the new IP address. This is designed to be completely transparent to the user.

    The default is to regenerate the key once per day. It can be changed in the app’s settings to be regenerated between once a day to once every 30 days.

    Summary

    Previous sessions cannot be identified or tracked.

    Related Articles

    • AntiTracker FAQ
    • Do you allow P2P / BitTorrent / torrents downloading?
    • What is the default encryption cipher for VPN connections?
    • Does IVPN support pfSense firewall?
    • Answers for "18 Questions to ask your VPN Service provider"

    Still have questions?

    Get in touch and we'll get back to you in a few hours.

    Contact support

    Interested in privacy?

    Read our latest privacy news and keep up-to-date on IVPN services.

    Visit IVPN Blog
    Using WireGuard® for Privacy Protection - IVPN Help (2024)

    FAQs

    Using WireGuard® for Privacy Protection - IVPN Help? ›

    WireGuard® only uses static IP addresses. This means you'll always have the same IP address on a specific server. Dynamic IP addresses change every time you connect to the internet, which is better for privacy. Less privacy than OpenVPN.

    Is WireGuard good for privacy? ›

    WireGuard® only uses static IP addresses. This means you'll always have the same IP address on a specific server. Dynamic IP addresses change every time you connect to the internet, which is better for privacy. Less privacy than OpenVPN.

    Does IVPN use WireGuard? ›

    The IVPN App for all platforms supports OpenVPN and WireGuard connections. The IVPN App for iOS also supports IPSec with IKEv2 connections.

    Does WireGuard hide my IP address? ›

    When you connect to our VPN server via WireGuard, your device can only see the IP address 10.2. 0.2, and the website you visit can only see the public IP address of our VPN server. Your true IP address remains secure and private, just as it would with OpenVPN.

    Does WireGuard store IP addresses? ›

    OpenVPN is better than WireGuard in terms of privacy. Because WireGuard may cause privacy problems. While OpenVPN doesn't keep any personal information, such as IP addresses are stored by WireGuard on the VPN server until it reboots.

    Can WireGuard VPN be tracked? ›

    WireGuard does not provide obfuscation, meaning that internet service providers (ISPs) can see when you are using it — although, of course, they can't see what you're using it for.

    Can WireGuard VPN be detected? ›

    Yes, WireGuard can be detected. It doesn't do VPN obfuscation, mostly because of the insistence on UDP transmission mode.

    How secure is IVPN? ›

    According to the website, they use AES-256 encryption with 4096-bit RSA keys. This is top-of-the-line, military-grade security. No one can crack it, and no one has been able to use a brute-force attack to defeat it either. IVPN uses three VPN protocols: WireGuard, OpenVPN, and the IKEv2.

    Is anything better than WireGuard? ›

    There are no known security flaws in either protocol. If security is your topmost priority, the conservative option is OpenVPN. It has simply been around much longer than WireGuard, gone through more third-party security audits, and has a far longer track record than WireGuard.

    Do you need a VPN for IVPN? ›

    Using a VPN should be part of an overall strategy to protect your privacy - but only if you trust the VPN provider more than your ISP.

    Can police track IP address with VPN? ›

    The good news is that there is almost no way to track live, encrypted VPN traffic. Law enforcement can only obtain data, if available, about websites visited and so on. Otherwise, hackers and snooping government agencies are generally blocked by the fact that the data is encrypted.

    How to make WireGuard more secure? ›

    You can add another layer of cryptographic protection to your VPN with the PreSharedKey option. Its use is optional, and adds a layer of symmetric-key cryptography to the traffic between specific peers. Note: Both sides need to have the same PresharedKey in their respective [Peer] sections.

    What is the best VPN to hide IP? ›

    The Best VPN Services of 2024
    • NordVPN - Best VPN for Privacy.
    • Surfshark - Best VPN for Security.
    • Private Internet Access VPN - Best VPN for Windows.
    • Hotspot Shield - Best VPN for Netflix.
    • Norton Secure VPN - Best VPN With Dynamic IP Addresses.
    • IPVanish - Best Customer Support.
    • ExpressVPN - Best Encryption.
    Jul 10, 2024

    Can WireGuard be trusted? ›

    Is WireGuard secure? WireGuard is considered by many to be one of the safest, most secure VPN protocol options available today. Simplified design using less code equals fewer bugs and security vulnerabilities, while WireGuard's faster state-of-the-art cryptography employs superior default security settings.

    Is WireGuard vulnerable? ›

    One of the key advantages of WireGuard is its minimal attack surface. The protocol's codebase is remarkably small, consisting of only a few thousand lines of code. This lean design reduces the potential for vulnerabilities and makes it easier to audit and maintain the codebase.

    Which is better site to site WireGuard or IPsec? ›

    Compared to IPsec, the WireGuard connection has a 20% lower latency and a 15% higher throughput. When it comes to performance, WireGuard usually performs better than IPSec and even quicker than other VPN protocols like OpenVPN.

    Is WireGuard HIPAA compliant? ›

    HIPAA requires that PHI be encrypted both in transit and at rest to prevent unauthorized access: In Transit: Fly.io uses WireGuard to encrypt data as it moves between networks, ensuring compliance with HIPAA's transmission security requirements.

    Is WireGuard not secure? ›

    WireGuard has forward secrecy of data packets, thanks to its handshake, but the handshake itself encrypts the sender's public key using the static public key of the responder, which means that a compromise of the responder's private key and a traffic log of previous handshakes would enable an attacker to figure out who ...

    Is WireGuard safer than OpenVPN? ›

    While WireGuard is generally faster, OpenVPN provides heavier security. The differences between these two protocols are also what make up their defining features. We've taken a closer look at each so you can really understand how they work for you.

    Top Articles
    Assumable Mortgage: What It Is and How It Works | LendingTree
    How to Navigate a Multiple Offer Situation as a Buyer (2023 Update) | @home
    Fighter Torso Ornament Kit
    Craigslist Myrtle Beach Motorcycles For Sale By Owner
    Shoe Game Lit Svg
    Ffxiv Palm Chippings
    Dee Dee Blanchard Crime Scene Photos
    Craigslist Dog Sitter
    Scentsy Dashboard Log In
    Strange World Showtimes Near Amc Braintree 10
    Bill Devane Obituary
    Chicken Coop Havelock Nc
    The fabulous trio of the Miller sisters
    Learn2Serve Tabc Answers
    Dc Gas Login
    Samantha Lyne Wikipedia
    Pizza Hut In Dinuba
    Costco Gas Foster City
    Band Of Loyalty 5E
    Is The Yankees Game Postponed Tonight
    Halo Worth Animal Jam
    Gayla Glenn Harris County Texas Update
    Wbiw Weather Watchers
    Dragonvale Valor Dragon
    Sister Souljah Net Worth
    Accuweather Minneapolis Radar
    Hannaford Weekly Flyer Manchester Nh
    4Oxfun
    Taylored Services Hardeeville Sc
    Primerica Shareholder Account
    Home Auctions - Real Estate Auctions
    "Pure Onyx" by xxoom from Patreon | Kemono
    Hermann Memorial Urgent Care Near Me
    The Complete Guide To The Infamous "imskirby Incident"
    Merge Dragons Totem Grid
    Mta Bus Forums
    Nobodyhome.tv Reddit
    Husker Football
    Lovein Funeral Obits
    Dispensaries Open On Christmas 2022
    Lyndie Irons And Pat Tenore
    FedEx Authorized ShipCenter - Edouard Pack And Ship at Cape Coral, FL - 2301 Del Prado Blvd Ste 690 33990
    Sacramentocraiglist
    Market Place Tulsa Ok
    9294027542
    10 Bedroom Airbnb Kissimmee Fl
    Strange World Showtimes Near Atlas Cinemas Great Lakes Stadium 16
    Wieting Funeral Home '' Obituaries
    Ark Silica Pearls Gfi
    Factorio Green Circuit Setup
    Leslie's Pool Supply Redding California
    Latest Posts
    Article information

    Author: Terence Hammes MD

    Last Updated:

    Views: 5607

    Rating: 4.9 / 5 (49 voted)

    Reviews: 80% of readers found this page helpful

    Author information

    Name: Terence Hammes MD

    Birthday: 1992-04-11

    Address: Suite 408 9446 Mercy Mews, West Roxie, CT 04904

    Phone: +50312511349175

    Job: Product Consulting Liaison

    Hobby: Jogging, Motor sports, Nordic skating, Jigsaw puzzles, Bird watching, Nordic skating, Sculpting

    Introduction: My name is Terence Hammes MD, I am a inexpensive, energetic, jolly, faithful, cheerful, proud, rich person who loves writing and wants to share my knowledge and understanding with you.