Skip to content

Instantly share code, notes, and snippets.

@marvell
Created November 25, 2022 08:58
Show Gist options
  • Save marvell/a447802d0caa620fb0353b0ce94771f0 to your computer and use it in GitHub Desktop.
Save marvell/a447802d0caa620fb0353b0ce94771f0 to your computer and use it in GitHub Desktop.
wg-easy setup
#!/bin/bash
curl -fsSL https://get.docker.com | sh
docker run -d \
--name=wg-easy \
-e WG_HOST=$(curl -sL4 https://ifconfig.io) \
-e WG_PERSISTENT_KEEPALIVE=25 \
-e WG_DEFAULT_ADDRESS=192.168.210.x \
-v /etc/wg-easy:/etc/wireguard \
-p 51820:51820/udp \
-p 127.0.0.1:8000:51821/tcp \
--cap-add=NET_ADMIN \
--cap-add=SYS_MODULE \
--sysctl="net.ipv4.conf.all.src_valid_mark=1" \
--sysctl="net.ipv4.ip_forward=1" \
--restart unless-stopped \
weejewel/wg-easy
@marvell
Copy link
Author

marvell commented Nov 25, 2022

Run on server: curl -sL https://raw.githubusercontent.com/marvell/quick-vpn/main/setup.sh | sudo sh. To access UI: ssh -L 8000:localhost:8000 <user>@<host>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment