Thank you for your post, I'm so close to this I can feel it! Were you able to get this working?
I've done everything you have, the only thing is that I noticed an error in the wireguard container logs about not finding eth0 for that start up command. Any idea what the container's interface is called?
Here's docker compose and wg0.conf for reference:
version: "3.6"
services:
wireguard-client:
image: linuxserver/wireguard
container_name: wireguard-client
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- LAN_NETWORK=${LAN}
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
volumes:
- /home/serveradmin/remote/docker/wireguard-client:/config
- /lib/modules:/lib/modules
ports:
- 51820:51820/udp
- 7502:8989 #Eonarr
- 7501:7878 #Radarr
- 7500:7880 #Jackett
- 7505:5075 #nzbhydra2
- 7506:6789 #nzbget
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
restart: unless-stopped
radarr:
image: "linuxserver/radarr"
container_name: "radarr"
volumes:
- /home/serveradmin/remote/docker/radarr:/config
- /home/serveradmin/remote/downloads/completed:/downloads
- /home/serveradmin/remote/media/movies:/movies
- "/etc/localtime:/etc/localtime:ro"
- /home/serveradmin/remote/docker/shared:/shared
restart: always
network_mode: "service:wireguard-client"
depends_on:
- wireguard-client
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
and
[Interface]
PrivateKey = xxxx
Address = x.x.x.x/32
DNS = x.x.x.x
PostUp=ip route add x.x.x.x/20 via $(ip route |awk '/default/ {print $3}') dev eth0
PostDown=ip route del x.x.x.x/20 via $(ip route |awk '/default/ {print $3}') dev eth0
[Peer]
PublicKey = xxxx
AllowedIPs = 0.0.0.0/5, 8.0.0.0/7, 11.0.0.0/8, 12.0.0.0/6, 16.0.0.0/4, 32.0.0.0/3, 64.0.0.0/2, 128.0.0.0/3, 160.0.0.0/5, 168.0.0.0/6, 172.0.0.0/12, 172.32.0.0/11, 172.64.0.0/10, 172.128.0.0/9, 173.0.0.0/8, 174.0.0.0/7, 176.0.0.0/4, 192.0.0.0/9, 192.128.0.0/11, 192.160.0.0/13, 192.169.0.0/16, 192.170.0.0/15, 192.172.0.0/14, 192.176.0.0/12, 192.192.0.0/10, 194.0.0.0/7, 196.0.0.0/6, 200.0.0.0/5, 208.0.0.0/4, 8.8.8.8/32, 10.64.0.0/10
Endpoint = x.x.x.x:51820
Thank you!