I want to use wireguard container in client mode as a gateway for my other containers so the other containers would have access to the internet using wireguard vpn. I’m running wireguard container using this command:
docker create \ --name=wireguard \ --privileged \ -e PUID=1000 \ -e PGID=1000 \ -e TZ=Europe/London \ -v /path/to/client/config/file:/config \ --sysctl="net.ipv4.conf.all.src_valid_mark=1" \ --sysctl="net.ipv6.conf.all.disable_ipv6=0" \ linuxserver/wireguard
Everything works fine when I have
AllowedIPs = 0.0.0.0/0 in the config file and all the traffic goes through wireguard vpn. But I need to change AllowedIPs and customize it, and when I changed it to something like
AllowedIPs = 0.0.0.0/1, 18.104.22.168/1 wireguard container lost its internet access and had no connection to the internet at all. I couldn’t figure out the problem, even in the logs I saw no error message…
P.S: No wireguard tag for topics?!