Generating Wireguard QR codes for fast mobile deployments

Originally published at: https://serversideup.net/generating-wireguard-qr-codes-for-fast-mobile-deployments/

If you have been following along on my Gain Flexibility & Increase Privacy with Wireguard VPN “mini-course”, you’ll notice that there are a few areas that we need apply configurations in order for our devices to get connected. Typing all of this in manually on mobile can be a massive pain, especially if you are…

Hi Jay,
Excellent guide on setting up WireGuide. However, on ‘qrencode -t ansiutf8 < /etc/wireguard/clients/BlackViewA80Pro.conf’ (having used BlackViewA80Pro for all the mobile usage in this section), I got ‘bash: qrencode -t ansiutf8 < /etc/wireguard/clients/BlackViewA80Pro.conf: Permission denied’.
I’ve tried preceding the command with sudo and also with ./, but both gave the same. Any ideas? I’m actually using Xubuntu 20.04 but I don’t know of any difference in Terminal command between that and Ubuntu 20.04.
John

Thanks for the compliments!

That is very strange qrencode, especially if you already ran it with sudo.

I wonder if it has something to do with the redirection in Bash? https://askubuntu.com/questions/230476/how-to-solve-permission-denied-when-using-sudo-with-redirection-in-bash

Basically, try switching so you become root then try running the command without sudo.

Hopefully that works!

11 posts were split to a new topic: How do I unset a peer in Wireguard?

I have a question, does this VPN actually work? I’m a 100% novice at these kinds of things and I wanted to find a VPN that I could use for free, and so I’m wondering if this actually will work as just a VPN I don’t need the region changing or anything, I just want a secure network.

Absolutely it works! I used OpenVPN for years. OpenVPN was so much better than dealing with PPTP VPNs back in the day.

When WireGuard came out, I made the jump and have never missed OpenVPN after making the change.

It’s so nice having it natively supported in the kernel for Linux. It’s very lightweight and fast too!

WireGuard is very easy to configure than OpenVPN.

There are a ton of cool projects coming out for it everyday. I highly recommend checking out this subreddit too: https://www.reddit.com/r/WireGuard/

1 Like

Appreciate it! Thank you!

1 Like

This is a very useful guide. Thanks for sharing.

If, instead of a Ubuntu 20.04 WireGuard VPN Server, we have a Mikrotik CHR version 7, is it still possible to generate QR codes for clients?

Definitely!

You could run Ubuntu 22.04 with Docker, then install qrencode.

All you would need to do is get the files in your directory then pipe them in.

Here is an example to mount your current working directory into an Ubuntu 22.04 instance:

docker run --rm -it -v $(pwd):/cwd -w /cwd --rm ubuntu:22.04 bash