Skip to content

Instantly share code, notes, and snippets.

@pkellner
Created August 22, 2024 20:13
Show Gist options
  • Save pkellner/40896e375cf691cc68968a8c3220724f to your computer and use it in GitHub Desktop.
Save pkellner/40896e375cf691cc68968a8c3220724f to your computer and use it in GitHub Desktop.
services:
wg-easy:
environment:
- LANG=en
- WG_HOST=5.78.84.82
- 'WG_POST_DOWN=iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE'
- 'WG_POST_UP=iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE'
image: ghcr.io/wg-easy/wg-easy
container_name: wg-easy
volumes:
- 'etc_wireguard:/etc/wireguard'
ports:
- '51820:51820/udp'
- '51821:51821/tcp'
restart: unless-stopped
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- net.ipv4.ip_forward=1
- net.ipv4.conf.all.src_valid_mark=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment