From 617afa5d3da2344944af6477735ed4c13f7719fd Mon Sep 17 00:00:00 2001 From: Raine Date: Mon, 23 Oct 2023 02:32:13 +0200 Subject: [PATCH] fix: easy wg --- .../custom/nginx/conf.d/default.conf | 2 +- .../docker-compose.wireguard.yml | 41 ++++++------------- 2 files changed, 13 insertions(+), 30 deletions(-) diff --git a/servers/link/docker-compose.d/custom/nginx/conf.d/default.conf b/servers/link/docker-compose.d/custom/nginx/conf.d/default.conf index cd16319..33d14f1 100644 --- a/servers/link/docker-compose.d/custom/nginx/conf.d/default.conf +++ b/servers/link/docker-compose.d/custom/nginx/conf.d/default.conf @@ -3,7 +3,7 @@ server { server_name link.ixvd.net; location / { - proxy_pass http://wireguard:5000; + proxy_pass http://wireguard:51821; } } diff --git a/servers/link/docker-compose.d/docker-compose.wireguard.yml b/servers/link/docker-compose.d/docker-compose.wireguard.yml index f3f2fa2..6da8a2b 100644 --- a/servers/link/docker-compose.d/docker-compose.wireguard.yml +++ b/servers/link/docker-compose.d/docker-compose.wireguard.yml @@ -1,38 +1,21 @@ -version: '2.2' - +version: "3.8" services: wireguard: - image: linuxserver/wireguard:latest - container_name: wireguard + image: weejewel/wg-easy + restart: unless-stopped cap_add: - NET_ADMIN - volumes: - - /srv/wg/config:/config + - SYS_MODULE ports: - "51820:51820/udp" - networks: - - proxy - - internal - restart: unless-stopped - - wireguard-ui: - image: ngoduykhanh/wireguard-ui:latest - container_name: wireguard-ui - depends_on: - - wireguard - cap_add: - - NET_ADMIN - network_mode: service:wireguard env_file: - - /etc/ixvd/secrets/env/wg-ui.env + - /etc/ixvd/secrets/env/wg.env environment: - - WGUI_MANAGE_START=true - - WGUI_MANAGE_RESTART=true - restart: unless-stopped - logging: - driver: json-file - options: - max-size: 50m + - WG_HOST=link.ixvd.net + sysctls: + - net.ipv4.ip_forward=1 + - net.ipv4.conf.all.src_valid_mark=1 volumes: - - /srv/wg/other/ui-db:/app/db - - /srv/wg/config:/etc/wireguard \ No newline at end of file + - /srv/wg/config:/etc/wireguard + networks: + - proxy \ No newline at end of file