w trybie host cały ruch WireGuarda działa jakby był na serwerze

This commit is contained in:
Artur Kuś 2025-09-08 19:15:07 +02:00
parent 96acb3ec7d
commit 37e8c00e75
2 changed files with 14 additions and 3 deletions

View File

@ -9,14 +9,14 @@ services:
- PUID=1000 - PUID=1000
- PGID=1000 - PGID=1000
- TZ=Europe/Warsaw - TZ=Europe/Warsaw
- SERVERURL=vpn.arti24.eu # podmień na publiczny adres IP lub domenę - SERVERURL=vpn.arti24.eu # publiczny adres IP lub domena
- SERVERPORT=51820 - SERVERPORT=51820
- PEERS=1 - PEERS=1
- PEERDNS=auto - PEERDNS=auto
volumes: volumes:
- ./config:/config - ./config:/config
ports:
- "51820:51820/udp"
sysctls: sysctls:
- net.ipv4.conf.all.src_valid_mark=1 - net.ipv4.conf.all.src_valid_mark=1
- net.ipv4.ip_forward=1 # <--- dodane
network_mode: host # <--- zamiast "ports"
restart: always restart: always

View File

@ -0,0 +1,11 @@
[Interface]
Address = 10.13.13.2
PrivateKey = aHAaS8XPD7IE0EDh3Mz4eayjZF6RyFgIVcsFTRCic2U=
ListenPort = 51820
DNS = 10.13.13.1
[Peer]
PublicKey = kaFGhRV5S98kIeKz8VGorO/GZbogkkyr/9NcMmxCwks=
PresharedKey = lRyOeqKtAp7Vh747LTafGN/DNdP9SuoWuFmRBWxoi+o=
Endpoint = vpn.arti24.eu:51820
AllowedIPs = 10.0.0.0/16, 10.13.13.0/24