Install Wireguard
mkdir -p /opt/wireguard
cd /opt/wireguard
nano docker-compose.yml
yaml docker-compose.yml
GNU nano 8.1
version: ‘3.8’
services:
wireguard:
container_name: wireguard
image: linuxserver/wireguard
environment:
- PUID=1000
- PGID=1000
- TZ=American/New_York
- SERVERURL=45.55.41.235
- SERVERPORT=51820
- PEERS=pc1,pc2,phone1
- PEERDNS=auto
- INTERNAL_SUBNET=10.0.0.0
ports:
- 51820:51820/udp
volumes:
- type: bind
source: ./config/
target: /config/
- type: bind
source: /lib/modules
target: /lib/modules
restart: always
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
Save and exit.
Run Wireguard:
docker-compose up -d
docker logs wireguard
Test Your VPN
Mobile Device
Laptop
ls /opt/wireguard/config
Copy the .conf file to your laptop.
In our case the .conf file contained:
[Interface]
PrivateKey = iLwC8xbCzwVd5j9s7Et/72d6keAAVTlkmxcY/wX6Ako=
ListenPort = 518
.20
Address = 10.0.0.2/32
DNS = 10.0.0.1
[Peer]
PublicKey = P5GnsQQZk4X0KilGkKNg5ND/XZjV0KP7QDNuShSCcG4=
PresharedKey = 5X6AWptfcPEHqhgi3nVlEb6vx833rLQic/ofI4TMy5s=
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = 45.55.41.235:51820
Screenshots:
Documentation Completed by:
Ethan Belanger
Jalen Brown
Talha Choudhury
Levi Dunsmore
Haleigh Harris
Elise Hill
Oliver Johnson
Braden Lavarnway
Steven Lu
Nolan Miller
Kinlee Null
James Oakes
Devin Pattison
Ben Pikul
Anastasia Reed
Ahmed Al Shaqsi
Ahmad Sher
Jacob Silberfarb
Saniya Singh
Kenji Tratnik
Philip Tu
Alex Watson
Nuraiym Zhusupbekova