How to configure WireGuard VPN network

in #eos6 years ago

Installing WireGuard on your Ubuntu server:

$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard

Generate private and public keys:

wg genkey > private
wg pubkey < private

Configure your WG network connector

ip link add dev wg0 type wireguard
ip addr add 10.0.0.1/24 dev wg0
wg set wg0 private-key ./private
ip link set wg0 up
*) Guide: https://www.wireguard.com/quickstart/

You can see your information by running: wg
wg0
public key: tIoYj42VndZoWdxmhmO/p0s58KLpLtxWezTRSpiYpj8=
private key: (hidden)
listening port: 33478

Then add your peers - you will need to know their public keys, ips and ports:

Example:
wg set wg0 peer tIoYj42VndZoWdxmhmO/p0s58KLpLtxWezTRSpiYpj8= endpoint eosslc.com:33478 allowed-ips 192.168.111.1/32

After everything is configured and each node can ping each other VPN IP and get response - the VPN network is set to launch EOS nodes and connect to each other using VPN IP address space.

The EOS key peer should be enforced for enhanced second level security.

Coin Marketplace

STEEM 0.23
TRX 0.12
JST 0.029
BTC 67751.96
ETH 3530.87
USDT 1.00
SBD 3.16