FORUMS
Remove All Ads from XDA
Honor 9 Lite

[GUIDE] How-to Use WireGuard on Android and Ubuntu

1 posts
Thanks Meter: 22
 
By TheVPNGuy, Junior Member on 22nd December 2017, 03:27 PM
Post Reply Email Thread
WireGuard is a next-generation VPN protocol that's extremely fast, secure, and well suited for mobile devices. It was recently featured on XDA news and there's an active thread for developers-only. This post is a how-to for normal people.

WireGuard is just the protocol and software. But to use it, you need to send your traffic through a server. There are a few commercial providers -- AzireVPN and Mullvad -- or you can setup your own server. But this guide will focus on AzireVPN, because as of writing, it's free.




==== For your Android Phone ====

0. Make sure you're running a ROM or kernel that supports WireGuard.

1. Install the WireGuard app: https://play.google.com/apps/testing...eguard.android

2. Sign up for AzireVPN: https://manager.azirevpn.com/en/auth/register

3. Generate and download a configuration file from: https://www.azirevpn.com/cfg/wg

4. Import it into the WireGuard app using "Add from file"




==== For your Ubuntu Computer ====

1. Install WireGuard:
Code:
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard-dkms wireguard-tools linux-headers-$(uname -r)
2. Sign up for AzireVPN: https://manager.azirevpn.com/en/auth/register

3. Run the Azire script:
Code:
$ curl -LO https://www.azirevpn.com/dl/azirevpn-wg.sh
$ chmod +x ./azirevpn-wg.sh
$ ./azirevpn-wg.sh
4. Turn on WireGuard:
Code:
$ wg-quick up azirevpn-se1



That should be it!

Direct any questions to the WireGuard IRC channel -- #wireguard on Freenode.
The Following 22 Users Say Thank You to TheVPNGuy For This Useful Post: [ View ] Gift TheVPNGuy Ad-Free
 
 
22nd December 2017, 03:42 PM |#2  
zx2c4's Avatar
Recognized Developer
Flag Paris
Thanks Meter: 459
 
Donate to Me
More
Thumbs up
Thanks for writing this! I've linked to it on the WireGuard developers' thread.
The Following 4 Users Say Thank You to zx2c4 For This Useful Post: [ View ]
23rd December 2017, 02:44 PM |#3  
kantjer's Avatar
Recognized Contributor
Thanks Meter: 27,883
 
More
I have setup WireGuard a few days ago on Android exactly as descripted in the howto. Everything is working perfect only issue I can't access devices on my local network with WG enabled.
I have been looking for a way to bypass WG for local traffic but haven't found a solution yet.

Any tips on how to this, or alternatively is is possible to switch WG on/off via the command line so I can use Tasker to switch WG off when on my local network.
23rd December 2017, 10:05 PM |#4  
zx2c4's Avatar
Recognized Developer
Flag Paris
Thanks Meter: 459
 
Donate to Me
More
Quote:
Originally Posted by kantjer

I have setup WireGuard a few days ago on Android exactly as descripted in the howto. Everything is working perfect only issue I can't access devices on my local network with WG enabled.
I have been looking for a way to bypass WG for local traffic but haven't found a solution yet.

Any tips on how to this, or alternatively is is possible to switch WG on/off via the command line so I can use Tasker to switch WG off when on my local network.

Thanks for the report. I'm wrapped up in end of the year festivities right now, but when that's over I'll try to reproduce the local network issue and see if I can provide a workaround or toggle switch.

In the meantime, indeed you can use Tasker as you described. In the settings menu of the app, choose "Install command line tools." After, you'll be able to type "wg-quick up somename" and "wg-quick down somename." You can look at the status of existing vpn connections with the "wg" command too. Let me know how it goes!
The Following 2 Users Say Thank You to zx2c4 For This Useful Post: [ View ]
23rd December 2017, 11:23 PM |#5  
bonbonboi's Avatar
Senior Member
Thanks Meter: 16
 
Donate to Me
More
Thanks for this project, looking for a test drive of WireGuard app, but there's a lot of users like I, don't use google apps, so if you are interested to support us through https://f-droid.org/ by adding your app to repo.
The Following User Says Thank You to bonbonboi For This Useful Post: [ View ] Gift bonbonboi Ad-Free
24th December 2017, 05:13 PM |#6  
kantjer's Avatar
Recognized Contributor
Thanks Meter: 27,883
 
More
Quote:
Originally Posted by zx2c4

In the meantime, indeed you can use Tasker as you described. In the settings menu of the app, choose "Install command line tools." After, you'll be able to type "wg-quick up somename" and "wg-quick down somename." You can look at the status of existing vpn connections with the "wg" command too. Let me know how it goes!

The wg-quick up/down works perfect for temporary disable WG to sync with my NAS. Thanks for the tip.
26th December 2017, 04:27 PM |#7  
Senior Member
Flag Anand
Thanks Meter: 31
 
More
error bringing up tunnel.. can anybody help me with a working configuration file.. pm me the file..
26th December 2017, 04:48 PM |#8  
zx2c4's Avatar
Recognized Developer
Flag Paris
Thanks Meter: 459
 
Donate to Me
More
Quote:
Originally Posted by dixan43

error bringing up tunnel.. can anybody help me with a working configuration file.. pm me the file..

No. Send logs from `adb logcat` or the Matlog app instead, so we can help solve this issue.
The Following User Says Thank You to zx2c4 For This Useful Post: [ View ]
26th December 2017, 05:08 PM |#9  
Senior Member
Flag Anand
Thanks Meter: 31
 
More
Quote:
Originally Posted by zx2c4

No. Send logs from `adb logcat` or the Matlog app instead, so we can help solve this issue.

here
Attached Files
File Type: txt wireguard.txt - [Click for QR Code] (48.6 KB, 32 views)
The Following User Says Thank You to dixan43 For This Useful Post: [ View ] Gift dixan43 Ad-Free
26th December 2017, 05:12 PM |#10  
Senior Member
Flag Anand
Thanks Meter: 31
 
More
Quote:
Originally Posted by zx2c4

No. Send logs from `adb logcat` or the Matlog app instead, so we can help solve this issue.

beacon kernel developer here suggested me to turn off internet and connect wireguard config and then turn on internet.. and it just connected with internet off.. so is it supposed to work like that?
-- so when I connect it with internet already on, it gives that error..
-- when internet off, it connects and remains connected there after..
26th December 2017, 05:22 PM |#11  
Member
Flag Chennai
Thanks Meter: 17
 
More
Quote:
Originally Posted by zx2c4

No. Send logs from `adb logcat` or the Matlog app instead, so we can help solve this issue.

Same error bringing up tunnel.
Attached Files
File Type: txt 2017-12-26-21-51-55.txt - [Click for QR Code] (4.3 KB, 30 views)
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes