chore: initial project setup
Configurazione Docker per WireGuard VPN con wg-easy. Include docker-compose.yml, .env.example, .gitignore e README.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
services:
|
||||
wg-easy:
|
||||
image: ghcr.io/wg-easy/wg-easy:latest
|
||||
container_name: wg-easy
|
||||
restart: unless-stopped
|
||||
|
||||
environment:
|
||||
PASSWORD_HASH: "${PASSWORD_HASH}"
|
||||
TZ: "${TZ}"
|
||||
WG_HOST: "${WG_HOST}"
|
||||
WG_DEFAULT_DNS: "${WG_DEFAULT_DNS:-1.1.1.1,8.8.8.8}"
|
||||
|
||||
# Chiavi e configurazione WireGuard persistite fuori dal container
|
||||
volumes:
|
||||
- ./wg-data:/etc/wireguard
|
||||
|
||||
ports:
|
||||
- "${WG_PORT:-51820}:51820/udp" # Traffico VPN WireGuard
|
||||
- "${WG_UI_PORT:-51821}:51821/tcp" # Interfaccia web di gestione
|
||||
|
||||
cap_add:
|
||||
- NET_ADMIN # Necessario per gestire le interfacce di rete (wg0) e le route
|
||||
- SYS_MODULE # Necessario per caricare il modulo kernel wireguard
|
||||
|
||||
sysctls:
|
||||
- net.ipv4.ip_forward=1 # Abilita il routing dei pacchetti IPv4 tra i client VPN e internet
|
||||
- net.ipv6.conf.all.forwarding=1 # Abilita il routing IPv6 (richiesto anche se non si usa IPv6)
|
||||
Reference in New Issue
Block a user