Skip to content

Quick Setup

SirToffski edited this page Jul 23, 2019 · 1 revision

Usage

First, clone the repository.

$ git clone https://github.com/SirToffski/WireGuard-Ligase.git
$ cd WireGuard-Ligase/

Default parameters

The quick setup script comes with the following default parameters. One may change those to suit their particular needs before running the script. This can be achieved by using your favourite text editor or by using sed.

$ cat Scripts/quick_setup.sh
----------------------------------------------
...
server_private_range="10.10.100.1"
local_interface="eth0"
server_listen_port="9201"
client_dns="1.1.1.1"
number_of_clients="2"
client_private_address_1="10.10.100.2"
client_private_address_2="10.10.100.3"
config_file_name="wg0"
server_subnet="10.10.100.0/24"

If using sed one may change the default parameters as shown below.

$ cd $(find /home -type d -name WireGuard-Ligase)
# To change server IP from 10.10.100.1 to 172.25.25.1:
$ sed -i 's/10\.10\.100\.1/172\.25\.25\.1/g' Scripts/quick_setup.sh
# Alternatively, one can quickly change both server IP and client IPs by changing only the first three octets:
$ sed -i 's/10\.10\.100/172\.25\.25/g' Scripts/quick_setup.sh

Running the script

It is recommended to always start with the helper script configure-wireguard.sh and choosing the appropriate option.

$ sudo bash configure-wireguard.sh
-----------------------------------------------------------------------------

 __    __ _                                    _     __ _
/ / /\ \ (_)_ __ ___  __ _ _   _  __ _ _ __ __| |   / /(_) __ _  __ _ ___  ___
\ \/  \/ / | '__/ _ \/ _` | | | |/ _` | '__/ _` |  / / | |/ _` |/ _` / __|/ _ \
 \  /\  /| | | |  __/ (_| | |_| | (_| | | | (_| | / /__| | (_| | (_| \__ \  __/
  \/  \/ |_|_|  \___|\__, |\__,_|\__,_|_|  \__,_| \____/_|\__, |\__,_|___/\___|
                     |___/                                |___/
Welcome to WG Ligase.

The script will guide you through the installaton process, allowing to choose a starting point.

The idea is for this script to be equally suitable for new deployments, as well as for configuring
a live deployment

Let's begin. Please select from one of the following options:
-----------------------------------

1 = Quick Setup. You will only be asked to specify public server IP.

-----------------------------------

2 = Advanced Setup: I would like to configure a new server and clients from scratch.

-----------------------------------

3 = Clients only: I just need to generate some client configs and add those to an existing server.

-----------------------------------

4 = IPTABLES: I just need commands to configure IPTABLEs.

----------------------------------

For quick setup, choose the first option by typing 1 and pressing the ENTER(Return) key.

Clone this wiki locally