Created
October 4, 2021 18:31
-
-
Save gustavohenrique/276f78766ebea4996997cb17f262d687 to your computer and use it in GitHub Desktop.
Run Wireguard VPN peer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export WG_ADMIN_PASSWORD=`xxd -l4 -ps /dev/urandom` | |
export WG_WIREGUARD_PRIVATE_KEY=`docker run --rm place1/wg-access-server wg genkey` # OC+tBxEc/OFBFEO6Kcn92CWjaahBNBtcAgfhkjNII0E= | |
docker run \ | |
-d \ | |
--name wireguard \ | |
--cap-add NET_ADMIN \ | |
--device /dev/net/tun:/dev/net/tun \ | |
-v wg-access-server-data:/data \ | |
-e "WG_ADMIN_PASSWORD=$WG_ADMIN_PASSWORD" \ | |
-e "WG_WIREGUARD_PRIVATE_KEY=$WG_WIREGUARD_PRIVATE_KEY" \ | |
-p 8000:8000/tcp \ | |
-p 51820:51820/udp \ | |
place1/wg-access-server | |
# User: admin | |
xdg-open http://localhost:8000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment