Everyone knows and loves Mirage Firewall. Recently, I stumbled upon a mirage OpenVPN unikernel made for Qubes which didn’t seem to get much attention from the community. Their instructions are here.
I wanted to share this find and to know if people are using it, how it went, and with which vpns.
I can confirm that it only targets OpenVPN because the code to use the vpn protocol has to be written with Ocaml. I tested a while ago and the tunnel can be established, and i can use it, but a bug causes the communication to break after a while. Unfortunately, this has not been deeply investigated yet due to time constraints.
To me, all client packets are transmitted through the tunnel, so there are no leaks. This could be an issue because the dns resolver needs to be modified in the clients appVM and doesn’t use Qubes’ default 10.139.1.[12]. I haven’t checked how this is handled with other vpn proposals.
Dear @unman , I updated the unikernel to the latest release of mirageOS and so far I don’t observe the tunnel crash anymore (but this may be related to a change in my openVPN server, or set of options used). Would you mind to try Update to Mirage 4.9 by palainp · Pull Request #18 · robur-coop/qubes-miragevpn · GitHub and let me know if you’re still experiencing tunnel issues (which would indicate that certain options are leading to errors, and help correct them ). If so, you can report your test in the PR or here (or both) according to your preference
Dear @James369 , I use from time to time the openVPN unikernel without any issue. So I tried with one ovpn config file provided at VPNGate and the unikernel fails with:
quote: Indeed, the supported ciphers of MirageVPN are: AES-256-CBC, AES-128-GCM, AES-256-GCM and CHACHA20-POLY1305. You’d need to add the AES-128-CBC case in config.ml and likely at various pattern matches where AES-256-CBC appears.
I think this is far beyond my capabilities though So I guess I will have to find other configs that work with those ciphers then. I am looking forward to getting it to work though. I really love the idea of unikernel qubes.
I have a branch that adds this cipher. But now, it complains that tls-auth is absent from config file. I still have some work to get the tunnel up, but that sounds doable
Did you try to just delete the sha and cipher sections on config file before importing? And see if those are even needed? perhaps the server could figure it out?
AES-128-CBC encryption is not broken and is implemented in mirage-crypto, so I was able write the code for parsing the configuration file without any issues.
But Reynir, from Robur, then discovered that the absence of tls-auth/tls-crypt/tls-cryptv2 in the configuration file required a new code path for unauthenticated channels (OpenVPN Wire Protocol (work in progress), see the GH issue for details) which is handled by the openvpn client, but not by the mirage implementation.
Until this is written and pushed, the best way to proceed is to find a server and configuration file that contain a tls-auth line.
Dear @James369 , unfortunately I use a private openvpn server and not publicly available config files. My configfile basically contains:
client
proto udp
explicit-exit-notify
remote X.X.X.X YY
dev tun
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA256
auth-nocache
cipher AES-128-GCM
tls-client
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
verb 3
followed by <ca>, <cert>, <key> keys and a <tls-crypt> static key which authenticates me.
auth-user-pass appears to be a file containing your username/password on two lines. I suppose that in your case, this refers to your Proton VPN login credentials. In the miragevpn repository, there is a test file that incorporates this information instead of having to read another file: