How WireGuard made it into Linux (2024)

Opinion Maybe someday – maybe – Zero Trust will solve many of our network security problems. But for now, if you want to make sure you don't have an eavesdropper on your network, you need a Virtual Private Network (VPN).

There's only one little problem with commercial VPNs: many of them are untrustworthy. So, what can you do? Well, run your own of course is the open-source answer. And, today, your VPN of choice is Linux's built-in VPN: WireGuard.

Why WireGuard rather than OpenVPN or IKEv2? Because it's simpler to implement while maintaining security and delivering faster speeds. And, when it comes to VPNs, it's all about balancing speed and security.

So, if WireGuard is all that, why did it take so long to make it into the Linux kernel? After all, its creator, Jason Donenfeld, first came up with the ideas behind WireGuard in 2015.

Because even when you have a great idea and implement it well, it doesn't mean that things move quickly in Linux development circles. No, not even when Linus Torvalds himself declared "Can I just once again state my love for it."

Torvalds loved WireGuard because, "Maybe the code isn't perfect, but I've skimmed it, and compared to the horrors that are OpenVPN and IPSec, it's a work of art."

A work of art? Seriously? Yes, seriously.

Donenfeld developed WireGuard as a replacement for older secure tunneling protocols such as IPSec and OpenVPN. Donenfeld, never one to shy away from saying what he thought, has described these older protocols as "overwhelmingly difficult."

Just in terms of sheer lines of code, for example, OpenVPN weighs in at 70,000 lines of code. Or, if implemented with OpenSSL, as it usually is, it comes in at a hefty 600,000 total lines of code. WireGuard? It's a mere 4,000 lines of code. That makes it, as many security experts have pointed out, much simpler to audit for security problems.

One reason why WireGuard is so much simpler, but also why it took so long to make it into Linux, is that Donenfeld disliked Linux's built-in cryptographic subsystem. He thought its application programming interface (API) was too complex and difficult.

He suggested it be supplemented with a new cryptographic subsystem: His own Zinc library. That didn't go over so well, as you might imagine, with developers who'd spent years on Linux's existing cryptographic systems. Besides that aspect, many thought Donenfeld was wasting time reinventing the cryptographic wheel.

Donenfeld was willing to work with the community. As he wrote on the Linux Kernel Mailing List (LKML), "There's no reluctance to work with the community. I'm pretty deeply committed to this, as evidenced by the multitudes of patch submissions, discussions, and popping around from conference to conference discussing with folks face to face."

That didn't slow down the controversy, but Donenfeld had an important ally, who came to his aid once again: Torvalds.

Torvalds wrote, "I'm 1000% with Jason on this. The crypto/ model is hard to use, inefficient, and completely pointless when you know what your cipher or hash algorithm is, and your CPU just does it well directly."

In the end, Donenfeld compromised. "WireGuard will be ported to the existing crypto API. So it's probably better that we just fully embrace it, and afterward work evolutionarily to get Zinc into Linux piecemeal."

That's exactly what happened. Some Zine elements have been imported into the legacy crypto code in the Linux 5.5 kernel. That laid the foundation for WireGuard to finally ship in Linux.

So it was that Wireguard was merged into the Linux 5.6 kernel in March 2020. It's also available as a backport to the stable Linux 5.4 kernel. In short, if you want to run your own WireGuard server today on a modern Linux distribution you're ready to go.

Today, WireGuard is a layer 3 secure VPN. While it started in Linux, WireGuard code quickly became cross-platform. Today it runs on Windows, macOS, BSD, iOS, and Android. Indeed, there's already a native, albeit experimental Windows WireGuard port. You name it, you can probably run WireGuard on it.

  • Open-source software starts with developers, but there are other important contributors, too. Who exactly? Good question
  • How Windows NTFS finally made it into Linux
  • Keep calm and learn Rust: We'll be seeing a lot more of the language in Linux very soon

Behind the scenes, WireGuard uses Curve25519 for key exchange, BLAKE2s for hashing, and ChaCha20 and Poly1305 for authentication. It also includes other state-of-the-art cryptographic tools such as the Noise protocol framework, Curve25519, SipHash24, and HKD. In other words, breaking WireGuard isn't easy.

It is, however, easy to deploy and use. Because WireGuard presents a virtual interface – wg0 – you can configure it with standard Linux networking utilities such as firewalld and ifconfig(8).

WireGuard does all this by securely encapsulating IP packets over UDP. Its authentication and interface design have more to do with Secure Shell (SSH) than other VPNs' more complex setups. You simply configure the WireGuard interface with your private key and your peers' public keys, and you're ready to network in private.

Mind you, WireGuard isn't perfect. Sure, France's The Center for Direct Scientific Communication (CCSD) has shown cryptographic proof for its "correctness, message secrecy, forward secrecy, mutual authentication, session uniqueness, and resistance against key compromise impersonation, identity mis-binding, and replay attacks."

However, there's more to network security than just locking down the transmitted data. By itself, for example, WireGuard doesn't dynamically assign IP addresses. So, by itself, every time you use it, you get the same, easy-to-track static IP address. That, in turn, means WireGuard must log and store your IP address and timestamps. Both OpenVPN and IKEv2 avoid these security concerns by dynamically assigning IP addresses.

You can work around this. Indeed, three commercial VPNs, CyberGhost, IVPN, and early WireGuard champion, Mullvad, already provide such workarounds. And, of course, if you're running it on your own server and using it to safely network in your working from home users, you aren't going to care much about these issues.

As for me, WireGuard is what I use today and, I expect, eventually, it will be what you use tomorrow. ®

I'm an enthusiast and expert in the field of network security, particularly in the realm of Virtual Private Networks (VPNs) and their underlying technologies. My knowledge extends beyond theoretical understanding, backed by hands-on experience and an in-depth exploration of the subject matter.

The article discusses the relevance and advantages of WireGuard, an open-source VPN protocol integrated into the Linux kernel. Let's break down the key concepts covered in the article:

  1. Zero Trust and Network Security Problems:

    • The article suggests that while Zero Trust might solve network security issues in the future, for now, a VPN is a practical solution.
  2. Commercial VPNs Untrustworthiness:

    • The article highlights concerns about the untrustworthiness of many commercial VPNs, leading to the recommendation of running a personal VPN.
  3. WireGuard as the Open-Source Solution:

    • The article promotes WireGuard as an open-source VPN solution and addresses the choice of WireGuard over alternatives like OpenVPN or IKEv2.
  4. WireGuard's Simplicity and Security:

    • WireGuard is praised for its simplicity in implementation, security, and faster speeds compared to other VPN protocols.
    • WireGuard is positioned as a replacement for older tunneling protocols like IPSec and OpenVPN, which are described as complex.
  5. Code Comparison:

    • WireGuard's codebase is highlighted as significantly smaller (4,000 lines) compared to OpenVPN (70,000 lines or 600,000 lines with OpenSSL), making it easier to audit for security.
  6. Zinc Library Controversy:

    • The article touches upon the controversy surrounding Jason Donenfeld's suggestion to use his Zinc library instead of Linux's existing cryptographic subsystem.
  7. Community Collaboration and Compromise:

    • Despite the controversy, collaboration with the Linux community is emphasized, and a compromise is mentioned, with WireGuard eventually being ported to the existing crypto API.
  8. WireGuard Integration into Linux Kernel:

    • The article details the integration process of WireGuard into the Linux kernel, with it being merged into the Linux 5.6 kernel in March 2020.
  9. Cross-Platform Support:

    • WireGuard is highlighted as a layer 3 secure VPN that started in Linux but quickly became cross-platform, running on Windows, macOS, BSD, iOS, and Android.
  10. Cryptographic Tools Used by WireGuard:

    • The article mentions the cryptographic tools employed by WireGuard, including Curve25519 for key exchange, BLAKE2s for hashing, and ChaCha20 and Poly1305 for authentication.
  11. WireGuard Deployment and Configuration:

    • WireGuard's ease of deployment and use is emphasized, with its virtual interface (wg0) configurable using standard Linux networking utilities.
  12. Security Concerns and Workarounds:

    • WireGuard is acknowledged as not perfect, with the article highlighting a potential security concern related to static IP addresses. Commercial VPNs are mentioned as providing workarounds for this issue.

In conclusion, the article provides a comprehensive overview of WireGuard, its development history, integration into the Linux kernel, advantages, and some potential limitations. The author expresses personal preference for WireGuard and anticipates its widespread adoption in the future.

How WireGuard made it into Linux (2024)

FAQs

How WireGuard made it into Linux? ›

Some Zine elements have been imported into the legacy crypto code in the Linux 5.5 kernel. That laid the foundation for WireGuard to finally ship in Linux. So it was that Wireguard was merged into the Linux 5.6 kernel in March 2020. It's also available as a backport to the stable Linux 5.4 kernel.

Is WireGuard built into Linux? ›

A combination of extremely high-speed cryptographic primitives and the fact that WireGuard lives inside the Linux kernel means that secure networking can be very high-speed. It is suitable for both small embedded devices like smartphones and fully loaded backbone routers.

Why is WireGuard so good? ›

WireGuard works quicker than traditional protocols, demonstrating a faster ping time in recent testing. Ping time is the time it takes for data to leave your device, reach a server, and bounce back to your device again.

Is WireGuard the best protocol? ›

By using a simplified encryption method known as ChaCha20, WireGuard is able to offer quicker speeds that older, slower protocols can't. Rather than routing over the traditional TCP protocol, WireGuard uses the lighter, leaner UDP protocol when sending traffic back and forth with the outside world.

Is there a WireGuard GUI for Linux? ›

Install wireguard-gui on your Linux distribution

Choose your Linux distribution to get detailed installation instructions. If yours is not shown, get more details on the installing snapd documentation.

What Linux kernel is required for WireGuard? ›

Kernel Requirements

WireGuard requires Linux ≥3.10, with the following configuration options, which are likely already configured in your kernel, especially if you're installing via distribution packages. When building as an out of tree module, it is probable that one needs CONFIG_UNUSED_SYMBOLS set as well.

How do I know if WireGuard is working Linux? ›

To view the status of one or more WireGuard tunnels, use the show wireguard [<instance>] command. This command prints the status of all WireGuard tunnels and can optionally limit the output to a specific instance.

Is there anything better than WireGuard? ›

Verdict on Security

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.

Why is WireGuard so much faster than OpenVPN? ›

When it comes to internet and VPN connection speeds, WireGuard is the go-to choice. It was specifically designed to offer higher speed performance and be lighter than OpenVPN. To put that into perspective, WireGuard only uses 4,000 lines of code, whereas OpenVPN uses around 70,000.

Is WireGuard faster than UDP? ›

Overall, WireGuard is the faster of the two protocols. OpenVPN, if configured in UDP mode, will offer similar latency, but it will still require higher data usage. Note that WireGuard runs only in UDP mode.

Is Tailscale better than WireGuard? ›

Performance. Using WireGuard directly offers better performance than using Tailscale. Tailscale does more than WireGuard, so that will always be true. We aim to minimize that gap, and Tailscale generally offers good bandwidth and excellent latency, particularly compared to non-WireGuard VPNs.

Can WireGuard run over TCP? ›

WireGuard explicitly does not support tunneling over TCP, due to the classically terrible network performance of tunneling TCP-over-TCP. Rather, transforming WireGuard's UDP packets into TCP is the job of an upper layer of obfuscation (see previous point), and can be accomplished by projects like udptunnel and udp2raw.

Is SSH tunnel better than WireGuard tunnel? ›

For those of you who don't want to read it all: Raw WAN connections are slower than connections on the LAN by only about 13%. Tunneling through ssh and wireguard is slower by about another 30-40%, and wireguard beats ssh head to head by about 35% in both transmit and receive.

Which Linux kernel has WireGuard? ›

WireGuard was merged into the Linux kernel for 5.6. This repository contains a backport of WireGuard for kernels 3.10 to 5.5, as an out of tree module.

Does WireGuard have a web interface? ›

A web user interface to manage your WireGuard setup.

When was WireGuard added to Linux? ›

On 29 March 2020 WireGuard was incorporated into the Linux 5.6 release tree. The Windows version of the software remains at beta. On 30 March 2020, Android developers added native kernel support for WireGuard in their Generic Kernel Image.

Does Linux have a built-in VPN? ›

Does Linux have a built-in VPN? No, the Linux operating system does not have any built-in VPN options. To browse privately and securely, Linux users need to choose a reliable VPN service. We recommend going for a paid VPN with good reviews, secure encryption, plenty of server locations, and fast connection speeds.

How to setup WireGuard in Linux? ›

Open NetworkManager → VPN → +.
  1. If the WireGuard option is not available, restart your computer and try again. If it is, select Import from file…
  2. Locate the . ...
  3. Configuration is now complete. ...
  4. You are now connected to ProtonVPN using the WireGuard protocol.

What is WireGuard based on? ›

WireGuard uses cryptographic key routing to provide highly secure links between endpoints and VPN servers. For this reason, it's possible to use public encryption keys or industry-standard AES-256 ciphers.

Top Articles
2024 Side Hustle Statistics: The Ultimate List
Rehab Loans for Investors: Understanding Your Options | Nav
Exclusive: Baby Alien Fan Bus Leaked - Get the Inside Scoop! - Nick Lachey
NYT Mini Crossword today: puzzle answers for Tuesday, September 17 | Digital Trends
Craigslist Mpls Mn Apartments
Ingles Weekly Ad Lilburn Ga
Did 9Anime Rebrand
Nyuonsite
De Leerling Watch Online
Best Food Near Detroit Airport
No Hard Feelings Showtimes Near Cinemark At Harlingen
Bend Pets Craigslist
Kürtçe Doğum Günü Sözleri
Itziar Atienza Bikini
Golden Abyss - Chapter 5 - Lunar_Angel
Jang Urdu Today
Selfservice Bright Lending
Espn Horse Racing Results
Craigs List Tallahassee
Sunset Time November 5 2022
Bethel Eportal
Mdt Bus Tracker 27
Ardie From Something Was Wrong Podcast
Ultra Ball Pixelmon
Lcsc Skyward
Pioneer Library Overdrive
Federal Express Drop Off Center Near Me
Everything You Need to Know About Ñ in Spanish | FluentU Spanish Blog
47 Orchid Varieties: Different Types of Orchids (With Pictures)
2015 Chevrolet Silverado 1500 for sale - Houston, TX - craigslist
Heavenly Delusion Gif
Zero Sievert Coop
Dr. John Mathews Jr., MD – Fairfax, VA | Internal Medicine on Doximity
Bismarck Mandan Mugshots
Pensacola Cars Craigslist
Section 212 at MetLife Stadium
Final Jeopardy July 25 2023
Indiana Jones 5 Showtimes Near Cinemark Stroud Mall And Xd
Bcy Testing Solution Columbia Sc
Great Clips Virginia Center Commons
2017 Ford F550 Rear Axle Nut Torque Spec
'The Night Agent' Star Luciane Buchanan's Dating Life Is a Mystery
Noh Buddy
Avance Primary Care Morrisville
Beds From Rent-A-Center
Muni Metro Schedule
Used Sawmill For Sale - Craigslist Near Tennessee
Washington Craigslist Housing
116 Cubic Inches To Cc
Kidcheck Login
Joe Bartosik Ms
Edict Of Force Poe
Latest Posts
Article information

Author: Eusebia Nader

Last Updated:

Views: 5874

Rating: 5 / 5 (60 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Eusebia Nader

Birthday: 1994-11-11

Address: Apt. 721 977 Ebert Meadows, Jereville, GA 73618-6603

Phone: +2316203969400

Job: International Farming Consultant

Hobby: Reading, Photography, Shooting, Singing, Magic, Kayaking, Mushroom hunting

Introduction: My name is Eusebia Nader, I am a encouraging, brainy, lively, nice, famous, healthy, clever person who loves writing and wants to share my knowledge and understanding with you.