Project 5 - liamb8/sec440 GitHub Wiki
Wireguard
Wireguard VPN Installation Install wireguard on aws ubuntu-peer and xubuntu-lan
sudo apt-get update
sudo apt-get install wireguard
create a keypair on aws ubuntu-peer and xubuntu-lan
sudo -i
cd /etc/wireguard
umask 077; wg genkey | tee privatekey | wg pubkey > publickey
Configuration Config on aws-ubuntu-peer
ip link add wg0 type wireguard
ip addr add 10.0.101.1/24 dev wg0
wg set wg0 private-key privatekey
wg set wg0 listen-port 51900
ip link set wg0 up
Config on xubuntu-lan
ip link add wg0 type wireguard
ip addr add 10.0.101.2/24 dev wg0
wg set wg0 private-key privatekey
wg set wg0 listen-port 51900
ip link set wg0 up
Configure xubuntu-lan as a peer on aws-ubuntu-peer copy xubuntu-lan public key and on aws paste the key in.
wg set wg0 peer InsertPublicKeyHere allowed-ips 10.0.101.2/32 endpoint 10.0.5.6:51900
Configure aws-ubuntu-peer as a peer on xubuntu-lan
copy text of aws wireguard public key to xubuntu-lan
wg set wg0 peer InsertPublicKeyHere allowed-ips 10.0.101.1/32 endpoint ec2-3-88-197-168.compute-1.amazonaws.com:51900
Save wireguard configuration
wg showconf wg0 | tee /etc/wireguard/wg0.conf
Edit wg0.conf files on both xubuntu-lan and on aws config: config