Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme #12

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
# Download and install WireGuard on Ubiquiti edge devices
# Introduction

***Warning:*** _This script attempts to preserve your running configuration, however you should have a backup of your configuration before running this script._

This script installs and maintaince the wireguard vpn solution on a ubiquiti router.

*Features*

* Single line install
* Automatically detect used hardware
* Proper upgrade process preserving configuration
* Scheduled auto update
* Preserve wireguard on firmware upgrade
* Preserve wireguard configuration on firmeware upgrade

# Download and install WireGuard on Ubiquiti edge devices

This script will reference [WireGuard/wireguard-vyatta-ubnt](https://github.com/WireGuard/wireguard-vyatta-ubnt) repo for WireGuard releases. It will download, install, and setup the package to install post firmware upgrade. Rebooting the device is **not** required after running this script as long as the script did not generate any errors. Grab the script by running the following commands from the web CLI or SSH.

```
cd /config/scripts
curl -LO --silent https://github.com/whiskerz007/ubnt_get_wireguard/raw/master/get_wireguard.sh
chmod +x get_wireguard.sh
sudo curl -L --silent https://github.com/whiskerz007/ubnt_get_wireguard/raw/master/get_wireguard.sh -o /config/scripts/get_wireguard.sh && sudo chmod +x /config/scripts/get_wireguard.sh
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to keep the commands separate. Copy and paste works just as well with one or three lines of commands.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it and add the you need to be root for installation

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the user need to be set to root?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least on my USG the config/scripts directory has write access for root only:
drwxr-xr-x 4 root vyattacf 4096 Feb 3 22:50 scripts

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can verify that the Unifi gateways do set the permissions to root:vyattacfg. Go ahead and include the commands with sudo and I'll merge the PR.

```

***Note:*** _Best practice is to save scripts into `/config/scripts` directory._
Expand Down