WireGuard VPN review: A new type of VPN offers serious advantages
arstechnica.com
arstechnica.com
If Algo had supported WireGuard at the time you looked into this, would you still have done it yourself?
At least OpenVPN, for all the criticism the article throws at it, has the configurability to pass through the various strange firewall rules that exist in the real World. Waiting eight seconds for negotiation isn't a big deal when the new and shiny 'replacement' doesn't have a hope of working.
http://manpages.ubuntu.com/manpages/xenial/man1/udptunnel.1....
Setup Wireguard on your server as though everything were normal. However, on the server, run this command (as a service):
udptunnel -s 443 127.0.0.1/51820
Then on your client run:
udptunnel -c [SERVER-ADDR]/443 127.0.0.1 51818
In the Client's Wireguard Config, where you would normally specify the server's address / port. Instead specify 127.0.0.1 51818. Finished!
Don't forget to open the firewall on the server's port 443!
Setting up udptunnel as a systemd service to auto start / restart only involves writing two short files! Wireguard uses a standard service file as well so you can simply require the udptunnel service as a prerequisite!
Personally, I find this style of combining simple components much more satisfying (and secure!) than the gargantuan complexity of OpenVPN/IPSec! Wireguard's simplicity means it is easy to have a mental model around how it functions and how it can be composed!
http://sites.inka.de/bigred/devel/tcp-tcp.html
(not that it matters when you're trying to tunnel out of university network, but something to keep in mind, especially on lossy connections)
I've sometimes contemplated just faking the TCP protocol entirely. Do the TCP handshake, then send "TCP packets" but interpret each payload as a datagram, acknowledge everything up to the latest sequence number regardless of whether any of them were lost and don't bother with any flow control or retransmissions.
It's a terrible hack but it would probably work at least some of the time.
https://github.com/wangyu-/udp2raw-tunnel/blob/master/README...
Your suggestion is how some "WAN optimisation" network middleboxes work (transparently terminating the TCP in the middlebox itself). To do that with Wireguard you'd have to implement that in the Linux kernel.
application data in IP+<L4 protocol> in IP+UDP Tunnel (Wireguard) in IP+TCP
So securing the component mess and header bloat is becoming as bad as OpenVPN/IPSec which you abhorred. Still probably faster than OpenVPN though as that implementation is amazingly bad.
Wireguard authenticates (or drops) any packets forwarded by udptunnel. Once a packet leaves the Wireguard interface the attacker (or anyone else) can transform it however they like without impacting security properties.
This config does allow the attacker to make a TCP handshake to the server, but the data they send over the TCP wrapped connection could have equally been sent to the UDP port Wireguard is listening on.
Disclaimer: This of course assumes both Wireguard and udptunnel have no remote code exploits or other implementation errors. However, as we discussed, this is a much safer assumption than OpenVPN...
So it's not a security hole, but it is slightly less secure.
If OTOH they want to allow you to use a VPN, they should allow at least some UDP traffic. The way God intended BTW because running VPN traffic over TCP usually means running error detection and flow control twice on top of each other.
Sure, some of the value of a VPN is running through misconfigured and outright hostile networks, hence various encapsulation schemes (over SSL, in DNS requests, etc), but only some of the value.
Those ancient setups need to die.
To be honest I'm a bit surprised vy the reactions here. This isn't an unusual configuration, I've worked in two other companies that had the same rules; nothing except web traffic even on the 'public' wifi. The latter permitted any device to connect but had absolutely no exceptions to the firewall rules. The corp nets did have an exception process but only for servers in the DMZ.
But running wireguard on port 53 might just work!
Don't do that.
Edit: going by downvotes, it still seems to be a sore spot. That answers my question about its current status in the USA I suppose...
Blocking UDP is not treating all traffic the same. Even if the law would be about treating services equally and not any IP packet equally, then it still has a different impact on services like VoIP (which are often UDP) than it does on other services. Blocking certain types of packets is not compliant with net neutrality -- at least, not in the Netherlands. If there is a different definition whereever you come from, please tell me about it.
I have never once heard anybody claim that private institutions are not allowed to shape their own network traffic.
Unless you show me Dutch law that clearly spells this out, I will not for a second believe that it is illegal for a university to block certain protocols.
If what you say were true then pretty much every single private organization would be operating illegally, anybody that runs VoIP, blocks UDP or any other way to shape the network.
I'd be willing to bet my lunch that there are exceptions for private, government, and educational institutions or that there is an exception related to security services.
Any blocks should be necessary/essential for network stability or security. If I have evidence that a trojan is using tcp port 1337, and I am not aware of any other application that uses it, then there is no problem blocking it. In practice, of course, malware would be crazy not to use tcp/443 or tcp/80, so blocking ports is rather pointless these days anyway.
As for network stability: reasons like "by blocking VoIP we can sell our services and use that money to make our network more stable" are not good enough, of course. There has to be a concrete reason why {whatever you want to block} will benefit the network.
> and they need to have all public addresses to get around the fact that no device dynamically NATs all L4 protocols.
I guess since there is scarity in v4-addresses, it's not reasonable to use public addresses for each individual, so "blocking" incoming traffic (or rather, it being unrouteable) shouldn't be an issue. It's essential for the network's operation.
By protocol design it incurs a 4%-~50% (1500 byte and 64 byte packets respectively) bandwidth penalty over the internet due to headers. The encryption of the payload is extremely fast though.
I've been trying to setup OpenVPN for ages, and it always eats about 60-80% of the bandwidth. No matter what I try with it, I just cannot get the full speed of my internet connection through the protocol. With Wireguard I haven't noticed any difference. fast.com is as fast with or without WireGuard. I have to say it's the first time in my life I see it working this easily.
EDIT: I'm using it on my Netgear WNDR3800, and my grandmother's Sitecom WLR-4000 (which is a rebranded Sitecom WL-351, which is a rebranded EnGenius ESR9850).
https://marc.info/?l=openbsd-ports&m=152712417729497&w=2
Nothing against vyatta/edgeos but since getting into edge cases requires command line anyway, you can just start there without too much trouble.
(I run a large number of ERs, mostly because you can easily run so much other software on the hardware -- but they're not great devices if you need performance or reliability. "You get what you pay for" absolutely applies.)
Many servers. Can pay with bitcoin. You only get a randomized account number. /128 subnet for IPv6.
A bit less servers. No need to give email. /64 subnet for IPv6.
https://www.wireguard.com/#about-the-project
Work in Progress
WireGuard is not yet complete. You should not rely on this code. It has not undergone proper degrees of security auditing and the protocol is still subject to change. We're working toward a stable 1.0 release, but that time has not yet come. There are experimental snapshots tagged with "0.0.YYYYMMDD", but these should not be considered real releases and they may contain security vulnerabilities (which would not be eligible for CVEs, since this is pre-release snapshot software). If you are packaging WireGuard, you must keep up to date with the snapshots.
AFAIK Jason does use wireguard for himself now, but is cautious to recommend that to everyone.
The last submission to the linux kernel is here: http://lkml.iu.edu/hypermail/linux/kernel/1808.3/00619.html
While merging wireguard should not be a problem, its own crypto library called 'zinc' has bigger open points of discussion.
For me this means he's appropriately cautious for working in security-minded applications like this. A lot of VPN providers would probably release something like an alpha release.
https://courses.csail.mit.edu/6.857/2018/project/He-Xu-Xu-Wi...
> A Cryptographic Analysis of the WireGuard Protocol. Benjamin Dowling, Kenneth G. Paterson
I really don't understand this. Why not just update the webpage and eliminate having to give the same response every time, since it seems to be asked a lot?
They only route UDP and TCP to your VM, so if you want IPSec, you have to mess about with 'Amazon Virtual Private Cloud'.
Praise like this from him is rare.
The article references code for iOS apps but also states that "it needs to be baked right into the kernel for that to happen.". Would iOS apps also need the iOS Kernel (say iOS 12.x or iOS 13.x) to include WireGuard to take advantage of some of the speed advantages over OpenVPN?
I don’t know if WireGuard being UDP causes issues, but I would assume it is possible.
algo/configs/your.server.ip/wireguard/uname.conf
Add
PersistentKeepalive = 25
as the last line (should be in the [Peer] section).Feed the conf file to your client. That's it.
Edit: There's a blurb about it on the website as well that is a little less handwavey than what I typed:
https://www.wireguard.com/quickstart/#nat-and-firewall-trave...
https://github.com/trailofbits/algo/issues/1068
Thanks!
I'm really using my chromebook a lot these days at home, but wish I had a better VPN option for it.
Haven't tried it yet but Mullvad.net just released a VPN app for Windows:
https://mullvad.net/en/blog/2018/8/14/official-release-new-m...
When someone provides instructions to set up a WireGuard server on my Linux server and a client on my Android, I might just buy into that "easy setup" story.
I'm just wondering if there are any actual downsides to this scheme. It seems like such an obviously good idea that I'm second-guessing myself.
The no-negotiation approach also means if things change you can't find out why you can't connect. Maybe you need to upgrade your software? Or downgrade it? Did you change any settings? It's a mystery!
https://en.wikipedia.org/wiki/Export_of_cryptography_from_th...
The only thing I have added is a kill switch that blocks internet access if the WG interface goes down.
Someone can correct me, but I would prefer Tabulation Hashing to SipHash, even though SipHash is by DJB. Tabulation Hashing offers optimal guarantees and performance, and it's much simpler.
Easier to introspect/update/verify?
How would you implement MFA in a wireguard system?
"I think that given the WireGuard building block, it's certainly possible to build a 2FA framework around it. And I do generally like 2FA and short-lived credentials and such. Probably after getting the implementations buttoned up -- kernel mainline, windows, etc -- I'll turn a bit of attention to expanding tooling and full packages around the simple wg0 interface."
[1]:https://www.mail-archive.com/wireguard@lists.zx2c4.com/msg02...
On the other hand, I couldn't wait for the Windows client.
All these courtesy of `ls {,/usr}/{,s}bin/??`. In fact, there are only 44 two-lettered commands on my (Arch Linux) system right now, so this particular realm appears to be very sparsely populated. (Not counting shell builtins though.)
It is as easy to use as WireGuard and has two advantages over wireguard. 1. It will automatically mess, and find the best path. 2. It has a far wider range of platforms supported than wireguard.
https://www.tinc-vpn.org/documentation/Security.html#Securit...
The default cipher is from 1993 and its creator recommends everyone updates.
32 bit MACs are hilariously tiny.
Home rolled authentication based around RSA.
Their own documentation even states: ”tinc’s security is not as strong as TLS or IPsec."
DO NOT USE tinc!
https://www.tinc-vpn.org/documentation-1.1/Simple-Peer_002dt...
a) its not supported by the stable release
b) There are no claims about downgrade resistance. The manual specifies the new transport protocol is used if both clients support it and both have changed their configs to enable experimental mode. Can an attacker still force them to connect with legacy mode?
c) Users have to ensure every single config on every client has the correct setting.
d) It still doesn't have the identity hiding features of Wireguard. (Someone observing your network traffic can see which servers you are talking to from the transmitted signatures)
Compare this to something like IPSec, where the userland is typically only used for the control part; once a connection exists, the packets don't leave the kernel, so no context switch needed.
If tinc is crazy slow I suspect it's an implementation issue.
That explanation seems fine to me. It's not an explanation of the underlying math but it doesn't need to be.
If current openvpn or IPSEC isn’t being cracked, there is only more energy wasted in going to 4096bit keys.
Edit: lol downvotes... ok, cool. Tell me who is breaking 2048bit diffiehellman exchange to 256bit AES in CBC mode. I’ll wait right here.