I have an Ubuntu 20.04.1 LTS to host a linuxserver/wireguard Docker container. Clients can successfully connect to the Wireguard server, but I'm unable browse Internet websites on the clients while they're connected. How do I configure my Wireguard server to achieve this?
My internal network is 192.168.0.0/24 with the gateway at 192.168.0.1 and the Ubuntu server at 192.168.0.2.
My docker-compose.yml
version: "3.6"
services:
portainer:
image: portainer/portainer-ce
container_name: portainer
restart: always
command: -H unix:///var/run/docker.sock
ports:
- "9000:9000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${USERDIR}/docker/portainer/data:/data
- ${USERDIR}/docker/shared:/shared
environment:
- TZ='America/Chicago'
watchtower:
container_name: watchtower
restart: always
image: v2tec/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --schedule "0 0 4 * * *" --cleanup
plexms:
container_name: plexms
restart: unless-stopped
image: plexinc/pms-docker
volumes:
- ${USERDIR}/docker/plexms:/config
- ${USERDIR}/Downloads/plex_tmp:/transcode
- /srv/media:/srv/media
- ${USERDIR}/docker/shared:/shared
network_mode: host
environment:
- TZ=${TZ}
- HOSTNAME="Docker Plex"
- PLEX_CLAIM=<redacted>
- PLEX_UID=${PUID}
- PLEX_GID=${PGID}
- ADVERTISE_IP="http://192.168.0.2:32400/"
wireguard:
image: ghcr.io/linuxserver/wireguard
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
- SERVERURL=<redacted> #optional
- SERVERPORT=51820 #optional
- PEERS=1 #optional
- PEERDNS=8.8.8.8 #optional
# - INTERNAL_SUBNET=10.13.13.0 #optional
- ALLOWEDIPS=0.0.0.0/0, ::/0 #optional
volumes:
- ${USERDIR}/docker/wireguard/config:/config
- /lib/modules:/lib/modules
ports:
- 51820:51820/udp
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
restart: unless-stopped