Git Product home page Git Product logo

docker-wireguard's Introduction

linuxserver.io

Blog Discord Discourse Fleet GitHub Open Collective

The LinuxServer.io team brings you another container release featuring:

  • regular and timely application updates
  • easy user mappings (PGID, PUID)
  • custom base image with s6 overlay
  • weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
  • regular security updates

Find us at:

  • Blog - all the things you can do with our containers including How-To guides, opinions and much more!
  • Discord - realtime support / chat with the community and the team.
  • Discourse - post on our community forum.
  • Fleet - an online web interface which displays all of our maintained images.
  • GitHub - view the source for all of our repositories.
  • Open Collective - please consider helping us by either donating or contributing to our budget

Scarf.io pulls GitHub Stars GitHub Release GitHub Package Repository GitLab Container Registry Quay.io Docker Pulls Docker Stars Jenkins Build

WireGuard® is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec, while avoiding the massive headache. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general purpose VPN for running on embedded interfaces and super computers alike, fit for many different circumstances. Initially released for the Linux kernel, it is now cross-platform (Windows, macOS, BSD, iOS, Android) and widely deployable. It is currently under heavy development, but already it might be regarded as the most secure, easiest to use, and simplest VPN solution in the industry.

wireguard

Supported Architectures

We utilise the docker manifest for multi-platform awareness. More information is available from docker here and our announcement here.

Simply pulling lscr.io/linuxserver/wireguard:latest should retrieve the correct image for your arch, but you can also pull specific arch images via tags.

The architectures supported by this image are:

Architecture Available Tag
x86-64 amd64-<version tag>
arm64 arm64v8-<version tag>
armhf

Version Tags

This image provides various versions that are available via tags. Please read the descriptions carefully and exercise caution when using unstable or development tags.

Tag Available Description
latest Stable releases based on Alpine without support for compiling Wireguard modules.
legacy Stable releases with support for compiling Wireguard modules for older kernels.

Application Setup

During container start, it will first check if the wireguard module is already installed and loaded. Kernels newer than 5.6 generally have the wireguard module built-in (along with some older custom kernels). However, the module may not be enabled. Make sure it is enabled prior to starting the container.

This can be run as a server or a client, based on the parameters used.

Note on iptables

Some hosts may not load the iptables kernel modules by default. In order for the container to be able to load them, you need to assign the SYS_MODULE capability and add the optional /lib/modules volume mount. Alternatively you can modprobe them from the host before starting the container.

Server Mode

If the environment variable PEERS is set to a number or a list of strings separated by comma, the container will run in server mode and the necessary server and peer/client confs will be generated. The peer/client config qr codes will be output in the docker log if LOG_CONFS is set to true. They will also be saved in text and png format under /config/peerX in case PEERS is a variable and an integer or /config/peer_X in case a list of names was provided instead of an integer.

Variables SERVERURL, SERVERPORT, INTERNAL_SUBNET, PEERDNS, INTERFACE, ALLOWEDIPS and PERSISTENTKEEPALIVE_PEERS are optional variables used for server mode. Any changes to these environment variables will trigger regeneration of server and peer confs. Peer/client confs will be recreated with existing private/public keys. Delete the peer folders for the keys to be recreated along with the confs.

To add more peers/clients later on, you increment the PEERS environment variable or add more elements to the list and recreate the container.

To display the QR codes of active peers again, you can use the following command and list the peer numbers as arguments: docker exec -it wireguard /app/show-peer 1 4 5 or docker exec -it wireguard /app/show-peer myPC myPhone myTablet (Keep in mind that the QR codes are also stored as PNGs in the config folder).

The templates used for server and peer confs are saved under /config/templates. Advanced users can modify these templates and force conf generation by deleting /config/wg_confs/wg0.conf and restarting the container.

The container managed server conf is hardcoded to wg0.conf. However, the users can add additional tunnel config files with .conf extensions into /config/wg_confs/ and the container will attempt to start them all in alphabetical order. If any one of the tunnels fail, they will all be stopped and the default route will be deleted, requiring user intervention to fix the invalid conf and a container restart.

Client Mode

Do not set the PEERS environment variable. Drop your client conf(s) into the config folder as /config/wg_confs/<tunnel name>.conf and start the container. If there are multiple tunnel configs, the container will attempt to start them all in alphabetical order. If any one of the tunnels fail, they will all be stopped and the default route will be deleted, requiring user intervention to fix the invalid conf and a container restart.

If you get IPv6 related errors in the log and connection cannot be established, edit the AllowedIPs line in your peer/client wg0.conf to include only 0.0.0.0/0 and not ::/0; and restart the container.

Road warriors, roaming and returning home

If you plan to use Wireguard both remotely and locally, say on your mobile phone, you will need to consider routing. Most firewalls will not route ports forwarded on your WAN interface correctly to the LAN out of the box. This means that when you return home, even though you can see the Wireguard server, the return packets will probably get lost.

This is not a Wireguard specific issue and the two generally accepted solutions are NAT reflection (setting your edge router/firewall up in such a way as it translates internal packets correctly) or split horizon DNS (setting your internal DNS to return the private rather than public IP when connecting locally).

Both of these approaches have positives and negatives however their setup is out of scope for this document as everyone's network layout and equipment will be different.

Maintaining local access to attached services

** Note: This is not a supported configuration by Linuxserver.io - use at your own risk.

When routing via Wireguard from another container using the service option in docker, you might lose access to the containers webUI locally. To avoid this, exclude the docker subnet from being routed via Wireguard by modifying your wg0.conf like so (modifying the subnets as you require):

[Interface]
PrivateKey = <private key>
Address = 9.8.7.6/32
DNS = 8.8.8.8
PostUp = DROUTE=$(ip route | grep default | awk '{print $3}'); HOMENET=192.168.0.0/16; HOMENET2=10.0.0.0/8; HOMENET3=172.16.0.0/12; ip route add $HOMENET3 via $DROUTE;ip route add $HOMENET2 via $DROUTE; ip route add $HOMENET via $DROUTE;iptables -I OUTPUT -d $HOMENET -j ACCEPT;iptables -A OUTPUT -d $HOMENET2 -j ACCEPT; iptables -A OUTPUT -d $HOMENET3 -j ACCEPT;  iptables -A OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT
PreDown = DROUTE=$(ip route | grep default | awk '{print $3}'); HOMENET=192.168.0.0/16; HOMENET2=10.0.0.0/8; HOMENET3=172.16.0.0/12; ip route del $HOMENET3 via $DROUTE;ip route del $HOMENET2 via $DROUTE; ip route del $HOMENET via $DROUTE; iptables -D OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT; iptables -D OUTPUT -d $HOMENET -j ACCEPT; iptables -D OUTPUT -d $HOMENET2 -j ACCEPT; iptables -D OUTPUT -d $HOMENET3 -j ACCEPT

Site-to-site VPN

** Note: This is not a supported configuration by Linuxserver.io - use at your own risk.

Site-to-site VPN in server mode requires customizing the AllowedIPs statement for a specific peer in wg0.conf. Since wg0.conf is autogenerated when server vars are changed, it is not recommended to edit it manually.

In order to customize the AllowedIPs statement for a specific peer in wg0.conf, you can set an env var SERVER_ALLOWEDIPS_PEER_<peer name or number> to the additional subnets you'd like to add, comma separated and excluding the peer IP (ie. "192.168.1.0/24,192.168.2.0/24"). Replace <peer name or number> with either the name or number of a peer (whichever is used in the PEERS var).

For instance SERVER_ALLOWEDIPS_PEER_laptop="192.168.1.0/24,192.168.2.0/24" will result in the wg0.conf entry AllowedIPs = 10.13.13.2,192.168.1.0/24,192.168.2.0/24 for the peer named laptop.

Keep in mind that this var will only be considered when the confs are regenerated. Adding this var for an existing peer won't force a regeneration. You can delete wg0.conf and restart the container to force regeneration if necessary.

Don't forget to set the necessary POSTUP and POSTDOWN rules in your client's peer conf for lan access.

Usage

To help you get started creating a container from this image you can either use docker-compose or the docker cli.

docker-compose (recommended, click here for more info)

---
services:
  wireguard:
    image: lscr.io/linuxserver/wireguard:latest
    container_name: wireguard
    cap_add:
      - NET_ADMIN
      - SYS_MODULE #optional
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - SERVERURL=wireguard.domain.com #optional
      - SERVERPORT=51820 #optional
      - PEERS=1 #optional
      - PEERDNS=auto #optional
      - INTERNAL_SUBNET=10.13.13.0 #optional
      - ALLOWEDIPS=0.0.0.0/0 #optional
      - PERSISTENTKEEPALIVE_PEERS= #optional
      - LOG_CONFS=true #optional
    volumes:
      - /path/to/wireguard/config:/config
      - /lib/modules:/lib/modules #optional
    ports:
      - 51820:51820/udp
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    restart: unless-stopped
docker run -d \
  --name=wireguard \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE `#optional` \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -e SERVERURL=wireguard.domain.com `#optional` \
  -e SERVERPORT=51820 `#optional` \
  -e PEERS=1 `#optional` \
  -e PEERDNS=auto `#optional` \
  -e INTERNAL_SUBNET=10.13.13.0 `#optional` \
  -e ALLOWEDIPS=0.0.0.0/0 `#optional` \
  -e PERSISTENTKEEPALIVE_PEERS= `#optional` \
  -e LOG_CONFS=true `#optional` \
  -p 51820:51820/udp \
  -v /path/to/wireguard/config:/config \
  -v /lib/modules:/lib/modules `#optional` \
  --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
  --restart unless-stopped \
  lscr.io/linuxserver/wireguard:latest

Parameters

Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate <external>:<internal> respectively. For example, -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 outside the container.

Parameter Function
-p 51820/udp wireguard port
-e PUID=1000 for UserID - see below for explanation
-e PGID=1000 for GroupID - see below for explanation
-e TZ=Etc/UTC specify a timezone to use, see this list.
-e SERVERURL=wireguard.domain.com External IP or domain name for docker host. Used in server mode. If set to auto, the container will try to determine and set the external IP automatically
-e SERVERPORT=51820 External port for docker host. Used in server mode.
-e PEERS=1 Number of peers to create confs for. Required for server mode. Can also be a list of names: myPC,myPhone,myTablet (alphanumeric only)
-e PEERDNS=auto DNS server set in peer/client configs (can be set as 8.8.8.8). Used in server mode. Defaults to auto, which uses wireguard docker host's DNS via included CoreDNS forward.
-e INTERNAL_SUBNET=10.13.13.0 Internal subnet for the wireguard and server and peers (only change if it clashes). Used in server mode.
-e ALLOWEDIPS=0.0.0.0/0 The IPs/Ranges that the peers will be able to reach using the VPN connection. If not specified the default value is: '0.0.0.0/0, ::0/0' This will cause ALL traffic to route through the VPN, if you want split tunneling, set this to only the IPs you would like to use the tunnel AND the ip of the server's WG ip, such as 10.13.13.1.
-e PERSISTENTKEEPALIVE_PEERS= Set to all or a list of comma separated peers (ie. 1,4,laptop) for the wireguard server to send keepalive packets to listed peers every 25 seconds. Useful if server is accessed via domain name and has dynamic IP. Used only in server mode.
-e LOG_CONFS=true Generated QR codes will be displayed in the docker log. Set to false to skip log output.
-v /config Contains all relevant configuration files.
-v /lib/modules Host kernel modules for situations where they're not already loaded.
--sysctl= Required for client mode.

Portainer notice

This image utilises cap_add or sysctl to work properly. This is not implemented properly in some versions of Portainer, thus this image may not work if deployed through Portainer.

Environment variables from files (Docker secrets)

You can set any environment variable from a file by using a special prepend FILE__.

As an example:

-e FILE__MYVAR=/run/secrets/mysecretvariable

Will set the environment variable MYVAR based on the contents of the /run/secrets/mysecretvariable file.

Umask for running applications

For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional -e UMASK=022 setting. Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up here before asking for support.

User / Group Identifiers

When using volumes (-v flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user PUID and group PGID.

Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.

In this instance PUID=1000 and PGID=1000, to find yours use id your_user as below:

id your_user

Example output:

uid=1000(your_user) gid=1000(your_user) groups=1000(your_user)

Docker Mods

Docker Mods Docker Universal Mods

We publish various Docker Mods to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.

Support Info

  • Shell access whilst the container is running:

    docker exec -it wireguard /bin/bash
  • To monitor the logs of the container in realtime:

    docker logs -f wireguard
  • Container version number:

    docker inspect -f '{{ index .Config.Labels "build_version" }}' wireguard
  • Image version number:

    docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/wireguard:latest

Updating Info

Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the Application Setup section above to see if it is recommended for the image.

Below are the instructions for updating containers:

Via Docker Compose

  • Update images:

    • All images:

      docker-compose pull
    • Single image:

      docker-compose pull wireguard
  • Update containers:

    • All containers:

      docker-compose up -d
    • Single container:

      docker-compose up -d wireguard
  • You can also remove the old dangling images:

    docker image prune

Via Docker Run

  • Update the image:

    docker pull lscr.io/linuxserver/wireguard:latest
  • Stop the running container:

    docker stop wireguard
  • Delete the container:

    docker rm wireguard
  • Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your /config folder and settings will be preserved)

  • You can also remove the old dangling images:

    docker image prune

Image Update Notifications - Diun (Docker Image Update Notifier)

tip: We recommend Diun for update notifications. Other tools that automatically update containers unattended are not recommended or supported.

Building locally

If you want to make local modifications to these images for development purposes or just to customize the logic:

git clone https://github.com/linuxserver/docker-wireguard.git
cd docker-wireguard
docker build \
  --no-cache \
  --pull \
  -t lscr.io/linuxserver/wireguard:latest .

The ARM variants can be built on x86_64 hardware using multiarch/qemu-user-static

docker run --rm --privileged multiarch/qemu-user-static:register --reset

Once registered you can define the dockerfile to use with -f Dockerfile.aarch64.

Versions

  • 24.05.24: - Rebase to Alpine 3.20, install wireguard-tools from Alpine repo.
  • 10.03.24: - Use iptables-legacy on Alpine 3.19.
  • 05.03.24: - Rebase master to Alpine 3.19.
  • 03.10.23: - Potentially Breaking Change: Support for multiple interfaces added. Wireguard confs moved to /config/wg_confs/. Any file with a .conf extension in that folder will be treated as a live tunnel config and will be attempted to start. If any of the tunnels fail, all tunnels will be stopped. Tunnels are started in alphabetical order. Managed server conf will continue to be hardcoded to wg0.conf.
  • 28.06.23: - Rebase master to Alpine 3.18 again.
  • 26.06.23: - Revert master to Alpine 3.17, due to issue with openresolv.
  • 24.06.23: - Rebase master to Alpine 3.18, deprecate armhf as per https://www.linuxserver.io/armhf.
  • 26.04.23: - Rework branches. Swap alpine and ubuntu builds.
  • 29.01.23: - Rebase to alpine 3.17.
  • 10.01.23: - Add new var to add PersistentKeepalive to server config for select peers to survive server IP changes when domain name is used.
  • 26.10.22: - Better handle unsupported peer names. Improve logging.
  • 12.10.22: - Add Alpine branch. Optimize wg and coredns services.
  • 04.10.22: - Rebase to Jammy. Upgrade to s6v3.
  • 16.05.22: - Improve NAT handling in server mode when multiple ethernet devices are present.
  • 23.04.22: - Add pre-shared key support. Automatically added to all new peer confs generated, existing ones are left without to ensure no breaking changes.
  • 10.04.22: - Rebase to Ubuntu Focal. Add LOG_CONFS env var. Remove deprecated add-peer command.
  • 28.10.21: - Add site-to-site vpn support.
  • 11.02.21: - Fix bug related to changing internal subnet and named peer confs not updating.
  • 06.10.20: - Disable CoreDNS in client mode, or if port 53 is already in use in server mode.
  • 04.10.20: - Allow to specify a list of names as PEERS and add ALLOWEDIPS environment variable. Also, add peer name/id to each one of the peer sections in wg0.conf. Important: Existing users need to delete /config/templates/peer.conf and restart
  • 27.09.20: - Cleaning service binding example to have accurate PreDown script.
  • 06.08.20: - Replace resolvconf with openresolv due to dns issues when a client based on this image is connected to a server also based on this image. Add IPv6 info to readme. Display kernel version in logs.
  • 29.07.20: - Update Coredns config to detect dns loops (existing users need to delete /config/coredns/Corefile and restart).
  • 27.07.20: - Update Coredns config to prevent issues with non-user-defined bridge networks (existing users need to delete /config/coredns/Corefile and restart).
  • 05.07.20: - Add Debian updates and security repos for headers.
  • 25.06.20: - Simplify module tests, prevent iptables issues from resulting in false negatives.
  • 19.06.20: - Add support for Ubuntu Focal (20.04) kernels. Compile wireguard tools and kernel module instead of using the ubuntu packages. Make module install optional. Improve verbosity in logs.
  • 29.05.20: - Add support for 64bit raspbian.
  • 28.04.20: - Add Buster/Stretch backports repos for Debian. Tested with OMV 5 and OMV 4 (on kernel 4.19.0-0.bpo.8-amd64).
  • 20.04.20: - Fix typo in client mode conf existence check.
  • 13.04.20: - Fix bug that forced conf recreation on every start.
  • 08.04.20: - Add arm32/64 builds and enable multi-arch (rpi4 with ubuntu and raspbian buster tested). Add CoreDNS for PEERDNS=auto setting. Update the add-peer/show-peer scripts to utilize the templates and the INTERNAL_SUBNET var (previously missed, oops).
  • 05.04.20: - Add INTERNAL_SUBNET variable to prevent subnet clashes. Add templates for server and peer confs.
  • 01.04.20: - Add show-peer script and include info on host installed headers.
  • 31.03.20: - Initial Release.

docker-wireguard's People

Contributors

aptalca avatar chrisbraucker avatar cristiangauma avatar drizuid avatar ironicbadger avatar j0nnymoe avatar linuxserver-ci avatar miguelndecarvalho avatar nemchik avatar nomandera avatar quietsy avatar thelamer avatar thespad avatar tokugero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-wireguard's Issues

Server port variable not used for interface listen port

linuxserver.io

The templates included in the image I pulled (using linuxserver/wireguard:latest on both an arm64 device and an amd64 device) have the interface ListenPort hard-coded as 51820, where the endpoint in the peer configuration correctly uses ${SERVERPORT} to use the port defined in the docker-compose.yml


Expected Behavior

Defining a port with SERVERPORT: <port> inside of the docker-compose.yml environment variables will generate configurations using that port as ListenPort in Interface configuration and Endpoint configuration on peers.

Current Behavior

Defining a non-default port creates a mis-match between Interface and Peer configuration, which prevents a connection from being established.

Steps to Reproduce

  1. pull latest image (as of 07/29)
  2. make a docker compose using the template provided in readme
  3. change SERVERPORT environment declaration to any unused port other than 51820
  4. run the container to generate configuration files
  5. inspect /wg0.conf and Interface port will not be the port defined

Environment

OS: Linux (Ubuntu 20.04 and Debian 10)
CPU architecture: x86_64/arm64 (arm32 untested)
How docker service was installed: included in official repos (Ubuntu) bundled in (linode docker image)

Command used to create docker container (run/create/compose/screenshot)

docker-compose.yml:

version: "2.1"
services:
  wireguard:
    image: linuxserver/wireguard
    container_name: wireguard
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - TZ=America/New_York
      - SERVERURL=li1274-251.members.linode.com
      - SERVERPORT=55555
      - PEERS=1
    ports:
      - 55555:55555/udp
    volumes:
      - ./wireguard_config.d:/config
      - /lib/modules:/lib/modules
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    networks:
      - vpn
    restart: unless-stopped
...

Docker logs

N/A

wireguard-go option

Expected Behavior

work independent of host os kernel modules

Current Behavior

requires wireguard kernel modules available on the host

Context

Wireguard does also have a userspace option to run, called wireguard-go (https://git.zx2c4.com/wireguard-go)
It would be great to have a version of docker-wireguard based on that.

Raspberry pi4 Linux raspberrypi 5.4.61-v7l+ "Kernel headers don't seem to be available, can't compile the module. Sleeping now"

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.


Expected Behavior

Log:
"Kernel headers don't seem to be available, can't compile the module. Sleeping now"

Current Behavior

Steps to Reproduce

"Docker version"
Client: Docker Engine - Community
Version: 19.03.12
API version: 1.40
Go version: go1.13.10
Git commit: 48a6621
Built: Mon Jun 22 15:53:41 2020
OS/Arch: linux/arm
Experimental: false

"uname -a"
Linux raspberrypi 5.4.61-v7l+ #1339 SMP Tue Sep 1 18:51:27 BST 2020 armv7l GNU/Linux

I tried install headers " sudo apt install linux-headers"
I tried Mapped " - /usr/src:/usr/src"

Environment

OS:
CPU architecture: /arm32 /arm64
How docker service was installed:
"Docker version" Client: Docker Engine - Community Version: 19.03.12

Command used to create docker container (run/create/compose/screenshot)

Docker-compose.yml:

version: "3.5"
services:
wireguard:
image: linuxserver/wireguard
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Madrid
- SERVERURL=-------.duckdns.org #optional
- SERVERPORT=51820 #optional
- PEERS=1 #optional
- PEERDNS=auto #optional
- INTERNAL_SUBNET=10.13.13.0 #optional
volumes:
- ./wireguard_config:/config
- /lib/modules:/lib/modules
- /usr/src:/usr/src
ports:
- 51820:51820/udp
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
restart: unless-stopped

Docker logs

Attaching to wireguard
wireguard | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
wireguard | [s6-init] ensuring user provided files have correct perms...exited 0.
wireguard | [fix-attrs.d] applying ownership & permissions fixes...
wireguard | [fix-attrs.d] done.
wireguard | [cont-init.d] executing container initialization scripts...
wireguard | [cont-init.d] 01-envfile: executing...
wireguard | [cont-init.d] 01-envfile: exited 0.
wireguard | [cont-init.d] 10-adduser: executing...
wireguard |
wireguard | -------------------------------------
wireguard | _ ()
wireguard | | | ___ _ __
wireguard | | | / | | | / \
wireguard | | | _
\ | | | () |
wireguard | || |
/ || __/
wireguard |
wireguard |
wireguard | Brought to you by linuxserver.io
wireguard | -------------------------------------
wireguard |
wireguard | To support the app dev(s) visit:
wireguard | WireGuard: https://www.wireguard.com/donations/
wireguard |
wireguard | To support LSIO projects visit:
wireguard | https://www.linuxserver.io/donate/
wireguard | -------------------------------------
wireguard | GID/UID
wireguard | -------------------------------------
wireguard |
wireguard | User uid: 1000
wireguard | User gid: 1000
wireguard | -------------------------------------
wireguard |
wireguard | [cont-init.d] 10-adduser: exited 0.
wireguard | [cont-init.d] 30-config: executing...
wireguard | Uname info: Linux 6c8d7c2b1a90 5.4.61-v7l+ #1339 SMP Tue Sep 1 18:51:27 BST 2020 armv7l armv7l armv7l GNU/Linux
wireguard | Error: Unknown device type.
wireguard | **** The wireguard module is not active, will attempt kernel header install and module compilation. ****
wireguard | **** Attempting kernel header install ****
wireguard | Get:1 http://ports.ubuntu.com/ubuntu-ports bionic InRelease [242 kB]
wireguard | Get:2 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease [88.7 kB]
wireguard | Get:3 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease [74.6 kB]
wireguard | Get:4 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease [88.7 kB]
wireguard | Get:5 http://ports.ubuntu.com/ubuntu-ports bionic/universe armhf Packages [11.0 MB]
wireguard | Get:6 http://ports.ubuntu.com/ubuntu-ports bionic/restricted armhf Packages [12.5 kB]
wireguard | Get:7 http://ports.ubuntu.com/ubuntu-ports bionic/main armhf Packages [1,277 kB]
wireguard | Get:8 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse armhf Packages [157 kB]
wireguard | Get:9 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted armhf Packages [11.0 kB]
wireguard | Get:10 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe armhf Packages [1,182 kB]
wireguard | Get:11 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main armhf Packages [851 kB]
wireguard | Get:12 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse armhf Packages [4,825 B]
wireguard | Get:13 http://ports.ubuntu.com/ubuntu-ports bionic-backports/main armhf Packages [8,247 B]
wireguard | Get:14 http://ports.ubuntu.com/ubuntu-ports bionic-backports/universe armhf Packages [8,101 B]
wireguard | Get:15 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe armhf Packages [712 kB]
wireguard | Get:16 http://ports.ubuntu.com/ubuntu-ports bionic-security/main armhf Packages [587 kB]
wireguard | Get:17 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse armhf Packages [1,849 B]
wireguard | Get:18 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted armhf Packages [5,504 B]
wireguard | Fetched 16.3 MB in 6s (2,950 kB/s)
wireguard | Reading package lists...
wireguard | **** Raspbian kernel naming convention detected, attempting to install raspbian kernel headers ****
wireguard | Warning: apt-key output should not be parsed (stdout is not a terminal)
wireguard | OK
wireguard | Hit:1 http://ports.ubuntu.com/ubuntu-ports bionic InRelease
wireguard | Get:2 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
wireguard | Hit:3 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease
wireguard | Hit:4 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease
wireguard | Hit:5 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease
wireguard | Get:6 http://archive.raspberrypi.org/debian buster/main Sources [93.7 kB]
wireguard | Get:7 http://archive.raspberrypi.org/debian buster/main armhf Packages [331 kB]
wireguard | Fetched 457 kB in 2s (222 kB/s)
wireguard | Reading package lists...
wireguard | Reading package lists...
wireguard | Building dependency tree...
wireguard | Reading state information...
wireguard | The following NEW packages will be installed:
wireguard | raspberrypi-kernel-headers
wireguard | 0 upgraded, 1 newly installed, 0 to remove and 8 not upgraded.
wireguard | Need to get 26.2 MB of archives.
wireguard | After this operation, 171 MB of additional disk space will be used.
wireguard | Get:1 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200819-1 [26.2 MB]
wireguard | Fetched 26.2 MB in 5s (5,050 kB/s)
wireguard | Selecting previously unselected package raspberrypi-kernel-headers.
(Reading database ... 13991 files and directories currently installed.)
wireguard | Preparing to unpack .../raspberrypi-kernel-headers_1.20200819-1_armhf.deb ...
wireguard | Unpacking raspberrypi-kernel-headers (1.20200819-1) ...
wireguard | Setting up raspberrypi-kernel-headers (1.20200819-1) ...
wireguard | run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51+
wireguard | * dkms: running auto installation service for kernel 5.4.51+ [ OK ]
wireguard | run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51-v7+
wireguard | * dkms: running auto installation service for kernel 5.4.51-v7+ [ OK ]
wireguard | run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51-v7l+
wireguard | * dkms: running auto installation service for kernel 5.4.51-v7l+ [ OK ]
wireguard | run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51-v8+
wireguard | * dkms: running auto installation service for kernel 5.4.51-v8+ [ OK ]
wireguard | **** Kernel headers don't seem to be available, can't compile the module. Sleeping now. . . ****

Kernel Module not loaded

Hey there I'm running a Raspberry Pi 4 with DietPi installed on it.
That is based on debian and it is the 32bit version right now.

While trying to install your docker container via portainer I get this error:

image

here is my stack content to deploy your image:

version: "3.7"

volumes:
  config:

services:
  app:
    image: linuxserver/wireguard:arm32v7-latest
    container_name: wireguard
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
      - SERVERURL=testdomain.dedyn.io #optional
      - SERVERPORT=51820 #optional
      - PEERS=1 #optional
      - PEERDNS=auto #optional
      - INTERNAL_SUBNET=10.13.13.0 #optional
    volumes:
      - config:/config
      - /lib/modules:/lib/modules
    ports:
      - 51820:51820/udp
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    restart: unless-stopped

Am I missing something?

Synology (3.10 kernel/broadwell) - RTNETLINK answers: Operation not permitted

EDIT (for future visitors): While this did "work", I noticed some small other issues related to Wireguard and the older kernel/software the Synology box runs that made me move away from tinkering with it (e.g. I could not get some slightly more advanced firewall rules working as desired).

Solution: Either get a more modern kernel/operating system (somewhat not feasible with limited nature of the NAS boxes), or get an additional machine that can run newer operating system. I considered RaspberryPi, but ultimately had enough budget for a second hand/used "Mini/MicroPC" (i.e. Lenovo Mini, Dell Micro, HP Mini, etc) for a couple hundred dollars. Slapped on a modern linux distro and it does the job.


linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.


Thought I would put this up as a crack at getting this to run on a synology hosted docker. Looks like it compiles wireguard.ko successfully (doesn't appear to error during build), but running into RTNETLINK answers: Operation not permitted bug mentioned in other issues. I know this bit out of the Ubuntu/debian umbrella stated as supported config, but thought might be worth an attempt to least document how far it gets/got.

Expected Behavior

Wireguard starts/runs?

Current Behavior

[#] ip link add wg0 type wireguard
RTNETLINK answers: Operation not permitted
Unable to access interface: Protocol not supported
[#] ip link delete dev wg0
Cannot find device "wg0"

Steps to Reproduce

  1. Figure out architecture of machine uname -a - looks like running broadwell
  2. Download headers from synology toolkit, specifically the broadwell one: https://sourceforge.net/projects/dsgpl/files/toolkit/DSM6.2/ds.broadwell-6.2.dev.txz/download
  3. Extract archive locally, pull build folder located in archive at ds.broadwell-6.2.dev/usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/lib/modules/DSM-6.2/build
  4. Upload build folder to Synology.
  5. Create container using Wireguard:latest, mounting /config to newly created directory, and PEERS=1 to enable server mode.
  6. Mount previously uploaded build folder as /lib/modules within docker container.
  7. Launch container, no special privileges.
  8. Observe what appears to be successful build of wireguard.ko.
  9. Observe error(s) when attempting to bring up wireguard:
[#] ip link add wg0 type wireguard
RTNETLINK answers: Operation not permitted
Unable to access interface: Protocol not supported
[#] ip link delete dev wg0
Cannot find device "wg0"

Environment

OS: Synology DSM 6.2-23739 Update 2
CPU architecture: Linux 3.10.105 #23739 SMP Tue Jul 10 00:17:06 CST 2018 x86_64 GNU/Linux synology_broadwell_3617xs
How docker service was installed: Synology package service

Command used to create docker container (run/create/compose/screenshot)

{
   "cap_add" : null,
   "cap_drop" : null,
   "cmd" : "",
   "cpu_priority" : 50,
   "devices" : null,
   "enable_publish_all_ports" : false,
   "enable_restart_policy" : false,
   "enabled" : false,
   "entrypoint_default" : "/init",
   "env_variables" : [
      {
         "key" : "PATH",
         "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
      },
      {
         "key" : "HOME",
         "value" : "/root"
      },
      {
         "key" : "LANGUAGE",
         "value" : "en_US.UTF-8"
      },
      {
         "key" : "LANG",
         "value" : "en_US.UTF-8"
      },
      {
         "key" : "TERM",
         "value" : "xterm"
      },
      {
         "key" : "DEBIAN_FRONTEND",
         "value" : "noninteractive"
      },
      {
         "key" : "PEERS",
         "value" : "1"
      }
   ],
   "exporting" : false,
   "id" : "{snipped}",
   "image" : "linuxserver/wireguard:latest",
   "is_ddsm" : false,
   "is_package" : false,
   "links" : [],
   "memory_limit" : 0,
   "name" : "wireguard",
   "network" : [
      {
         "driver" : "bridge",
         "name" : "bridge"
      }
   ],
   "network_mode" : "bridge",
   "port_bindings" : [
      {
         "container_port" : 51820,
         "host_port" : 51820,
         "type" : "udp"
      }
   ],
   "privileged" : false,
   "shortcut" : {
      "enable_shortcut" : false
   },
   "use_host_network" : false,
   "volume_bindings" : [
      {
         "host_volume_file" : "/docker/wireguard/config",
         "mount_point" : "/config",
         "type" : "rw"
      },
      {
         "host_volume_file" : "/docker/wireguard/headers",
         "mount_point" : "/lib/modules",
         "type" : "rw"
      }
   ]
}

Docker logs

"docker logs wireguard"

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing... 
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing... 
usermod: no changes

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \ 
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
WireGuard: https://www.wireguard.com/donations/

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    911
User gid:    911
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing... 
Get:1 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]         
Get:2 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic InRelease [15.9 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]     
Get:5 http://archive.ubuntu.com/ubuntu bionic/universe Sources [11.5 MB]       
Get:6 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main Sources [1,167 B]
Get:7 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main amd64 Packages [886 B]
Get:8 http://archive.ubuntu.com/ubuntu bionic/main Sources [1,063 kB]          
Get:9 http://archive.ubuntu.com/ubuntu bionic/multiverse Sources [216 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic/restricted Sources [5,823 B]
Get:11 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1,344 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
Get:14 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/restricted Sources [8,685 B]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse Sources [7,158 B]
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main Sources [411 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/universe Sources [373 kB]
Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [20.3 kB]
Get:20 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,397 kB]
Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [80.7 kB]
Get:22 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1,253 kB]
Get:23 http://archive.ubuntu.com/ubuntu bionic-security/main Sources [198 kB]
Get:24 http://archive.ubuntu.com/ubuntu bionic-security/multiverse Sources [3,233 B]
Get:25 http://archive.ubuntu.com/ubuntu bionic-security/restricted Sources [6,302 B]
Get:26 http://archive.ubuntu.com/ubuntu bionic-security/universe Sources [218 kB]
Get:27 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages [960 kB]
Get:28 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [861 kB]
Get:29 http://archive.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [9,092 B]
Get:30 http://archive.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [66.4 kB]
Fetched 32.0 MB in 6s (5,799 kB/s)                          
Reading package lists... Done
No kernel headers found in the Ubuntu or Debian repos!! Will try the headers from host (if mapped), may or may not work
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  dmsetup gettext-base grub-common grub-gfxpayload-lists grub-pc grub-pc-bin
  grub2-common libdevmapper1.02.1 libfreetype6 libfuse2 linux-base
  linux-image-5.3.0-1026-gke linux-image-gke-5.3 linux-modules-5.3.0-1026-gke
  os-prober ucf wireguard-tools
Suggested packages:
  multiboot-doc grub-emu xorriso desktop-base console-setup fuse fdutils
  linux-gke-5.3-doc-5.3.0 | linux-gke-5.3-source-5.3.0 linux-gke-5.3-tools
  linux-headers-5.3.0-1026-gke initramfs-tools | linux-initramfs-tool
The following NEW packages will be installed:
  dmsetup gettext-base grub-common grub-gfxpayload-lists grub-pc grub-pc-bin
  grub2-common libdevmapper1.02.1 libfreetype6 libfuse2 linux-base
  linux-image-5.3.0-1026-gke linux-image-gke-5.3 linux-modules-5.3.0-1026-gke
  os-prober ucf wireguard wireguard-tools
0 upgraded, 18 newly installed, 0 to remove and 0 not upgraded.
Need to get 27.0 MB of archives.
After this operation, 97.0 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libdevmapper1.02.1 amd64 2:1.02.145-4.1ubuntu3.18.04.3 [127 kB]
Get:2 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main amd64 wireguard-tools amd64 1.0.20200513-1~18.04 [88.5 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 dmsetup amd64 2:1.02.145-4.1ubuntu3.18.04.3 [74.4 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-base all 4.5ubuntu1.1 [17.7 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic/main amd64 ucf all 3.0038 [50.5 kB]
Get:6 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main amd64 wireguard all 1.0.20200513-1~18.04 [8,100 B]
Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gettext-base amd64 0.19.8.1-6ubuntu0.3 [113 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 libfuse2 amd64 2.9.7-1ubuntu1 [80.9 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 libfreetype6 amd64 2.8.1-2ubuntu2 [335 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 grub-common amd64 2.02-2ubuntu8.15 [1,775 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 grub2-common amd64 2.02-2ubuntu8.15 [532 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 grub-pc-bin amd64 2.02-2ubuntu8.15 [900 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 grub-pc amd64 2.02-2ubuntu8.15 [138 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic/main amd64 grub-gfxpayload-lists amd64 0.7 [3,658 B]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 linux-modules-5.3.0-1026-gke amd64 5.3.0-1026.28~18.04.1 [14.0 MB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 linux-image-5.3.0-1026-gke amd64 5.3.0-1026.28~18.04.1 [8,778 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 linux-image-gke-5.3 amd64 5.3.0.1026.13 [2,836 B]
Get:18 http://archive.ubuntu.com/ubuntu bionic/main amd64 os-prober amd64 1.74ubuntu1 [19.8 kB]
Fetched 27.0 MB in 4s (7,367 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libdevmapper1.02.1:amd64.
(Reading database ... 45902 files and directories currently installed.)
Preparing to unpack .../00-libdevmapper1.02.1_2%3a1.02.145-4.1ubuntu3.18.04.3_amd64.deb ...
Unpacking libdevmapper1.02.1:amd64 (2:1.02.145-4.1ubuntu3.18.04.3) ...
Selecting previously unselected package dmsetup.
Preparing to unpack .../01-dmsetup_2%3a1.02.145-4.1ubuntu3.18.04.3_amd64.deb ...
Unpacking dmsetup (2:1.02.145-4.1ubuntu3.18.04.3) ...
Selecting previously unselected package linux-base.
Preparing to unpack .../02-linux-base_4.5ubuntu1.1_all.deb ...
Unpacking linux-base (4.5ubuntu1.1) ...
Selecting previously unselected package ucf.
Preparing to unpack .../03-ucf_3.0038_all.deb ...
Moving old data out of the way
Unpacking ucf (3.0038) ...
Selecting previously unselected package gettext-base.
Preparing to unpack .../04-gettext-base_0.19.8.1-6ubuntu0.3_amd64.deb ...
Unpacking gettext-base (0.19.8.1-6ubuntu0.3) ...
Selecting previously unselected package libfuse2:amd64.
Preparing to unpack .../05-libfuse2_2.9.7-1ubuntu1_amd64.deb ...
Unpacking libfuse2:amd64 (2.9.7-1ubuntu1) ...
Selecting previously unselected package libfreetype6:amd64.
Preparing to unpack .../06-libfreetype6_2.8.1-2ubuntu2_amd64.deb ...
Unpacking libfreetype6:amd64 (2.8.1-2ubuntu2) ...
Selecting previously unselected package grub-common.
Preparing to unpack .../07-grub-common_2.02-2ubuntu8.15_amd64.deb ...
Unpacking grub-common (2.02-2ubuntu8.15) ...
Selecting previously unselected package grub2-common.
Preparing to unpack .../08-grub2-common_2.02-2ubuntu8.15_amd64.deb ...
Unpacking grub2-common (2.02-2ubuntu8.15) ...
Selecting previously unselected package grub-pc-bin.
Preparing to unpack .../09-grub-pc-bin_2.02-2ubuntu8.15_amd64.deb ...
Unpacking grub-pc-bin (2.02-2ubuntu8.15) ...
Selecting previously unselected package grub-pc.
Preparing to unpack .../10-grub-pc_2.02-2ubuntu8.15_amd64.deb ...
Unpacking grub-pc (2.02-2ubuntu8.15) ...
Selecting previously unselected package grub-gfxpayload-lists.
Preparing to unpack .../11-grub-gfxpayload-lists_0.7_amd64.deb ...
Unpacking grub-gfxpayload-lists (0.7) ...
Selecting previously unselected package linux-modules-5.3.0-1026-gke.
Preparing to unpack .../12-linux-modules-5.3.0-1026-gke_5.3.0-1026.28~18.04.1_amd64.deb ...
Unpacking linux-modules-5.3.0-1026-gke (5.3.0-1026.28~18.04.1) ...
Selecting previously unselected package linux-image-5.3.0-1026-gke.
Preparing to unpack .../13-linux-image-5.3.0-1026-gke_5.3.0-1026.28~18.04.1_amd64.deb ...
Unpacking linux-image-5.3.0-1026-gke (5.3.0-1026.28~18.04.1) ...
Selecting previously unselected package linux-image-gke-5.3.
Preparing to unpack .../14-linux-image-gke-5.3_5.3.0.1026.13_amd64.deb ...
Unpacking linux-image-gke-5.3 (5.3.0.1026.13) ...
Selecting previously unselected package os-prober.
Preparing to unpack .../15-os-prober_1.74ubuntu1_amd64.deb ...
Unpacking os-prober (1.74ubuntu1) ...
Selecting previously unselected package wireguard-tools.
Preparing to unpack .../16-wireguard-tools_1.0.20200513-1~18.04_amd64.deb ...
Unpacking wireguard-tools (1.0.20200513-1~18.04) ...
Selecting previously unselected package wireguard.
Preparing to unpack .../17-wireguard_1.0.20200513-1~18.04_all.deb ...
Unpacking wireguard (1.0.20200513-1~18.04) ...
Setting up wireguard-tools (1.0.20200513-1~18.04) ...
Setting up libfuse2:amd64 (2.9.7-1ubuntu1) ...
Setting up linux-base (4.5ubuntu1.1) ...
Setting up gettext-base (0.19.8.1-6ubuntu0.3) ...
Setting up libdevmapper1.02.1:amd64 (2:1.02.145-4.1ubuntu3.18.04.3) ...
Setting up linux-modules-5.3.0-1026-gke (5.3.0-1026.28~18.04.1) ...
Setting up linux-image-5.3.0-1026-gke (5.3.0-1026.28~18.04.1) ...
I: /vmlinuz.old is now a symlink to boot/vmlinuz-5.3.0-1026-gke
I: /initrd.img.old is now a symlink to boot/initrd.img-5.3.0-1026-gke
I: /vmlinuz is now a symlink to boot/vmlinuz-5.3.0-1026-gke
I: /initrd.img is now a symlink to boot/initrd.img-5.3.0-1026-gke
Setting up ucf (3.0038) ...
Setting up libfreetype6:amd64 (2.8.1-2ubuntu2) ...
Setting up grub-common (2.02-2ubuntu8.15) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Setting up dmsetup (2:1.02.145-4.1ubuntu3.18.04.3) ...
Setting up grub-pc-bin (2.02-2ubuntu8.15) ...
Setting up linux-image-gke-5.3 (5.3.0.1026.13) ...
Setting up grub2-common (2.02-2ubuntu8.15) ...
Setting up os-prober (1.74ubuntu1) ...
Setting up wireguard (1.0.20200513-1~18.04) ...
Setting up grub-gfxpayload-lists (0.7) ...
Setting up grub-pc (2.02-2ubuntu8.15) ...

Creating config file /etc/default/grub with new version
grub-probe: error: failed to get canonical path of `/dev/vg1/volume_1'.
grub-probe: error: failed to get canonical path of `/dev/vg1/volume_1'.
grub-probe: error: failed to get canonical path of `/dev/vg1/volume_1'.
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for linux-image-5.3.0-1026-gke (5.3.0-1026.28~18.04.1) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.3.0-1026-gke
   ...done.
Server mode is selected
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    14  100    14    0     0     36      0 --:--:-- --:--:-- --:--:--    36
SERVERURL var is either not set or is set to "auto", setting external IP to auto detected value of <snipped ip>
External server port is set to 51820. Make sure that port is properly forwarded to port 51820 inside this container
Internal subnet is set to 10.13.13.0
PEERDNS var is either not set or is set to "auto", setting peer DNS to 10.13.13.1 to use wireguard docker host's DNS.
No found wg0.conf found (maybe an initial install), generating 1 server and 1 peer/client confs
PEER 1 QR code: <snipped image>
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing... 
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Warning: `/config/wg0.conf' is world accessible
[#] ip link add wg0 type wireguard
RTNETLINK answers: Operation not permitted
Unable to access interface: Protocol not supported
[#] ip link delete dev wg0
Cannot find device "wg0"
.:53
CoreDNS-1.6.9
linux/amd64, go1.14.1, 1766568

QR Code not working

linuxserver.io


Expected Behavior

QR code should be scannable

Current Behavior

image

Steps to Reproduce

  1. Installed docker on Windows 10 LTSC 2019
  2. Pulled latest wireguard from hub
  3. Created container with 3 peers
  4. All peers QR code doesn't look right

Environment

OS: Windows 10 LTSC 2019
CPU architecture: x86_64
How docker service was installed: Docker official repo

Command used to create docker container (run/create/compose/screenshot)

docker run -d --name=wireguard-server --cap-add=NET_ADMIN --cap-add=SYS_MODULE -e PUID=1000 -e PGID=1000 -e TZ=Australia/Perth -e SERVERURL=XXXXX.ddns.net -e SERVERPORT=51820 -e PEERS=Phone1,Phone2,Tablet1 -e PEERDNS=10.1.1.250 -e INTERNAL_SUBNET=10.13.13.0 -e ALLOWEDIPS=0.0.0.0/0 -p 51820:51820/udp -v /path/to/appdata/config:/config -v /lib/modules:/lib/modules --sysctl="net.ipv4.conf.all.src_valid_mark=1" --restart unless-stopped linuxserver/wireguard

NOTE: 10.1.1.250 is local PiHole service

Docker logs

Not sure how to get logs.

Error when starting container: `/usr/bin/wg-quick: line 85: exec: sudo: not found`

Expected Behavior

Container should start up fine and connect to VPN.

Current Behavior

Container starts but doesn't fully initialize because sudo isn't installed. As a result, the container will not connect in Client Mode to VPN. Only work-around I know of is to install sudo.

Steps to Reproduce

1. Start the container:

docker run -d --name="wireguard" \
    --volume /opt/docker/volumes/wireguard/config:/config \
    --volume /lib/modules:/lib/modules \
    --publish 51820:51820/udp \
    --env UID=1022 \
    --env GID=1022 \
    --cap-add=NET_ADMIN \
    --cap-add=SYS_MODULE \
    --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
    --restart=unless-stopped \
    linuxserver/wireguard

2. Look at the logs with docker logs wireguard:

<...snip...>
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
Uname info: Linux 09ff6bc2fd62 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
**** It seems the wireguard module is already active. Skipping kernel header install and module compilation. ****
**** Client mode selected.
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
/usr/bin/wg-quick: line 85: exec: sudo: not found
.:53
CoreDNS-1.7.1
linux/amd64, go1.15.2, aa82ca6

3. Bash into the container and install sudo via apt install sudo

4. Restart the container and look at the logs

<...snip...>
Uname info: Linux 09ff6bc2fd62 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
**** It seems the wireguard module is already active. Skipping kernel header install and module compilation. ****
**** Client mode selected.
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Warning: `/config/wg0.conf' is world accessible
[#] ip link add wg0 type wireguard
.:53
CoreDNS-1.7.1
linux/amd64, go1.15.2, aa82ca6
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.65.120.72/32 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] resolvconf -a wg0 -m 0 -x
[#] wg set wg0 fwmark 51820
[#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
sysctl: setting key "net.ipv4.conf.all.src_valid_mark": Read-only file system
[#] iptables-restore -n

Environment

OS:

root@server:~# cat /etc/*elease
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

CPU architecture: x86_64

Command used to create docker container (run/create/compose/screenshot)

docker run -d --name="wireguard" \
    --volume /opt/docker/volumes/wireguard/config:/config \
    --volume /lib/modules:/lib/modules \
    --publish 51820:51820/udp \
    --env UID=1022 \
    --env GID=1022 \
    --cap-add=NET_ADMIN \
    --cap-add=SYS_MODULE \
    --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
    --restart=unless-stopped \
    linuxserver/wireguard

Docker logs

root@server:~# docker run -d --name="wireguard" \
>     --volume /opt/docker/volumes/wireguard/config:/config \
>     --volume /lib/modules:/lib/modules \
>     --publish 51820:51820/udp \
>     --env UID=1022 \
>     --env GID=1022 \
>     --cap-add=NET_ADMIN \
>     --cap-add=SYS_MODULE \
>     --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
>     --restart=unless-stopped \
>     linuxserver/wireguard
844a8897c5ece391861fdd05f35111c5851d3f07cfd07e2bef303cc2b7be5522


root@server:~# docker exec -t wireguard sh -c 'curl https://ipinfo.io'
{
  "ip": "<My ISP-provided IP>",
  "city": "<My Actual City>",
  "region": "<My Actual State>",
  "country": "US",
  "loc": "<masked>",
  "org": "AT&T Services, Inc.",
  "postal": "<My Actual Zipcode>",
  "timezone": "America/Chicago",
  "readme": "https://ipinfo.io/missingauth"
}


root@server:~# docker logs wireguard
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...
usermod: no changes

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
WireGuard: https://www.wireguard.com/donations/

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    911
User gid:    911
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
Uname info: Linux 844a8897c5ec 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
**** It seems the wireguard module is already active. Skipping kernel header install and module compilation. ****
**** Client mode selected.
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
/usr/bin/wg-quick: line 85: exec: sudo: not found
.:53
CoreDNS-1.7.1
linux/amd64, go1.15.2, aa82ca6


root@server:~# docker exec -t wireguard sh -c 'apt update && apt install -y sudo'
Get:1 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic/main Sources [1,063 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic/restricted Sources [5,823 B]
Get:6 http://archive.ubuntu.com/ubuntu bionic/multiverse Sources [216 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic/universe Sources [11.5 MB]
Get:8 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
Get:10 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1,344 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main Sources [424 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/universe Sources [383 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse Sources [7,929 B]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/restricted Sources [12.4 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [146 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,434 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [33.9 kB]
Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1,406 kB]
Get:20 http://archive.ubuntu.com/ubuntu bionic-security/main Sources [216 kB]
Get:21 http://archive.ubuntu.com/ubuntu bionic-security/restricted Sources [8,931 B]
Get:22 http://archive.ubuntu.com/ubuntu bionic-security/universe Sources [227 kB]
Get:23 http://archive.ubuntu.com/ubuntu bionic-security/multiverse Sources [3,245 B]
Get:24 http://archive.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [126 kB]
Get:25 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [907 kB]
Get:26 http://archive.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [10.1 kB]
Get:27 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages [1,115 kB]
Fetched 32.6 MB in 4s (8,355 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
9 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  sudo
0 upgraded, 1 newly installed, 0 to remove and 9 not upgraded.
Need to get 427 kB of archives.
After this operation, 1,765 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 sudo amd64 1.8.21p2-3ubuntu1.2 [427 kB]
Fetched 427 kB in 1s (535 kB/s)
Selecting previously unselected package sudo.
(Reading database ... 14245 files and directories currently installed.)
Preparing to unpack .../sudo_1.8.21p2-3ubuntu1.2_amd64.deb ...
Unpacking sudo (1.8.21p2-3ubuntu1.2) ...
Setting up sudo (1.8.21p2-3ubuntu1.2) ...


root@server:~# docker restart wireguard
wireguard


root@server:~# docker logs wireguard
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...
usermod: no changes

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
WireGuard: https://www.wireguard.com/donations/

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    911
User gid:    911
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
Uname info: Linux 844a8897c5ec 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
**** It seems the wireguard module is already active. Skipping kernel header install and module compilation. ****
**** Client mode selected.
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
/usr/bin/wg-quick: line 85: exec: sudo: not found
.:53
CoreDNS-1.7.1
linux/amd64, go1.15.2, aa82ca6
Caught SIGTERM signal!
[INFO] SIGTERM: Shutting down servers then terminating
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
Warning: `/config/wg0.conf' is world accessible
wg-quick: `wg0' is not a WireGuard interface
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...
usermod: no changes

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
WireGuard: https://www.wireguard.com/donations/

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    911
User gid:    911
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
Uname info: Linux 844a8897c5ec 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
**** It seems the wireguard module is already active. Skipping kernel header install and module compilation. ****
**** Client mode selected.
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Warning: `/config/wg0.conf' is world accessible
.:53
CoreDNS-1.7.1
linux/amd64, go1.15.2, aa82ca6
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.65.120.72/32 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] resolvconf -a wg0 -m 0 -x
[#] wg set wg0 fwmark 51820
[#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
sysctl: setting key "net.ipv4.conf.all.src_valid_mark": Read-only file system
[#] iptables-restore -n


root@server:~# docker exec -t wireguard sh -c 'curl https://ipinfo.io'
{
  "ip": "<VPN IP Address>",
  "city": "<VPN City>",
  "region": "<VPN State>",
  "country": "US",
  "loc": "<VPN Coordinates>",
  "org": "Eonix Corporation",
  "postal": "<VPN Zipcode>",
  "timezone": "America/Chicago",
  "readme": "https://ipinfo.io/missingauth"
}

IPv6 Support

It would be nice to have native IPv6 support with config generation etc.

I have added PostUp and Down rules to my template but it does not listen on IPv6 by default. Not sure how I should add that to server.conf template too.

Address = ${INTERFACE}.1

ip6tables -A FORWARD -i %i -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Use Wireguard which has been merged into kernel (>= 5.6)

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.


Expected Behavior

Wireguard container should run on hosts with kernels which have built-in support for Wireguard.

I understand that this is designed for Debian-based systems which run older kernels -- I'm placing this moreso as a feature request. It seems as though all the parts are there, I just have no idea how to utilize the kernel's wireguard from inside a container.

Current Behavior

A module is used no matter what.

Steps to Reproduce

  1. Setup a Fedora host with docker.
  2. Use a similar compose setup:
  wireguard:
    image: linuxserver/wireguard
    container_name: wireguard
    sysctls:
      - "net.ipv4.conf.all.src_valid_mark=1"
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    volumes:
      - /opt/flotilla/config/wireguard:/config:z
      - /lib/modules:/lib/modules
      - /usr/src:/usr/src
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Indianapolis
      - SERVERURL=wireguard.maxocull.com
      - SERVERPORT=51820
      - PEERS=16
      - PEERDNS=84.200.69.80
      - INTERNAL_SUBNET=10.6.0.0
    ports:
      - "51820:51820/udp"
    labels:
      - "com.centurylinklabs.watchtower.enable=true"
    restart: unless-stopped
  1. See these logs:
Attaching to wireguard
�[36mwireguard         |�[0m [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
�[36mwireguard         |�[0m [s6-init] ensuring user provided files have correct perms...exited 0.
�[36mwireguard         |�[0m [fix-attrs.d] applying ownership & permissions fixes...
�[36mwireguard         |�[0m [fix-attrs.d] done.
�[36mwireguard         |�[0m [cont-init.d] executing container initialization scripts...
�[36mwireguard         |�[0m [cont-init.d] 01-envfile: executing... 
�[36mwireguard         |�[0m [cont-init.d] 01-envfile: exited 0.
�[36mwireguard         |�[0m [cont-init.d] 10-adduser: executing... 
�[36mwireguard         |�[0m -------------------------------------
�[36mwireguard         |�[0m           _         ()
�[36mwireguard         |�[0m          | |  ___   _    __
�[36mwireguard         |�[0m          | | / __| | |  /  \ 
�[36mwireguard         |�[0m          | | \__ \ | | | () |
�[36mwireguard         |�[0m          |_| |___/ |_|  \__/
�[36mwireguard         |�[0m Brought to you by linuxserver.io
�[36mwireguard         |�[0m -------------------------------------
�[36mwireguard         |�[0m To support the app dev(s) visit:
�[36mwireguard         |�[0m WireGuard: https://www.wireguard.com/donations/
�[36mwireguard         |�[0m To support LSIO projects visit:
�[36mwireguard         |�[0m https://www.linuxserver.io/donate/
�[36mwireguard         |�[0m -------------------------------------
�[36mwireguard         |�[0m GID/UID
�[36mwireguard         |�[0m -------------------------------------
�[36mwireguard         |�[0m User uid:    1000
�[36mwireguard         |�[0m User gid:    1000
�[36mwireguard         |�[0m -------------------------------------
�[36mwireguard         |�[0m [cont-init.d] 10-adduser: exited 0.
�[36mwireguard         |�[0m [cont-init.d] 30-config: executing... 
�[36mwireguard         |�[0m Uname info: Linux 1914c00e6ae5 5.6.7-200.fc31.x86_64 #1 SMP Thu Apr 23 14:22:57 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
�[36mwireguard         |�[0m Error: Unknown device type.
�[36mwireguard         |�[0m **** The wireguard module is not active, will attempt kernel header install and module compilation. ****
�[36mwireguard         |�[0m **** Kernel headers seem to be present, attempting to build the wireguard module. . . ****
�[36mwireguard         |�[0m /var/run/s6/etc/cont-init.d/30-config: line 115: x509.genkey: Permission denied
�[36mwireguard         |�[0m **** Generating signing key ****
�[36mwireguard         |�[0m Can't open x509.genkey for reading, No such file or directory
�[36mwireguard         |�[0m 139874185314752:error:02001002:system library:fopen:No such file or directory:../crypto/bio/bss_file.c:72:fopen('x509.genkey','r')
�[36mwireguard         |�[0m 139874185314752:error:2006D080:BIO routines:BIO_new_file:no such file:../crypto/bio/bss_file.c:79:
�[36mwireguard         |�[0m Generating a RSA private key
�[36mwireguard         |�[0m ........................................................................................+++++
�[36mwireguard         |�[0m ..............................................................................................................................................................+++++
�[36mwireguard         |�[0m writing new private key to 'signing_key.pem'
�[36mwireguard         |�[0m req: Can't open "signing_key.pem" for writing, Permission denied
�[36mwireguard         |�[0m 139874185314752:error:0E06D06A:configuration file routines:NCONF_get_string:no conf or environment variable:../crypto/conf/conf_lib.c:270:
�[36mwireguard         |�[0m **** Building the module ****
�[36mwireguard         |�[0m make: Entering directory '/app/wireguard-linux-compat/src'
�[36mwireguard         |�[0m   CC [M]  /app/wireguard-linux-compat/src/main.o
�[36mwireguard         |�[0m   CC [M]  /app/wireguard-linux-compat/src/noise.o
�[36mwireguard         |�[0m   CC [M]  /app/wireguard-linux-compat/src/device.o
�[36mwireguard         |�[0m   CC [M]  /app/wireguard-linux-compat/src/peer.o
�[36mwireguard         |�[0m   CC [M]  /app/wireguard-linux-compat/src/timers.o
�[36mwireguard         |�[0m   CC [M]  /app/wireguard-linux-compat/src/queueing.o
�[36mwireguard         |�[0m   CC [M]  /app/wireguard-linux-compat/src/send.o
�[36mwireguard         |�[0m   CC [M]  /app/wireguard-linux-compat/src/receive.o
�[36mwireguard         |�[0m   CC [M]  /app/wireguard-linux-compat/src/socket.o
�[36mwireguard         |�[0m   CC [M]  /app/wireguard-linux-compat/src/peerlookup.o
�[36mwireguard         |�[0m   CC [M]  /app/wireguard-linux-compat/src/allowedips.o
�[36mwireguard         |�[0m   CC [M]  /app/wireguard-linux-compat/src/ratelimiter.o
�[36mwireguard         |�[0m   CC [M]  /app/wireguard-linux-compat/src/cookie.o
�[36mwireguard         |�[0m   CC [M]  /app/wireguard-linux-compat/src/netlink.o
�[36mwireguard         |�[0m   PERLASM /app/wireguard-linux-compat/src/crypto/zinc/chacha20/chacha20-x86_64.S
�[36mwireguard         |�[0m   CC [M]  /app/wireguard-linux-compat/src/crypto/zinc/chacha20/chacha20.o
�[36mwireguard         |�[0m   CC [M]  /app/wireguard-linux-compat/src/crypto/zinc/poly1305/poly1305.o
�[36mwireguard         |�[0m In file included from <command-line>:0:0:
�[36mwireguard         |�[0m /app/wireguard-linux-compat/src/compat/compat.h:46:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m  #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m   ^~~~~
�[36mwireguard         |�[0m In file included from <command-line>:0:0:
�[36mwireguard         |�[0m /app/wireguard-linux-compat/src/compat/compat.h:46:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m  #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m   ^~~~~
�[36mwireguard         |�[0m In file included from <command-line>:0:0:
�[36mwireguard         |�[0m /app/wireguard-linux-compat/src/compat/compat.h:46:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m  #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m   ^~~~~
�[36mwireguard         |�[0m In file included from <command-line>:0:0:
�[36mwireguard         |�[0m /app/wireguard-linux-compat/src/compat/compat.h:46:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m  #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m   ^~~~~
�[36mwireguard         |�[0m In file included from <command-line>:0:0:
�[36mwireguard         |�[0m /app/wireguard-linux-compat/src/compat/compat.h:46:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m  #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m   ^~~~~
�[36mwireguard         |�[0m In file included from <command-line>:0:0:
�[36mwireguard         |�[0m /app/wireguard-linux-compat/src/compat/compat.h:46:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m  #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m   ^~~~~
�[36mwireguard         |�[0m In file included from <command-line>:0:0:
�[36mwireguard         |�[0m /app/wireguard-linux-compat/src/compat/compat.h:46:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m  #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m   ^~~~~
�[36mwireguard         |�[0m In file included from <command-line>:0:0:
�[36mwireguard         |�[0m /app/wireguard-linux-compat/src/compat/compat.h:46:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m  #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m   ^~~~~
�[36mwireguard         |�[0m In file included from <command-line>:0:0:
�[36mwireguard         |�[0m /app/wireguard-linux-compat/src/compat/compat.h:46:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m  #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m   ^~~~~
�[36mwireguard         |�[0m In file included from <command-line>:0:0:
�[36mwireguard         |�[0m /app/wireguard-linux-compat/src/compat/compat.h:46:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m  #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m   ^~~~~
�[36mwireguard         |�[0m In file included from <command-line>:0:0:
�[36mwireguard         |�[0m /app/wireguard-linux-compat/src/compat/compat.h:46:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m  #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m   ^~~~~
�[36mwireguard         |�[0m In file included from <command-line>:0:0:
�[36mwireguard         |�[0m /app/wireguard-linux-compat/src/compat/compat.h:46:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m  #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m   ^~~~~
�[36mwireguard         |�[0m In file included from <command-line>:0:0:
�[36mwireguard         |�[0m /app/wireguard-linux-compat/src/compat/compat.h:46:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m  #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m   ^~~~~
�[36mwireguard         |�[0m In file included from <command-line>:0:0:
�[36mwireguard         |�[0m /app/wireguard-linux-compat/src/compat/compat.h:46:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m  #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m   ^~~~~
�[36mwireguard         |�[0m In file included from <command-line>:0:0:
�[36mwireguard         |�[0m /app/wireguard-linux-compat/src/compat/compat.h:46:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m  #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m   ^~~~~
�[36mwireguard         |�[0m In file included from <command-line>:0:0:
�[36mwireguard         |�[0m /app/wireguard-linux-compat/src/compat/compat.h:46:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m  #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
�[36mwireguard         |�[0m   ^~~~~
�[36mwireguard         |�[0m cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
�[36mwireguard         |�[0m scripts/Makefile.build:267: recipe for target '/app/wireguard-linux-compat/src/crypto/zinc/poly1305/poly1305.o' failed
�[36mwireguard         |�[0m make[2]: *** [/app/wireguard-linux-compat/src/crypto/zinc/poly1305/poly1305.o] Error 1
�[36mwireguard         |�[0m make[2]: *** Waiting for unfinished jobs....
�[36mwireguard         |�[0m cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
�[36mwireguard         |�[0m cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
�[36mwireguard         |�[0m scripts/Makefile.build:267: recipe for target '/app/wireguard-linux-compat/src/cookie.o' failed
�[36mwireguard         |�[0m make[2]: *** [/app/wireguard-linux-compat/src/cookie.o] Error 1
�[36mwireguard         |�[0m scripts/Makefile.build:267: recipe for target '/app/wireguard-linux-compat/src/peerlookup.o' failed
�[36mwireguard         |�[0m make[2]: *** [/app/wireguard-linux-compat/src/peerlookup.o] Error 1
�[36mwireguard         |�[0m cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
�[36mwireguard         |�[0m cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
�[36mwireguard         |�[0m cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
�[36mwireguard         |�[0m cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
�[36mwireguard         |�[0m cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
�[36mwireguard         |�[0m cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
�[36mwireguard         |�[0m scripts/Makefile.build:267: recipe for target '/app/wireguard-linux-compat/src/queueing.o' failed
�[36mwireguard         |�[0m make[2]: *** [/app/wireguard-linux-compat/src/queueing.o] Error 1
�[36mwireguard         |�[0m cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
�[36mwireguard         |�[0m cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
�[36mwireguard         |�[0m cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
�[36mwireguard         |�[0m make[2]: *** [/app/wireguard-linux-compat/src/crypto/zinc/chacha20/chacha20.o] Error 1
�[36mwireguard         |�[0m scripts/Makefile.build:267: recipe for target '/app/wireguard-linux-compat/src/crypto/zinc/chacha20/chacha20.o' failed
�[36mwireguard         |�[0m scripts/Makefile.build:267: recipe for target '/app/wireguard-linux-compat/src/allowedips.o' failed
�[36mwireguard         |�[0m make[2]: *** [/app/wireguard-linux-compat/src/allowedips.o] Error 1
�[36mwireguard         |�[0m cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
�[36mwireguard         |�[0m scripts/Makefile.build:267: recipe for target '/app/wireguard-linux-compat/src/ratelimiter.o' failed
�[36mwireguard         |�[0m make[2]: *** [/app/wireguard-linux-compat/src/ratelimiter.o] Error 1
�[36mwireguard         |�[0m cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
�[36mwireguard         |�[0m make[2]: *** [/app/wireguard-linux-compat/src/timers.o] Error 1
�[36mwireguard         |�[0m scripts/Makefile.build:267: recipe for target '/app/wireguard-linux-compat/src/timers.o' failed
�[36mwireguard         |�[0m make[2]: *** [/app/wireguard-linux-compat/src/peer.o] Error 1
�[36mwireguard         |�[0m scripts/Makefile.build:267: recipe for target '/app/wireguard-linux-compat/src/peer.o' failed
�[36mwireguard         |�[0m make[2]: *** [/app/wireguard-linux-compat/src/receive.o] Error 1
�[36mwireguard         |�[0m scripts/Makefile.build:267: recipe for target '/app/wireguard-linux-compat/src/receive.o' failed
�[36mwireguard         |�[0m scripts/Makefile.build:267: recipe for target '/app/wireguard-linux-compat/src/socket.o' failed
�[36mwireguard         |�[0m make[2]: *** [/app/wireguard-linux-compat/src/socket.o] Error 1
�[36mwireguard         |�[0m scripts/Makefile.build:267: recipe for target '/app/wireguard-linux-compat/src/noise.o' failed
�[36mwireguard         |�[0m make[2]: *** [/app/wireguard-linux-compat/src/noise.o] Error 1
�[36mwireguard         |�[0m scripts/Makefile.build:267: recipe for target '/app/wireguard-linux-compat/src/main.o' failed
�[36mwireguard         |�[0m make[2]: *** [/app/wireguard-linux-compat/src/main.o] Error 1
�[36mwireguard         |�[0m cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
�[36mwireguard         |�[0m scripts/Makefile.build:267: recipe for target '/app/wireguard-linux-compat/src/netlink.o' failed
�[36mwireguard         |�[0m make[2]: *** [/app/wireguard-linux-compat/src/netlink.o] Error 1
�[36mwireguard         |�[0m cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’
�[36mwireguard         |�[0m scripts/Makefile.build:267: recipe for target '/app/wireguard-linux-compat/src/send.o' failed
�[36mwireguard         |�[0m scripts/Makefile.build:267: recipe for target '/app/wireguard-linux-compat/src/device.o' failed
�[36mwireguard         |�[0m make[2]: *** [/app/wireguard-linux-compat/src/send.o] Error 1
�[36mwireguard         |�[0m make[2]: *** [/app/wireguard-linux-compat/src/device.o] Error 1
�[36mwireguard         |�[0m Makefile:1683: recipe for target '/app/wireguard-linux-compat/src' failed
�[36mwireguard         |�[0m make[1]: *** [/app/wireguard-linux-compat/src] Error 2
�[36mwireguard         |�[0m Makefile:26: recipe for target 'module' failed
�[36mwireguard         |�[0m make: *** [module] Error 2
�[36mwireguard         |�[0m make: Leaving directory '/app/wireguard-linux-compat/src'
�[36mwireguard         |�[0m make: Entering directory '/app/wireguard-linux-compat/src'
�[36mwireguard         |�[0m mkdir: cannot create directory ‘/lib/modules/5.6.7-200.fc31.x86_64/extra’: Permission denied
�[36mwireguard         |�[0m make[1]: *** [_emodinst_] Error 1
�[36mwireguard         |�[0m Makefile:1604: recipe for target '_emodinst_' failed
�[36mwireguard         |�[0m make: *** [module-install] Error 2
�[36mwireguard         |�[0m Makefile:35: recipe for target 'module-install' failed
�[36mwireguard         |�[0m make: Leaving directory '/app/wireguard-linux-compat/src'
�[36mwireguard         |�[0m **** Let's test our new module. ****
�[36mwireguard         |�[0m Error: Unknown device type.
�[36mwireguard         |�[0m **** The module is not active, review the logs. Sleeping now. . . ****
  1. Wireguard container is not running.

Environment

OS: Fedora 31 Server Edition
CPU architecture: x86_64
How docker service was installed: dnf install -y docker docker-compose

Command used to create docker container (run/create/compose/screenshot)

See above.

Docker logs

See above.

Resolve failed since dns resolving system change

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.


Expected Behavior

host gotify.xxx.xxx
gotify.xxx.xxx is an alias for xxx.xxx.xxx
xxx.xxx.xxx has address 116.203.xxx.xxx

Current Behavior

First resolution is good
host gotify.xxx.xxx
gotify.xxx.xxx is an alias for xxx.xxx.xxx
xxx.xxx.xxx has address 116.203.xxx.xxx

Curling Gotify:
curl -IL gotify.xxx.xxx
200 OK

Only after curl gotify, second is bad:
host gotify.xxx.xxx
gotify.xxx.xxx is an alias for xxx.xxx.xxx
xxx.xxx.xxx has address 127.0.1.1

And curl response:

curl: (7) Failed to connect to gotify.xxx.xxx port 80: Connection refused

Steps to Reproduce

  1. Wireguard server is a container, gotify is a container, on the same public IP.
  2. Gotify Dns should be a CNAME (i guess)
  3. Wireguard client is a container on another hardware and public IP
  4. Curl gotify from the wireguard client container
  5. Wg-client ="TUNNEL"> Wg-server > Gotify

Environment

OS: UBUNTU 20.04
CPU architecture: x86_64
Working image of Wireguard: image: linuxserver/wireguard:amd64-v1.0.20200513-ls25
How docker service was installed:

curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh

Command used to create docker container (run/create/compose/screenshot)

docker-compose

version: "3"
services:
  wireguard:
    container_name: 'wireguard'
    image: linuxserver/wireguard
    restart: 'unless-stopped'
    volumes:
      - /root/docker/wg0.conf:/config/wg0.conf
      - /lib/modules:/lib/modules
    sysctls:
      - "net.ipv4.conf.all.rp_filter=2"
      - "net.ipv4.conf.all.src_valid_mark=1"
      - "net.ipv6.conf.all.disable_ipv6=0"
    cap_add:
      - NET_ADMIN
      - sys_module
    networks:
      - wireguard-client
      - zethis 

Docker logs

No Log

Slow networking inside container

Hello,
I'm facing problems starting this wireguard container, I'm running it in a Raspberry Pi 4, usually I've got problems when the container starts to download raspberrypi-kernel-headers, it seems that it restarts to download it every 30s, maybe it's due to slow Raspbian repository, for the system I switched to a local faster repo, but I'm not facing any problem (apart from slightly slower speed) with normal repo.
I'm connecting with a 100/20 mb VDSL2 connection (9,8 MB/s download speed on average), I'm not facing any other speed problem with other applications.

I have 2 suggestions, the first is that if /usr/src:/usr/src volume is mounted to use downloaded raspberrypi-kernel-headers if found, to avoid to redownload it every time.
The second is to provide the option to provide a mirror for Raspbian repository.

Expected Behavior

The container should download all required packages when the machine is connected to internet.

Current Behavior

Under Docker logs section

Steps to Reproduce

Just run the container, but it does not happen every time.

Environment

OS: Raspbian Buster
CPU architecture: arm32/64
How docker service was installed:

Command used to create docker container (run/create/compose/screenshot)

docker-compose up

this is the docker-compose.yml

version: '3.8'
services:
  wireguard:
    hostname: wireguard
    container_name: wireguard
    image: linuxserver/wireguard:latest
    restart: always
    ports:
      - 51820:51820/udp
    environment:
      - PUID=1000
      - PGIG=1000
      - TZ=Europe/Rome
      - SERVERURL=secret.ddns.net
      - SERVERPORT=51820
      - PEERS=2
      - PEERDNS=192.168.21.20
      - INTERNAL_SUBNET=192.168.22.0
    volumes:
      - './config:/config'
      - '/lib/modules:/lib/modules'
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    logging:
        options:
          max-size: '10m'
          max-file: '5'

Docker logs

...
wireguard | Hit:1 http://ports.ubuntu.com/ubuntu-ports bionic InRelease
wireguard | Get:2 http://archive.raspberrypi.org/debian buster InRelease [25.1 kB]
wireguard | Hit:3 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic InRelease
wireguard | Hit:4 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease
wireguard | Hit:5 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease
wireguard | Hit:6 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease
wireguard | Get:7 http://archive.raspberrypi.org/debian buster/main Sources [91.4 kB]
wireguard | Get:8 http://archive.raspberrypi.org/debian buster/main armhf Packages [326 kB]
wireguard | Fetched 443 kB in 2s (216 kB/s)
wireguard | Reading package lists...
wireguard | Reading package lists...
wireguard | Building dependency tree...
wireguard | Reading state information...
wireguard | The following additional packages will be installed:
wireguard | wireguard-dkms wireguard-tools
wireguard | The following NEW packages will be installed:
wireguard | raspberrypi-kernel-headers wireguard wireguard-dkms wireguard-tools
wireguard | 0 upgraded, 4 newly installed, 0 to remove and 6 not upgraded.
wireguard | Need to get 25.3 MB of archives.
wireguard | After this operation, 165 MB of additional disk space will be used.
wireguard | Get:1 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main armhf wireguard-dkms all 1.0.20200413-0ubuntu218.04 [254 kB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:3 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main armhf wireguard-tools armhf 1.0.20200319-0ppa1
18.04 [78.8 kB]
wireguard | Get:4 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main armhf wireguard all 1.0.20200319-0ppa1~18.04 [7,980 B]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Get:2 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
wireguard | Fetched 1,142 kB in 10min 20s (1,841 B/s)
wireguard | Selecting previously unselected package raspberrypi-kernel-headers.
...

(Raspberry Pi 4B)RTNETLINK answers: Operation not supported Unable to access interface: Protocol not supported

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.


Expected Behavior

Docker container loads correctly

Current Behavior

Docker container errors during start

Steps to Reproduce

1.docker create
--name=wireguard
--cap-add=NET_ADMIN
--cap-add=SYS_MODULE
-e PUID=1000
-e PGID=1000
-e TZ=Asia/Seoul
-e SERVERURL=jaeryurp.duckdns.org
-e SERVERPORT=51820
-e PEERS=3
-e PEERDNS=8.8.8.8
-e INTERNAL_SUBNET=10.13.13.0
-p 51820:51820/udp
-v /home/pi/docker/wireguard/config:/config
-v /lib/modules:/lib/modules
-v /usr/src:/usr/src
--sysctl="net.ipv4.conf.all.src_valid_mark=1"
--restart=on-failure:10
linuxserver/wireguard:arm32v7-latest
2. docker start wireguard
3. docker logs -f wireguard
4. then I can get this log

[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[#] ip link add wg0 type wireguard
RTNETLINK answers: Operation not supported
Unable to access interface: Protocol not supported
[#] ip link delete dev wg0
Cannot find device "wg0"
.:53
CoreDNS-1.6.9

Environment

Device: Raspberry Pi 4B (4GB)
OS: Raspberry Pi OS (32-bit) (version: May 2020)
CPU architecture: arm32
How docker service was installed:

Command used to create docker container (run/create/compose/screenshot)

Docker logs

https://pastebin.com/ybwWanpA

Container doesn't start correctly on Raspberry Pi (1. Generation)

Expected Behavior

Start and run the container correctly for the first time to use wireguard.

Current Behavior

I just created a docker-compose.yml file and started the containers with docker-compose up. I only get the following output, nothing more:

$ docker-compose up
Starting wireguard ... done
Attaching to wireguard
wireguard    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
wireguard    | [s6-init] ensuring user provided files have correct perms...exited 0.
wireguard    | [fix-attrs.d] applying ownership & permissions fixes...
wireguard    | [fix-attrs.d] done.
wireguard    | [cont-init.d] executing container initialization scripts...
wireguard    | [cont-init.d] 01-envfile: executing... 
wireguard    | [cont-init.d] 01-envfile: exited 267.
wireguard    | [cont-init.d] 10-adduser: executing... 
wireguard    | [cont-init.d] 10-adduser: exited 267.
wireguard    | [cont-init.d] 30-config: executing... 
wireguard    | [cont-init.d] 30-config: exited 267.
wireguard    | [cont-init.d] 99-custom-scripts: executing... 
wireguard    | [cont-init.d] 99-custom-scripts: exited 267.
wireguard    | [cont-init.d] done.
wireguard    | [services.d] starting services
wireguard    | [services.d] done.

No QR-code, errors or something like that, the config folder is also empty.

Steps to Reproduce

  1. Create the docker-compose file
  2. Start it
  3. Also tried to install the linux-headers and map the /usr/src volume

Environment

OS: Raspbian buster, Release 10
CPU architecture: armv6l
How docker service was installed:
Directly

Command used to create docker container (run/create/compose/screenshot)

docker-compose up

Docker logs

Current docker-compose.yml file:

version: "2.1"
services:
  wireguard:
    image: linuxserver/wireguard
    container_name: wireguard
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      - SERVERURL=auto #optional
      - SERVERPORT=51820 #optional
      - PEERS=1 #optional
      - PEERDNS=auto #optional
      - INTERNAL_SUBNET=10.13.13.0 #optional
    volumes:
      - /usr/src:/usr/src
      - /opt/wireguard/config:/config
      - /lib/modules:/lib/modules
    ports:
      - 51820:51820/udp
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    restart: unless-stopped

Routing in container seems screwed up

I'm running wireguard inside kubernetes, which shouldn't be a problem, since other containers are working fine. I have a feeling perhaps that IPTABLES rules might be screwed up, because when a client connects to the pod, it can't access the internet/internal network, but the pod can.

Here is tcpdump traffic from the pod (container) out to ping google.com:

root@wireguard-79b98c69cd-ppkzj:/# ping google.com
PING google.com (142.250.68.78) 56(84) bytes of data.
64 bytes from lax31s11-in-f14.1e100.net (142.250.68.78): icmp_seq=1 ttl=113 time=14.2 ms

Here is a tcpdump of the virtual adapter docker creates for the container, showing bidirectional traffic for the ping above:

 tcpdump -i califda3b2b6779
2:09:30.278759 IP 10.1.211.156.47912 > 10.96.0.10.domain: 6458+ A? google.com.default.svc.cluster.local. (54)
22:09:30.278870 IP 10.1.211.156.47912 > 10.96.0.10.domain: 35659+ AAAA? google.com.default.svc.cluster.local. (54)
22:09:30.279136 IP 10.96.0.10.domain > 10.1.211.156.47912: 6458 NXDomain*- 0/1/0 (147)
22:09:30.279194 IP 10.96.0.10.domain > 10.1.211.156.47912: 35659 NXDomain*- 0/1/0 (147)
22:09:30.279333 IP 10.1.211.156.36584 > 10.96.0.10.domain: 24749+ A? google.com.svc.cluster.local. (46)
22:09:30.279399 IP 10.1.211.156.36584 > 10.96.0.10.domain: 48823+ AAAA? google.com.svc.cluster.local. (46)
22:09:30.279608 IP 10.96.0.10.domain > 10.1.211.156.36584: 48823 NXDomain*- 0/1/0 (139)
22:09:30.279664 IP 10.96.0.10.domain > 10.1.211.156.36584: 24749 NXDomain*- 0/1/0 (139)
22:09:30.279739 IP 10.1.211.156.57965 > 10.96.0.10.domain: 59012+ A? google.com.cluster.local. (42)
22:09:30.279803 IP 10.1.211.156.57965 > 10.96.0.10.domain: 49550+ AAAA? google.com.cluster.local. (42)
22:09:30.280048 IP 10.96.0.10.domain > 10.1.211.156.57965: 59012 NXDomain*- 0/1/0 (135)
22:09:30.280142 IP 10.96.0.10.domain > 10.1.211.156.57965: 49550 NXDomain*- 0/1/0 (135)
22:09:30.280228 IP 10.1.211.156.55184 > 10.96.0.10.domain: 3671+ A? google.com. (28)
22:09:30.280336 IP 10.1.211.156.55184 > 10.96.0.10.domain: 49757+ AAAA? google.com. (28)
22:09:30.287537 IP 10.96.0.10.domain > 10.1.211.156.55184: 3671 1/0/0 A 142.250.68.78 (54)
22:09:30.287627 IP 10.96.0.10.domain > 10.1.211.156.55184: 49757 1/0/0 AAAA 2607:f8b0:4005:807::200e (66)
22:09:30.288048 IP 10.1.211.156 > lax31s11-in-f14.1e100.net: ICMP echo request, id 368, seq 1, length 64
22:09:30.302242 IP lax31s11-in-f14.1e100.net > 10.1.211.156: ICMP echo reply, id 368, seq 1, length 64
22:09:30.302461 IP 10.1.211.156.41163 > 10.96.0.10.domain: 36929+ PTR? 78.68.250.142.in-addr.arpa. (44)
22:09:30.309751 IP 10.96.0.10.domain > 10.1.211.156.41163: 36929 1/0/0 PTR lax31s11-in-f14.1e100.net. (109)

WG showing client connected:

root@wireguard-79b98c69cd-ppkzj:/# wg show
interface: wg0
  public key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxgY=
  private key: (hidden)
  listening port: 51820

peer:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxZVE=
  endpoint: 192.168.4.2:56563
  allowed ips: 10.13.13.2/32
  latest handshake: 6 seconds ago
  transfer: 5.50 KiB received, 92 B sent

Here is a tcpdump of the wg0 interface in the container, showing client connected, but only going in 1 direction (10.13.13.2 is the client wireguard ip):

root@wireguard-79b98c69cd-ppkzj:/# tcpdump -i wg0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wg0, link-type RAW (Raw IP), capture size 262144 bytes
22:12:12.763174 IP 10.13.13.2.3293 > pihole-tcp.default.svc.cluster.local.53: 2911+ AAAA? www.googleapis.com. (36)
22:12:12.765305 IP 10.13.13.2.11266 > pihole-tcp.default.svc.cluster.local.53: 44210+ A? cspxqfawsimkgf. (32)
22:12:12.765325 IP 10.13.13.2.33324 > pihole-tcp.default.svc.cluster.local.53: 27700+ A? oldjdtntonma. (30)
22:12:12.765997 IP 10.13.13.2.65298 > pihole-tcp.default.svc.cluster.local.53: 25596+ A? azdjlxabzrayia. (32)
22:12:12.767725 IP 10.13.13.2.31076 > pihole-tcp.default.svc.cluster.local.53: 45820+ AAAA? android.googleapis.com. (40)
22:12:12.767745 IP 10.13.13.2.5717 > pihole-tcp.default.svc.cluster.local.53: 6698+ A? android.googleapis.com. (40)
22:12:12.768601 IP 10.13.13.2.9234 > pihole-tcp.default.svc.cluster.local.53: 13490+ A? play.googleapis.com. (37)
22:12:12.780782 IP 10.13.13.2.11266 > pihole-tcp.default.svc.cluster.local.53: 44210+ A? cspxqfawsimkgf. (32)
22:12:12.780838 IP 10.13.13.2.33324 > pihole-tcp.default.svc.cluster.local.53: 27700+ A? oldjdtntonma. (30)
22:12:12.780838 IP 10.13.13.2.65298 > pihole-tcp.default.svc.cluster.local.53: 25596+ A? azdjlxabzrayia. (32)
22:12:12.780838 IP 10.13.13.2.49742 > pihole-tcp.default.svc.cluster.local.53: 25398+ A? clients4.google.com. (37)
22:12:12.780838 IP 10.13.13.2.53269 > pihole-tcp.default.svc.cluster.local.53: 38009+ A? clients4.google.com. (37)
22:12:12.780859 IP 10.13.13.2.64320 > pihole-tcp.default.svc.cluster.local.53: 51078+ A? clients4.google.com. (37)
22:12:12.782281 IP 10.13.13.2.49742 > pihole-tcp.default.svc.cluster.local.53: 25398+ A? clients4.google.com. (37)
22:12:12.782282 IP 10.13.13.2.40083 > pihole-tcp.default.svc.cluster.local.53: 51550+ A? android.googleapis.com. (40)
22:12:12.782282 IP 10.13.13.2.4813 > pihole-tcp.default.svc.cluster.local.53: 47001+ AAAA? android.googleapis.com. (40)

and finally, the kubernetes host showing no traffic coming out when the client tries to connect (homelab a is k8s host, 10.1.211.156 is pod ip):

22:12:39.682287 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 128
22:12:39.693380 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 96
22:12:39.722214 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 96
22:12:39.728311 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 96
22:12:40.605581 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 96
22:12:41.437604 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 112
22:12:41.835339 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 96
22:12:42.298781 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 128
22:12:42.356183 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 96
22:12:42.448387 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 96
22:12:46.379399 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 112
22:12:46.403085 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 96
22:12:46.408106 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 96
22:12:46.439397 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 128
22:12:46.445315 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 96
22:12:46.456092 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 96
22:12:46.456106 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 96
22:12:46.459372 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 96
22:12:46.483333 IP homelab-a.56563 > 10.1.211.156.51820: UDP, length 80

I'm on the latest image you have (using flux to auto-deploy). Here is what I can surmise:

Mobile device can connect through router to wireguard pod without issue, meaning client can talk to wg0 in container
Wireguard pod is able to talk out to world on eth0
It appears wg0 cannot pass traffic to eth0 inside container

I have looked at my firewall, and do not see traffic coming out to network from the wireguard session, nothing in/out of my network is reachable by the client either, and all tcpdump traffic shows only single direction from client into wg0 interface.

If it matters, here is deployment file in k8s:

---
apiVersion: v1
kind: Service
metadata:
  name: wireguard
  labels:
    app: wireguard
spec:
  selector:
    app: wireguard
  type: LoadBalancer
  loadBalancerIP: 192.168.50.26
  ports:
  - name: wireguard
    port: 51820
    protocol: UDP
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: wireguard
  annotations:
    fluxcd.io/automated: 'true'
    fluxcd.io/tag.wireguard: 'regex:^v1.0.+-ls[0-9]+$'
spec:
  replicas: 1
  selector:
    matchLabels:
      app: wireguard
  template:
    metadata:
      labels:
        app: wireguard
    spec:
      nodeSelector:
        kubernetes.io/hostname: "homelab-a"
      volumes:
      - name: dockerdata
        hostPath:
         # directory location on host
          path: /dockerdata
          type: Directory
      - name: host
        hostPath:
          path: /
          type: Directory
      containers:
      - name: wireguard
        image: linuxserver/wireguard:v1.0.20200827-ls1
        #imagePullPolicy: Always
        securityContext:
          capabilities:
            add:
            - NET_ADMIN
            - SYS_MODULE
        volumeMounts:
        - name: dockerdata
          subPath: wireguard
          mountPath: /config
        - name: host
          subPath: lib/modules
          mountPath: /lib/modules
        env:
        - name: PUID
          value: '1001'
        - name: PGID
          value: '1001'
        - name: TZ
          value: 'America/Los_Angeles'
        - name: SERVERURL
          value: 'wg.server.zzz'
        - name: PEERS
          value: '3'
        - name: PEERDNS
          value: '192.168.50.29'
        ports:
        - name: wireguard
          containerPort: 51820
          protocol: UDP

docker logs:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
WireGuard: https://www.wireguard.com/donations/

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    1001
User gid:    1001
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
Uname info: Linux wireguard-79b98c69cd-ppkzj 5.4.0-54-generic #60-Ubuntu SMP Fri Nov 6 10:37:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
**** It seems the wireguard module is already active. Skipping kernel header install and module compilation. ****
**** Server mode is selected ****
**** External server address is set to wg.server.zzz ****
**** External server port is set to 51820. Make sure that port is properly forwarded to port 51820 inside this container ****
**** Internal subnet is set to 10.13.13.0 ****
**** AllowedIPs for peers 0.0.0.0/0, ::/0 ****
**** Peer DNS servers will be set to 192.168.50.29 ****
**** Server mode is selected ****
**** No changes to parameters. Existing configs are used. ****
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[#] ip link add wg0 type wireguard
.:53
CoreDNS-1.8.0
linux/amd64, go1.15.3, 054c9ae
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.13.13.1 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] ip -4 route add 10.13.13.4/32 dev wg0
[#] ip -4 route add 10.13.13.3/32 dev wg0
[#] ip -4 route add 10.13.13.2/32 dev wg0
[#] iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

FWIW, I have a openvpn container that works, and I have also installed wireguard in a freenas Jail as a backup, so wireguard works in my network, and openvpn works in k8s, but wireguard does NOT seem to work in k8s, while other containers work just fine. I'm not an IP Tables expert, so can't debug that.

Thanks!

error: ‘const struct ipv6_stub’

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.


Expected Behavior

Current Behavior

Steps to Reproduce

  1. run docker-compose up --build -d

Environment

OS:
CPU architecture: x86_64/arm32/arm64
How docker service was installed:

Command used to create docker container (run/create/compose/screenshot)

Docker logs

writing new private key to 'signing_key.pem'

**** Building the module ****
make: Entering directory '/app/wireguard-linux-compat/src'
CC [M] /app/wireguard-linux-compat/src/noise.o
CC [M] /app/wireguard-linux-compat/src/main.o
CC [M] /app/wireguard-linux-compat/src/device.o
CC [M] /app/wireguard-linux-compat/src/peer.o
CC [M] /app/wireguard-linux-compat/src/timers.o
CC [M] /app/wireguard-linux-compat/src/queueing.o
CC [M] /app/wireguard-linux-compat/src/send.o
CC [M] /app/wireguard-linux-compat/src/receive.o
CC [M] /app/wireguard-linux-compat/src/socket.o
CC [M] /app/wireguard-linux-compat/src/peerlookup.o
/app/wireguard-linux-compat/src/socket.c: In function ‘send6’:
/app/wireguard-linux-compat/src/socket.c:139:20: error: ‘const struct ipv6_stub’ has no member named ‘ipv6_dst_lookup_flow’; did you mean ‘ipv6_dst_lookup’?
dst = ipv6_stub->ipv6_dst_lookup_flow(sock_net(sock), sock, &fl,
^~~~~~~~~~~~~~~~~~~~
ipv6_dst_lookup
scripts/Makefile.build:330: recipe for target '/app/wireguard-linux-compat/src/socket.o' failed
make[2]: *** [/app/wireguard-linux-compat/src/socket.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Makefile:1577: recipe for target 'module/app/wireguard-linux-compat/src' failed
make[1]: *** [module/app/wireguard-linux-compat/src] Error 2
Makefile:25: recipe for target 'module' failed
make: *** [module] Error 2
make: Leaving directory '/app/wireguard-linux-compat/src'
make: Entering directory '/app/wireguard-linux-compat/src'
DEPMOD 4.15.0-96-generic
depmod -a 4.15.0-96-generic
make: Leaving directory '/app/wireguard-linux-compat/src'
**** Let's test our new module. ****
RTNETLINK answers: Operation not supported
**** The module is not active, review the logs. Sleeping now. . . ****

Coredns process consumes high resources

Expected Behavior

CPU Usage is acceptable, but such a high usage must be abnormal.

Current Behavior

图片
图片

The coredns process in the image consumes a huge CPU usage (almost full of my dual-core CPU) and memory usage.

Steps to Reproduce

  1. Restart the container, and the usage is normally under 0.5%.
  2. Connect the wireguard VPN. At the beginning, the device can't connect the internet, and at this time the CPU usage is normal. Wait a second, it can suddenly successfully connect, then the usage goes high as the screenshot showing above.
    图片

Environment

OS: Debian buster (OpenMediaVault 5)
CPU architecture: x86_64
How docker service was installed: I used script on https://get.docker.com (v19.03.8)

Command used to create docker container (run/create/compose/screenshot)

图片
图片
图片

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing... 
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing... 
usermod: no changes

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \ 
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
WireGuard: https://www.wireguard.com/donations/

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    1000
User gid:    1000
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing... 
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://deb.debian.org/debian buster InRelease
Get:3 http://deb.debian.org/debian buster-backports InRelease [46.7 kB]
Hit:4 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic InRelease
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1,226 kB]
Get:8 http://deb.debian.org/debian buster-backports/main Sources.diff/Index [27.8 kB]
Get:9 http://deb.debian.org/debian buster-backports/main amd64 Packages.diff/Index [27.8 kB]
Get:10 http://deb.debian.org/debian buster-backports/main Sources 2020-05-22-1409.45.pdiff [866 B]
Get:11 http://deb.debian.org/debian buster-backports/main Sources 2020-05-22-2010.56.pdiff [692 B]
Get:12 http://deb.debian.org/debian buster-backports/main Sources 2020-05-23-0210.02.pdiff [33 B]
Get:13 http://deb.debian.org/debian buster-backports/main Sources 2020-05-23-1400.49.pdiff [185 B]
Get:14 http://deb.debian.org/debian buster-backports/main Sources 2020-05-23-2018.42.pdiff [775 B]
Get:15 http://deb.debian.org/debian buster-backports/main Sources 2020-05-24-0211.50.pdiff [33 B]
Get:16 http://deb.debian.org/debian buster-backports/main Sources 2020-05-24-0809.52.pdiff [4,516 B]
Get:17 http://deb.debian.org/debian buster-backports/main Sources 2020-05-24-2010.35.pdiff [2,016 B]
Get:18 http://deb.debian.org/debian buster-backports/main Sources 2020-05-25-0206.42.pdiff [42 B]
Get:19 http://deb.debian.org/debian buster-backports/main amd64 Packages 2020-05-22-1409.45.pdiff [392 B]
Get:18 http://deb.debian.org/debian buster-backports/main Sources 2020-05-25-0206.42.pdiff [42 B]
Get:20 http://deb.debian.org/debian buster-backports/main amd64 Packages 2020-05-22-2010.56.pdiff [608 B]
Get:21 http://deb.debian.org/debian buster-backports/main amd64 Packages 2020-05-23-1400.49.pdiff [187 B]
Get:22 http://deb.debian.org/debian buster-backports/main amd64 Packages 2020-05-24-0211.50.pdiff [514 B]
Get:23 http://deb.debian.org/debian buster-backports/main amd64 Packages 2020-05-24-2010.35.pdiff [17.0 kB]
Get:24 http://deb.debian.org/debian buster-backports/main amd64 Packages 2020-05-25-0206.42.pdiff [1,703 B]
Get:24 http://deb.debian.org/debian buster-backports/main amd64 Packages 2020-05-25-0206.42.pdiff [1,703 B]
Get:25 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,385 kB]
Get:26 http://archive.ubuntu.com/ubuntu bionic-security/restricted Sources [5,992 B]
Get:27 http://archive.ubuntu.com/ubuntu bionic-security/main Sources [192 kB]
Get:28 http://archive.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [59.3 kB]
Get:29 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages [930 kB]
Fetched 4,108 kB in 2min 33s (26.8 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
linux-headers-5.5.0-0.bpo.2-amd64 is already the newest version (5.5.17-1~bpo10+1).
wireguard is already the newest version (1.0.20200513-1~18.04).
0 upgraded, 0 newly installed, 0 to remove and 200 not upgraded.
Server mode is selected
External server address is set to *****.*****.net
External server port is set to 51820. Make sure that port is properly forwarded to port 51820 inside this container
Internal subnet is set to 10.13.13.0
PEERDNS var is either not set or is set to "auto", setting peer DNS to 10.13.13.1 to use wireguard docker host's DNS.
Server mode is selected
No changes to parameters. Existing configs are used.
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing... 
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.13.13.1 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] ip -4 route add 10.13.13.3/32 dev wg0
[#] ip -4 route add 10.13.13.2/32 dev wg0
[#] iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
.:53
CoreDNS-1.6.9
linux/amd64, go1.14.1, 1766568
Caught SIGTERM signal!
[INFO] SIGTERM: Shutting down servers then terminating
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[#] ip link delete dev wg0
[#] iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
s6-svwait: fatal: supervisor died
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

docker-wireguard volumes doesn't respect umask

Expected Behavior

environment variable UMASK is 002
peer folder created in /config should have the permissions defined by UMASK ( "rw" for owner and group and "r" for other)

Current Behavior

peer folder have "rw" permission for owner only

Steps to Reproduce

1.create docker-compose.yml file below

version: "2.1"
services:
  wireguard:
    image: linuxserver/wireguard
    container_name: wireguard
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=1018
      - PGID=100
      - TZ=Europe/Paris
      - UMASK=002
      - SERVERURL=mydomain.com #optional
      - SERVERPORT=51820 #optional
      - PEERS=2 #optional
      - PEERDNS=auto #optional
      - INTERNAL_SUBNET=10.13.13.0 #optional
    volumes:
      - /srv/dev-disk-by-label-AppData1/appdata/config/wireguard:/config
      - /lib/modules:/lib/modules
    ports:
      - 51820:51820/udp
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    restart: unless-stopped
  1. "docker-compose up -d" to start container
  2. see permissions of peer1 folder inside /config

Environment

OS: OMV5
CPU architecture: x64
How docker service was installed:
Docker installed with OMV-extra plugin in Open Media Vault 5

Command used to create docker container (run/create/compose/screenshot)

see step to reproduce

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
WireGuard: https://www.wireguard.com/donations/

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    1018
User gid:    100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
**** It seems the wireguard module is already active. Skipping kernel header install and module compilation. ****
**** Server mode is selected ****
**** External server address is set to mydomain.com ****
**** External server port is set to 51820. Make sure that port is properly forwarded to port 51820 inside this container ****
**** Internal subnet is set to 10.13.13.0 ****
**** PEERDNS var is either not set or is set to "auto", setting peer DNS to 10.13.13.1 to use wireguard docker host's DNS. ****
**** No found wg0.conf found (maybe an initial install), generating 1 server and 2 peer/client confs ****
PEER 1 QR code:

###

PEER 2 QR code:

###

[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
.:53
CoreDNS-1.7.0
linux/amd64, go1.14.4, f59c03d
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.13.13.1 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] ip -4 route add 10.13.13.3/32 dev wg0
[#] ip -4 route add 10.13.13.2/32 dev wg0
[#] iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Unable to connect the Wireguard docker client to the Wireguard docker server

Expected Behavior

Establish a connection between the client version and the server one

Current Behavior

I configured a server in a Debian machine, i setted two peers and i'm able to connect to the server with both peers if i use a Windows 10 client and an Android client as well but i can't do it from the linux client (built with this docker image) even if i use the exactly same configurations.
When i connect from win or Android and i check wg inside the server container i see the handshakes but not when i launch the client from the docker container.

Environment

OS:

Debian Buster for the Server
Ubuntu 18.04 for a client
Debian Buster for the second client

CPU architecture: x86_64/arm32/arm64
arm32 for the server
x86_64 for both clients

Command used to create docker container (run/create/compose/screenshot)

The clients:
sudo docker create --name=wireguard-client --cap-add=NET_ADMIN --cap-add=SYS_MODULE -e PUID=1000 -e PGID=100 -e TZ=Europe/Rome -e SERVERPORT=51820 -p 51820:51820/udp -v /home/max/AppData/Wireguard-Client:/config -v /lib/modules:/lib/modules --sysctl="net.ipv4.conf.all.src_valid_mark=1" --restart=always linuxserver/wireguard

The server is working..

Client wg0 configuration:

[Interface]
Address = 10.13.12.3/32
PrivateKey = zzzzzzzzzzzzzzzzzzzz
ListenPort = 51820

[Peer]
PublicKey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Endpoint = yyyyyyyyyyyyyyyyyyyyyyyy
AllowedIPs = 0.0.0.0/1, 128.0.0.0/1, ::/1, 8000::/1

Note that this same config works for both windows and android

Docker logs

Reading package lists...,
Building dependency tree...,
Reading state information...,
linux-headers-5.5.0-0.bpo.2-amd64 is already the newest version (5.5.17-1bpo10+1).,
wireguard is already the newest version (1.0.20200319-1ubuntu1
18.04).,
0 upgraded, 0 newly installed, 0 to remove and 197 not upgraded.,
Client mode selected.,
[cont-init.d] 30-config: exited 0.,
[cont-init.d] 99-custom-scripts: executing... ,
[custom-init] no custom files found exiting...,
[cont-init.d] 99-custom-scripts: exited 0.,
[cont-init.d] done.,
[services.d] starting services,
[services.d] done.,
Warning: /config/wg0.conf' is world accessible, [#] ip link add wg0 type wireguard, .:53, CoreDNS-1.6.9, linux/amd64, go1.14.1, 1766568, [#] wg setconf wg0 /dev/fd/63, [#] ip -4 address add 10.13.12.3/32 dev wg0, [#] ip link set mtu 1420 up dev wg0, Caught SIGTERM signal!, [INFO] SIGTERM: Shutting down servers then terminating, [cont-finish.d] executing container finish scripts..., [cont-finish.d] done., [s6-finish] waiting for services., Warning: /config/wg0.conf' is world accessible,
[#] ip link delete dev wg0,
[s6-finish] sending all processes the TERM signal.,
[s6-finish] sending all processes the KILL signal and exiting.,
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.,
[s6-init] ensuring user provided files have correct perms...exited 0.,
[fix-attrs.d] applying ownership & permissions fixes...,
[fix-attrs.d] done.,
[cont-init.d] executing container initialization scripts...,
[cont-init.d] 01-envfile: executing... ,
[cont-init.d] 01-envfile: exited 0.,
[cont-init.d] 10-adduser: executing... ,
usermod: no changes,
,
-------------------------------------,
_ (),
| | ___ _ _,
| | / | | | / \ ,
| | _
\ | | | () |,
|| |
/ || _/,
,
,
Brought to you by linuxserver.io,
-------------------------------------,
,
To support the app dev(s) visit:,
WireGuard: https://www.wireguard.com/donations/,
,
To support LSIO projects visit:,
https://www.linuxserver.io/donate/,
-------------------------------------,
GID/UID,
-------------------------------------,
,
User uid: 1000,
User gid: 100,
-------------------------------------,
,
[cont-init.d] 10-adduser: exited 0.,
[cont-init.d] 30-config: executing... ,
Hit:1 http://deb.debian.org/debian buster InRelease,
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease,
Hit:3 http://deb.debian.org/debian buster-backports InRelease,
Hit:4 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic InRelease,
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB],
Get:6 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB],
Fetched 177 kB in 1s (121 kB/s),
Reading package lists...,
Reading package lists...,
Building dependency tree...,
Reading state information...,
linux-headers-5.5.0-0.bpo.2-amd64 is already the newest version (5.5.17-1bpo10+1).,
wireguard is already the newest version (1.0.20200319-1ubuntu1
18.04).,
0 upgraded, 0 newly installed, 0 to remove and 197 not upgraded.,
Client mode selected.,
[cont-init.d] 30-config: exited 0.,
[cont-init.d] 99-custom-scripts: executing... ,
[custom-init] no custom files found exiting...,
[cont-init.d] 99-custom-scripts: exited 0.,
[cont-init.d] done.,
[services.d] starting services,
[services.d] done.,
Warning: `/config/wg0.conf' is world accessible,
[#] ip link add wg0 type wireguard,
.:53,
CoreDNS-1.6.9,
linux/amd64, go1.14.1, 1766568,
[#] wg setconf wg0 /dev/fd/63,
[#] ip -4 address add 10.13.12.3/32 dev wg0,
[#] ip link set mtu 1420 up dev wg0,
[#] ip -6 route add ::/1 dev wg0,
Error: IPv6 is disabled on nexthop device.,
[#] ip link delete dev wg0,

Failed to install docker-wireguard on Centos 8

linuxserver.io


Expected Behavior

To work and create keys

Current Behavior

The wireguard module is not active

Steps to Reproduce

1.Installing centos 8
2.install docker and docker-compose
3.create docker-compose file
4.run docker-compose up -d

Environment

**OS: CentOS 8 minimal
CPU architecture: x86_64
How docker service was installed:

From the official docker repo with https://get.docker.com/

Command used to create docker container (run/create/compose/screenshot)

version: "2.1"
services:
wireguard:
image: linuxserver/wireguard
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- PUID=0
- PGID=0
- TZ=Asia/Jerusalem
- SERVERURL=adirbd.ddns.net #optional
- SERVERPORT=51820 #optional
- PEERS=2 #optional
- PEERDNS=8.8.8.8 #optional
- INTERNAL_SUBNET=10.13.13.0 #optional
- ALLOWEDIPS=192.168.1.0/24 #optional
volumes:
- /opt/wireguard-server/config:/config
- /lib/modules:/lib/modules
ports:
- 51820:51820/udp
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
restart: always

Docker logs

[root@centos8 wireguard-server]# docker-compose up -d
Creating network "wireguard-server_default" with the default driver
Creating wireguard ... done
[root@centos8 wireguard-server]# docker logs wireguard
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...


      _         ()
     | |  ___   _    __
     | | / __| | |  /  \
     | | \__ \ | | | () |
     |_| |___/ |_|  \__/

Brought to you by linuxserver.io

To support the app dev(s) visit:
WireGuard: https://www.wireguard.com/donations/

To support LSIO projects visit:
https://www.linuxserver.io/donate/

GID/UID

User uid: 0
User gid: 0

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
Uname info: Linux 42cf8fcb1319 4.18.0-193.el8.x86_64 #1 SMP Fri May 8 10:59:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Error: Unknown device type.
**** The wireguard module is not active, will attempt kernel header install and module compilation. ****
**** Attempting kernel header install ****

Thanks!!

Fails to run on Raspberry Pi4

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.

Following the instructions on the Dockerhub page fails to bring the image up. It looks like packages are missing


Expected Behavior

The container starts.

Current Behavior

The container hangs.

Steps to Reproduce

  1. Create the docker-compose.yml file with the following content:
version: "2.1"
services:
  wireguard:
    image: linuxserver/wireguard:arm32v7-latest
    container_name: wireguard
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris
      - SERVERURL=foo.bar.com #optional
      - SERVERPORT=51820 #optional
      - PEERS=1 #optional
      - PEERDNS=8.8.8.8 #optional
      - INTERNAL_SUBNET=10.13.13.0 #optional
    volumes:
      - /path/to/appdata/config:/config
      - /lib/modules:/lib/modules
    ports:
      - 51820:51820/udp
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    restart: unless-stopped
  1. Starts the container (docker-compose up)

Environment

OS: Arch for Raspberry Pi
CPU architecture: arm32hf
How docker service was installed: Via Arch package manager. There are other containers running on this Raspberry pi, so docker seems to be working fine.

Command used to create docker container (run/create/compose/screenshot)

$ docker-compose up

Docker logs

> $ docker-compose up                                                                                                                                                                                                                
Pulling wireguard (linuxserver/wireguard:arm32v7-latest)...                                                    
arm32v7-latest: Pulling from linuxserver/wireguard    
Digest: sha256:84d372a44ec716be20512173f803523c1ac0a023167c50bc165fa34744f0fe50
Status: Downloaded newer image for linuxserver/wireguard:arm32v7-latest
Recreating wireguard ... done                                                                                                                                                                                                         
Attaching to wireguard                                                                                                                                                                                                                
wireguard    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
wireguard    | [s6-init] ensuring user provided files have correct perms...exited 0.
wireguard    | [fix-attrs.d] applying ownership & permissions fixes...
wireguard    | [fix-attrs.d] done.             
wireguard    | [cont-init.d] executing container initialization scripts...
wireguard    | [cont-init.d] 01-envfile: executing... 
wireguard    | [cont-init.d] 01-envfile: exited 0.
wireguard    | [cont-init.d] 10-adduser: executing... 
wireguard    |  
wireguard    | -------------------------------------
wireguard    |           _         ()
wireguard    |          | |  ___   _    __
wireguard    |          | | / __| | |  /  \ 
wireguard    |          | | \__ \ | | | () |
wireguard    |          |_| |___/ |_|  \__/
wireguard    |                   
wireguard    |                              
wireguard    | Brought to you by linuxserver.io
wireguard    | -------------------------------------
wireguard    |                   
wireguard    | To support the app dev(s) visit:
wireguard    | WireGuard: https://www.wireguard.com/donations/
wireguard    | 
wireguard    | To support LSIO projects visit:
wireguard    | https://www.linuxserver.io/donate/
wireguard    | -------------------------------------
wireguard    | GID/UID                                                                                                                                                                                                                
wireguard    | -------------------------------------                                                                                                                                                                                  
wireguard    | 
wireguard    | User uid:    1000
wireguard    | User gid:    1000
wireguard    | -------------------------------------
wireguard    | 
wireguard    | [cont-init.d] 10-adduser: exited 0.
wireguard    | [cont-init.d] 30-config: executing... 
wireguard    | Error: Unknown device type.
wireguard    | **** The wireguard module is not active, will attempt kernel header install and module compilation. ****
wireguard    | **** Attempting kernel header install ****
wireguard    | Get:1 http://ports.ubuntu.com/ubuntu-ports bionic InRelease [242 kB]
wireguard    | Get:2 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease [88.7 kB]
wireguard    | Get:3 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease [74.6 kB]
wireguard    | Get:4 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease [88.7 kB]
wireguard    | Get:5 http://ports.ubuntu.com/ubuntu-ports bionic/universe armhf Packages [11.0 MB]
wireguard    | Get:6 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse armhf Packages [157 kB]
wireguard    | Get:7 http://ports.ubuntu.com/ubuntu-ports bionic/restricted armhf Packages [12.5 kB]
wireguard    | Get:8 http://ports.ubuntu.com/ubuntu-ports bionic/main armhf Packages [1,277 kB]
wireguard    | Get:9 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted armhf Packages [11.0 kB]
wireguard    | Get:10 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main armhf Packages [843 kB]
wireguard    | Get:11 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse armhf Packages [4,815 B]
wireguard    | Get:12 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe armhf Packages [1,177 kB]
wireguard    | Get:13 http://ports.ubuntu.com/ubuntu-ports bionic-backports/main armhf Packages [8,247 B]
wireguard    | Get:14 http://ports.ubuntu.com/ubuntu-ports bionic-backports/universe armhf Packages [8,101 B]
wireguard    | Get:15 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe armhf Packages [704 kB]
wireguard    | Get:16 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse armhf Packages [1,849 B]
wireguard    | Get:17 http://ports.ubuntu.com/ubuntu-ports bionic-security/main armhf Packages [575 kB]
wireguard    | Get:18 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted armhf Packages [5,504 B]
wireguard    | Fetched 16.2 MB in 5s (3,554 kB/s)
wireguard    | Reading package lists...
wireguard    | **** No kernel headers found in the Ubuntu or Debian repos!! Will try the headers from host (if mapped), may or may not work ****
wireguard    | **** Kernel headers don't seem to be available, can't compile the module. Sleeping now. . . ****

Probably need a ubuntu package such as linux-headers-$(uname -r) to be added to the Dockerfile

Container has no internet access

Hi,
I'm trying to get a container booted up running Wireguard but can't seem to get this working. It works perfectly on the host, but not with this docker image so there is some discrepancy.


Expected Behavior

Container should boot with connection to wireguard and internet access.

Current Behavior

Container will boot and successfully connect to my server, but when I go into it there is no internet access.

Steps to Reproduce

  1. Run the container with docker compose

Environment

OS: Ubuntu 18.04
CPU architecture: x86_64
How docker service was installed:

Command used to create docker container (run/create/compose/screenshot)

Using this docker-compose

  wireguard:
    image: linuxserver/wireguard
    container_name: wireguard
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
    volumes:
      - /etc/wireguard/wg0.conf:/config/wg0.conf
      - /lib/modules:/lib/modules
    ports:
      - 51820:51820/udp
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
      - net.ipv6.conf.all.disable_ipv6=0
    restart: unless-stopped

And this wg0 config, which works perfectly fine on my host.

[Interface]
PrivateKey = xxx
Address = 10.66.66.2/24
DNS = 176.103.130.130,176.103.130.131

[Peer]
PublicKey = xxx
PresharedKey = xxx
Endpoint = xxx:49161
AllowedIPs = 0.0.0.0/0,::/0

Docker logs

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
WireGuard: https://www.wireguard.com/donations/

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    1000
User gid:    1000
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
Hit:1 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
linux-headers-5.3.0-46-generic is already the newest version (5.3.0-46.38~18.04.1).
wireguard is already the newest version (1.0.20200319-0ppa1~18.04).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Client mode selected.
/var/run/s6/etc/cont-init.d/30-config: line 163: [: !-f: unary operator expected
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Warning: `/config/wg0.conf' is world accessible
[#] ip link add wg0 type wireguard
.:53
CoreDNS-1.6.9
linux/amd64, go1.14.1, 1766568
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.66.66.2/24 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] resolvconf -a tun.wg0 -m 0 -x
[#] wg set wg0 fwmark 51820
[#] ip -6 route add ::/0 dev wg0 table 51820
[#] ip -6 rule add not fwmark 51820 table 51820
[#] ip -6 rule add table main suppress_prefixlength 0
[#] ip6tables-restore -n
[#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
sysctl: setting key "net.ipv4.conf.all.src_valid_mark": Read-only file system
[#] iptables-restore -n

Now from within the container I can see that it's connected succesfully:

root@6dfe0bd8e859:/# wg
interface: wg0
  public key: xxx
  private key: (hidden)
  listening port: 32881
  fwmark: 0xca6c

peer: xxx
  preshared key: (hidden)
  endpoint: xxx:49161
  allowed ips: 0.0.0.0/0
  latest handshake: 2 minutes, 43 seconds ago
  transfer: 124 B received, 532 B sent

but no internet access

root@6dfe0bd8e859:/# curl ifconfig.me
curl: (6) Could not resolve host: ifconfig.me

DKMS Build Failure kernel 5.3 (linux mint and possibly others)

This issue is for documentation purposes, the issue is upstream & not something we can fix

This issue has a potential work around for a recent DKMS build failure. This example was for linux mint, but may apply to other distributions with similar behavior. It also applies to multiple kernels, not just 5.3 as shown in these logs.

Docker logs: https://hastebin.com/oqogucikir.cs

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.3.0-51-generic -C /lib/modules/5.3.0-51-generic/build M=/var/lib/dkms/wireguard/1.0.20200520/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.3.0-51-generic (x86_64)
Consult /var/lib/dkms/wireguard/1.0.20200520/build/make.log for more information.

Contents of make.log: https://hastebin.com/govotejimu.php

end user facing this issue was able to resolve it by following the guidance in the below github closed issue.
linuxmint/linuxmint#213

Error! Your kernel headers for kernel 4.19.97-v8+ cannot be found

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.


Expected Behavior

No errors in log when checking for kernel headers

Current Behavior

Logs in error when installing kernel-headers after image update / first install. The container seems to work though (might not be critical)

Steps to Reproduce

docker run -d --name=wireguard --net=host --cap-add NET_ADMIN --device=/dev/net/tun --cap-add=SYS_MODULE --net=HOST -e PUID=1000 -e PGID=1000 -e TZ=Europe/London -v /home/pi/docker-apps/wireguard/config:/config -v /lib/modules:/lib/modules --sysctl="net.ipv4.conf.all.src_valid_mark=1" -e SERVERURL=xxx.xxx.xxx -e SERVERPORT=51820 -e PEERS=1 -e INTERNAL_SUBNET=10.253.1.0 -p 51820:51820/udp --restart unless-stopped linuxserver/wireguard

Environment

OS: Raspbian
CPU architecture: armhf (RaspberryPI 3 B)
How docker service was installed: docker run

Command used to create docker container (run/create/compose/screenshot)

docker run -d --name=wireguard --net=host --cap-add NET_ADMIN --device=/dev/net/tun --cap-add=SYS_MODULE --net=HOST -e PUID=1000 -e PGID=1000 -e TZ=Europe/London -v /home/pi/docker-apps/wireguard/config:/config -v /lib/modules:/lib/modules --sysctl="net.ipv4.conf.all.src_valid_mark=1" -e SERVERURL=xxx.xxx.xxx -e SERVERPORT=51820 -e PEERS=1 -e INTERNAL_SUBNET=10.253.1.0 -p 51820:51820/udp --restart unless-stopped linuxserver/wireguard

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...


      _         ()
     | |  ___   _    __
     | | / __| | |  /  \
     | | \__ \ | | | () |
     |_| |___/ |_|  \__/

Brought to you by linuxserver.io

To support the app dev(s) visit:
WireGuard: https://www.wireguard.com/donations/

To support LSIO projects visit:
https://www.linuxserver.io/donate/

GID/UID

User uid: 1000
User gid: 1000

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
Get:1 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic InRelease [15.9 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports bionic InRelease [242 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease [88.7 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease [74.6 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease [88.7 kB]
Get:6 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main Sources [1,170 B]
Get:7 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main armhf Packages [925 B]
Get:8 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse armhf Packages [157 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports bionic/universe armhf Packages [11.0 MB]
Get:10 http://ports.ubuntu.com/ubuntu-ports bionic/main armhf Packages [1,277 kB]
Get:11 http://ports.ubuntu.com/ubuntu-ports bionic/restricted armhf Packages [12.5 kB]
Get:12 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe armhf Packages [1,146 kB]
Get:13 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main armhf Packages [787 kB]
Get:14 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse armhf Packages [4,605 B]
Get:15 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted armhf Packages [10.6 kB]
Get:16 http://ports.ubuntu.com/ubuntu-ports bionic-backports/main armhf Packages [2,490 B]
Get:17 http://ports.ubuntu.com/ubuntu-ports bionic-backports/universe armhf Packages [4,239 B]
Get:18 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe armhf Packages [675 kB]
Get:19 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted armhf Packages [5,013 B]
Get:20 http://ports.ubuntu.com/ubuntu-ports bionic-security/main armhf Packages [519 kB]
Get:21 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse armhf Packages [2,077 B]
Fetched 16.1 MB in 14s (1,134 kB/s)
Reading package lists...
Raspbian kernel naming convention detected, attempting to install raspbian kernel headers
Warning: apt-key output should not be parsed (stdout is not a terminal)
OK
Hit:1 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports bionic InRelease
Get:3 http://archive.raspberrypi.org/debian buster InRelease [25.1 kB]
Hit:4 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease
Hit:6 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease
Get:7 http://archive.raspberrypi.org/debian buster/main Sources [91.4 kB]
Get:8 http://archive.raspberrypi.org/debian buster/main armhf Packages [326 kB]
Fetched 443 kB in 3s (160 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
wireguard-dkms wireguard-tools
The following NEW packages will be installed:
raspberrypi-kernel-headers wireguard wireguard-dkms wireguard-tools
0 upgraded, 4 newly installed, 0 to remove and 6 not upgraded.
Need to get 25.3 MB of archives.
After this operation, 165 MB of additional disk space will be used.
Get:1 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200212-1 [24.9 MB]
Get:2 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main armhf wireguard-dkms all 1.0.20200401-1ubuntu118.04 [253 kB]
Get:3 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main armhf wireguard-tools armhf 1.0.20200319-0ppa1
18.04 [78.8 kB]
Get:4 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main armhf wireguard all 1.0.20200319-0ppa118.04 [7,980 B]
Fetched 25.3 MB in 8s (3,308 kB/s)
Selecting previously unselected package raspberrypi-kernel-headers.
(Reading database ... 46143 files and directories currently installed.)
Preparing to unpack .../raspberrypi-kernel-headers_1.20200212-1_armhf.deb ...
Unpacking raspberrypi-kernel-headers (1.20200212-1) ...
Selecting previously unselected package wireguard-dkms.
Preparing to unpack .../wireguard-dkms_1.0.20200401-1ubuntu1
18.04_all.deb ...
Unpacking wireguard-dkms (1.0.20200401-1ubuntu118.04) ...
Selecting previously unselected package wireguard-tools.
Preparing to unpack .../wireguard-tools_1.0.20200319-0ppa1
18.04_armhf.deb ...
Unpacking wireguard-tools (1.0.20200319-0ppa118.04) ...
Selecting previously unselected package wireguard.
Preparing to unpack .../wireguard_1.0.20200319-0ppa1
18.04_all.deb ...
Unpacking wireguard (1.0.20200319-0ppa118.04) ...
Setting up wireguard-dkms (1.0.20200401-1ubuntu1
18.04) ...
Loading new wireguard-1.0.20200401 DKMS files...
It is likely that 4.19.97-v7+ belongs to a chroot's host
Building for 4.19.114+, 4.19.114-v7+, 4.19.97+, 4.19.97-v7+, 4.19.97-v7l+ and 4.19.97-v8+
Module build for kernel 4.19.114+ was skipped since the
kernel headers for this kernel does not seem to be installed.
Module build for kernel 4.19.114-v7+ was skipped since the
kernel headers for this kernel does not seem to be installed.
Building initial module for 4.19.97+
Done.

wireguard:
Running module version sanity check.

Good news! Module version 1.0.20200401 for wireguard.ko
exactly matches what is already found in kernel 4.19.97+.
DKMS will not replace this module.
You may override by specifying --force.

depmod....

DKMS: install completed.
Building initial module for 4.19.97-v7+
Done.

wireguard:
Running module version sanity check.

Good news! Module version 1.0.20200401 for wireguard.ko
exactly matches what is already found in kernel 4.19.97-v7+.
DKMS will not replace this module.
You may override by specifying --force.

depmod....

DKMS: install completed.
Building initial module for 4.19.97-v7l+
Done.

wireguard:
Running module version sanity check.

Good news! Module version 1.0.20200401 for wireguard.ko
exactly matches what is already found in kernel 4.19.97-v7l+.
DKMS will not replace this module.
You may override by specifying --force.

depmod....

DKMS: install completed.
Module build for kernel 4.19.97-v8+ was skipped since the
kernel headers for this kernel does not seem to be installed.
Setting up wireguard-tools (1.0.20200319-0ppa1~18.04) ...
Setting up raspberrypi-kernel-headers (1.20200212-1) ...
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.19.97+

  • dkms: running auto installation service for kernel 4.19.97+ [ OK ]
    run-parts: executing /etc/kernel/header_postinst.d/dkms 4.19.97-v7+
  • dkms: running auto installation service for kernel 4.19.97-v7+ [ OK ]
    run-parts: executing /etc/kernel/header_postinst.d/dkms 4.19.97-v7l+
  • dkms: running auto installation service for kernel 4.19.97-v7l+ [ OK ]
    run-parts: executing /etc/kernel/header_postinst.d/dkms 4.19.97-v8+
  • dkms: running auto installation service for kernel 4.19.97-v8+ Error! Your kernel headers for kernel 4.19.97-v8+ cannot be found.
    Please install the linux-headers-4.19.97-v8+ package,
    or use the --kernelsourcedir option to tell DKMS where it's located
    [ OK ]
    Setting up wireguard (1.0.20200319-0ppa1~18.04) ...
    Server mode is selected
    External server address is set to xxx.xxx.xxx
    External server port is set to 51820. Make sure that port is properly forwarded to port 51820 inside this container
    Internal subnet is set to 10.253.1.0
    PEERDNS var is either not set or is set to "auto", setting peer DNS to 10.253.1.1 to use wireguard docker host's DNS.
    Server mode is selected
    No changes to parameters. Existing configs are used.
    [cont-init.d] 30-config: exited 0.
    [cont-init.d] 99-custom-scripts: executing...
    [custom-init] no custom files found exiting...
    [cont-init.d] 99-custom-scripts: exited 0.
    [cont-init.d] done.
    [services.d] starting services
    [services.d] done.
    Warning: `/config/wg0.conf' is world accessible
    [#] ip link add wg0 type wireguard
    [#] wg setconf wg0 /dev/fd/63
    [#] ip -4 address add 10.253.1.3 dev wg0
    [#] ip link set mtu 1420 up dev wg0
    [#] ip -4 route add 192.168.1.0/24 dev wg0
    [#] ip -4 route add 10.253.1.0/24 dev wg0
    [#] iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    .:53
    CoreDNS-1.6.9
    linux/arm, go1.14.1, 1766568

Wireguard docker is sleeping after installing of kernel headers

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.

After launching the the wireguard docker via yaml file it looks like the docker is starting up but then it falls asleep.
Looks like a bug to me.
Would highly appreciate your help in this topic.


Expected Behavior

Running with the installed headers

Current Behavior

Sleeping

Steps to Reproduce

  1. Start Container

Environment

**OS:Raspbian GNU/Linux 10 (buster)
**CPU architecture:Linux 5.4.58-v7l+ armv7l

Linux raspberrypi 5.4.58-v7l+ #1335 SMP Thu Aug 13 22:23:01 BST 2020 armv7l GNU/Linux

Command used to create docker container (run/create/compose/screenshot)


version: "2"
services:
wireguard:
image: linuxserver/wireguard
container_name: wireguard
ports:
- 51969:51969/udp
cap_add:
- NET_ADMIN
- SYS_MODULE
volumes:
- /opt/docker/wireguard/config:/config
- /opt/docker/wireguard/lib/modules:/lib/modules

- /usr/src:/usr/src

  - /etc/resolv.conf:/etc/resolv.conf:ro
environment:
  PUID: "0"
  PGID: "0"
  TZ: "Europe/Berlin"
  SERVERURL: "DUMMY.myfritz.net"
  SERVERPORT: "51969"
  PEERS: "2"
  PEERDNS: "192.168.178.54"
restart: unless-stopped

Docker logs

**** Kernel headers don't seem to be available, can't compile the module. Sleeping now. . . ****

[cont-finish.d] executing container finish scripts...

[cont-finish.d] done.

[s6-finish] waiting for services.

[s6-finish] sending all processes the TERM signal.

[s6-finish] sending all processes the KILL signal and exiting.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.

[s6-init] ensuring user provided files have correct perms...exited 0.

[fix-attrs.d] applying ownership & permissions fixes...

[fix-attrs.d] done.

[cont-init.d] executing container initialization scripts...

[cont-init.d] 01-envfile: executing...

[cont-init.d] 01-envfile: exited 0.

[cont-init.d] 10-adduser: executing...

usermod: no changes


      _         ()


     | |  ___   _    __


     | | / __| | |  /  \ 


     | | \__ \ | | | () |


     |_| |___/ |_|  \__/

Brought to you by linuxserver.io


To support the app dev(s) visit:

WireGuard: https://www.wireguard.com/donations/

To support LSIO projects visit:

https://www.linuxserver.io/donate/


GID/UID


User uid: 0

User gid: 0


[cont-init.d] 10-adduser: exited 0.

[cont-init.d] 30-config: executing...

Uname info: Linux cafd9fd5f887 5.4.58-v7l+ #1335 SMP Thu Aug 13 22:23:01 BST 2020 armv7l armv7l armv7l GNU/Linux

Error: Unknown device type.

**** The wireguard module is not active, will attempt kernel header install and module compilation. ****

**** Attempting kernel header install ****

Get:1 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]

Get:2 http://ports.ubuntu.com/ubuntu-ports bionic InRelease [242 kB]

Get:3 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease [88.7 kB]

Hit:4 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease

Hit:5 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease

Err:1 http://archive.raspberrypi.org/debian buster InRelease

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 82B129927FA3303E

Get:6 http://ports.ubuntu.com/ubuntu-ports bionic/restricted armhf Packages [12.5 kB]

Get:7 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse armhf Packages [157 kB]

Get:8 http://ports.ubuntu.com/ubuntu-ports bionic/main armhf Packages [1,277 kB]

Get:9 http://ports.ubuntu.com/ubuntu-ports bionic/universe armhf Packages [11.0 MB]

Get:10 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe armhf Packages [1,177 kB]

Get:11 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse armhf Packages [4,825 B]

Get:12 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main armhf Packages [843 kB]

Get:13 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted armhf Packages [11.0 kB]

Reading package lists...

W: GPG error: http://archive.raspberrypi.org/debian buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 82B129927FA3303E

E: The repository 'http://archive.raspberrypi.org/debian buster InRelease' is not signed.

**** Raspbian kernel naming convention detected, attempting to install raspbian kernel headers ****

Warning: apt-key output should not be parsed (stdout is not a terminal)

OK

Hit:1 http://ports.ubuntu.com/ubuntu-ports bionic InRelease

Hit:2 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease

Hit:4 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease

Get:3 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]

Hit:5 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease

Get:6 http://archive.raspberrypi.org/debian buster/main Sources [93.7 kB]

Get:7 http://archive.raspberrypi.org/debian buster/main armhf Packages [331 kB]

Fetched 457 kB in 7s (62.0 kB/s)

Reading package lists...

Reading package lists...

Building dependency tree...

Reading state information...

The following NEW packages will be installed:

raspberrypi-kernel-headers

0 upgraded, 1 newly installed, 0 to remove and 9 not upgraded.

Need to get 26.2 MB of archives.

After this operation, 171 MB of additional disk space will be used.

Get:1 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200811-1 [26.2 MB]

Fetched 26.2 MB in 8s (3,288 kB/s)

Selecting previously unselected package raspberrypi-kernel-headers.

(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 13991 files and directories currently installed.)

Preparing to unpack .../raspberrypi-kernel-headers_1.20200811-1_armhf.deb ...

Unpacking raspberrypi-kernel-headers (1.20200811-1) ...

Setting up raspberrypi-kernel-headers (1.20200811-1) ...

run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51+

  • dkms: running auto installation service for kernel 5.4.51+
    [ OK ]

run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51-v7+

  • dkms: running auto installation service for kernel 5.4.51-v7+
    [ OK ]

run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51-v7l+

  • dkms: running auto installation service for kernel 5.4.51-v7l+
    [ OK ]

run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51-v8+

  • dkms: running auto installation service for kernel 5.4.51-v8+
    [ OK ]

**** Kernel headers don't seem to be available, can't compile the module. Sleeping now. . . ****

wg0 device not found?

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.


Expected Behavior

Deploying WG pod starts update successfully

Current Behavior

The container is either not permitted or is having trouble creating the wg0 interface

Steps to Reproduce

deploy WG on Kubernetes cluster
View logs.

Environment####

Kubernetes (v1.17.4) Deployed via RKE
Rancher 2.4.3
Centos7 Nodes
x86_64

Command used to create docker container (run/create/compose/screenshot)

`apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "7"
field.cattle.io/creatorId: user-wzxh4
creationTimestamp: "2020-05-13T18:36:56Z"
generation: 7
labels:
cattle.io/creator: norman
workload.user.cattle.io/workloadselector: deployment-public-wireguard
name: wireguard
namespace: public
resourceVersion: "6153297"
selfLink: /apis/apps/v1/namespaces/public/deployments/wireguard
uid: eda2e41d-d514-403d-93dd-32bf230c59e0
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
workload.user.cattle.io/workloadselector: deployment-public-wireguard
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
annotations:
cattle.io/timestamp: "2020-05-18T17:33:13Z"
field.cattle.io/ports: '[[{"containerPort":51820,"dnsName":"wireguard-nodeport","kind":"NodePort","name":"wgdata","protocol":"UDP","sourcePort":51820}]]'
creationTimestamp: null
labels:
workload.user.cattle.io/workloadselector: deployment-public-wireguard
spec:
containers:
- env:
- name: GUID
value: "1000"
- name: PEERDNS
value: 17.181.30.3
- name: PEERS
value: "10"
- name: PUID
value: "1000"
- name: SERVERPORT
value: "51820"
- name: SERVERURL
value: vpn2.domain.com
- name: TZ
value: america/new_york
image: linuxserver/wireguard
imagePullPolicy: Always
name: wireguard
ports:
- containerPort: 51820
name: wgdata
protocol: UDP
resources: {}
securityContext:
allowPrivilegeEscalation: false
capabilities:
add:
- NET_ADMIN
- SYS_MODULE
privileged: false
readOnlyRootFilesystem: false
runAsNonRoot: false
stdin: true
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
tty: true
volumeMounts:
- mountPath: /config
name: wg-config
- mountPath: /lib/modules
name: lib-module-volume
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- name: wg-config
persistentVolumeClaim:
claimName: wireguard-pvc
- name: lib-module-volume
persistentVolumeClaim:
claimName: lib-module-pvc
status:
availableReplicas: 1
conditions:

  • lastTransitionTime: "2020-05-18T17:29:06Z"
    lastUpdateTime: "2020-05-18T17:29:06Z"
    message: Deployment has minimum availability.
    reason: MinimumReplicasAvailable
    status: "True"
    type: Available
  • lastTransitionTime: "2020-05-13T18:36:57Z"
    lastUpdateTime: "2020-05-18T17:33:19Z"
    message: ReplicaSet "wireguard-86d55b77c7" has successfully progressed.
    reason: NewReplicaSetAvailable
    status: "True"
    type: Progressing
    observedGeneration: 7
    readyReplicas: 1
    replicas: 1
    updatedReplicas: 1
    `

Docker logs

(Logs were quite large, I included a pastebin for ease of viewability)
https://pastebin.com/zqksr6U2

Not sure if this is a bug on CentOS or if I should be seeking troubleshooting in discord. Thanks!

iptables-restore: unable to initialize table 'raw'

linuxserver.io


Expected Behavior

Container runs, using pre-existing Wireguard module.

Current Behavior

Previous builds were operational. Current builds appears to fail during testing of existing module with:

[#] iptables-restore -n
iptables-restore v1.6.1: iptables-restore: unable to initialize table 'raw'

Steps to Reproduce

See container settings below.

Environment

OS: Synology DSM 6.2
CPU architecture: x86_64
How docker service was installed: Synology package

Command used to create docker container (run/create/compose/screenshot)

  1. Minor Tweak of note: Added variable "ALLOWEDIPS" to templates, instead of using 0.0.0.0 for generated peer configs
{
   "cap_add" : [ "NET_ADMIN", "SYS_MODULE" ],
   "cap_drop" : [],
   "cmd" : "",
   "cpu_priority" : 50,
   "devices" : null,
   "enable_publish_all_ports" : false,
   "enable_restart_policy" : true,
   "enabled" : true,
   "env_variables" : [
      {
         "key" : "PATH",
         "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
      },
      {
         "key" : "HOME",
         "value" : "/root"
      },
      {
         "key" : "LANGUAGE",
         "value" : "en_US.UTF-8"
      },
      {
         "key" : "LANG",
         "value" : "en_US.UTF-8"
      },
      {
         "key" : "TERM",
         "value" : "xterm"
      },
      {
         "key" : "DEBIAN_FRONTEND",
         "value" : "noninteractive"
      },
      {
         "key" : "ALLOWEDIPS",
         "value" : "10.0.0.0/24"
      },
      {
         "key" : "SERVERURL",
         "value" : "<fdqn snipped>"
      },
      {
         "key" : "PEERS",
         "value" : "3"
      },
      {
         "key" : "PEERDNS",
         "value" : "1.1.1.1"
      }
   ],
   "exporting" : false,
   "id" : "<snipped>",
   "image" : "linuxserver/wireguard:latest",
   "is_ddsm" : false,
   "is_package" : false,
   "links" : [],
   "memory_limit" : 0,
   "name" : "Wireguard",
   "network" : [
      {
         "driver" : "bridge",
         "name" : "bridge"
      }
   ],
   "network_mode" : "bridge",
   "port_bindings" : [
      {
         "container_port" : 51820,
         "host_port" : 51820,
         "type" : "udp"
      }
   ],
   "privileged" : false,
   "shortcut" : {
      "enable_shortcut" : false,
      "enable_status_page" : false,
      "enable_web_page" : false,
      "web_page_url" : ""
   },
   "use_host_network" : false,
   "volume_bindings" : [
      {
         "host_volume_file" : "/docker/configs/wireguard",
         "mount_point" : "/config",
         "type" : "rw"
      },
      {
         "host_volume_file" : "/docker/localtime",
         "mount_point" : "/etc/localtime",
         "type" : "ro"
      }
   ]
}

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing... 
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing... 
usermod: no changes

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \ 
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
WireGuard: https://www.wireguard.com/donations/

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    911
User gid:    911
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing... 
**** It seems the wireguard module is already loaded, let's test to make sure it works. ****
[!] Warning: This server is for testing purposes only. You may not use this server for abusive or illegal purposes.
[+] Generating private key.
[+] Sending public key to server.
[+] Parsing server response.
[+] Writing config file.
[+] Success. Run `wg-quick up demo` to turn on the tunnel to the demo server and `wg-quick down demo` to turn it off.
[#] ip link add demo type wireguard
[#] wg setconf demo /dev/fd/63
[#] ip -4 address add 192.168.4.75/24 dev demo
[#] ip link set mtu 1420 up dev demo
[#] resolvconf -a tun.demo -m 0 -x
[#] wg set demo fwmark 51820
[#] ip -4 route add 0.0.0.0/0 dev demo table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
sysctl: setting key "net.ipv4.conf.all.src_valid_mark": Read-only file system
[#] iptables-restore -n
iptables-restore v1.6.1: iptables-restore: unable to initialize table 'raw'

Error occurred at line: 1
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
[#] resolvconf -d tun.demo -f
[#] ip -4 rule delete table 51820
[#] ip link delete dev demo
**** The module is not functional, will attempt kernel header install and module compilation. ****
wg-quick: `demo' is not a WireGuard interface
**** Attempting kernel header install ****
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main Sources [411 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/universe Sources [372 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,397 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1,254 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic-security/main Sources [198 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages [961 kB]
Fetched 4,770 kB in 3s (1,721 kB/s)                      
Reading package lists... Done
**** No kernel headers found in the Ubuntu or Debian repos!! Will try the headers from host (if mapped), may or may not work ****
**** Kernel headers don't seem to be available, can't compile the module. Sleeping now. . . ****

ARM error

hi and thant you for you job

i comme to you because I have this error when I launch the docker

run-parts: executing /etc/kernel/header_postinst.d/dkms 4.19.97-v8+
,

  • dkms: running auto installation service for kernel 4.19.97-v8+
    Error! Your kernel headers for kernel 4.19.97-v8+ cannot be found.
    ,
    Please install the linux-headers-4.19.97-v8+ package,
    ,
    or use the --kernelsourcedir option to tell DKMS where it's located
    ,

this kernel is missing?
that's why i can't connect?

thank you

RTNETLINK answers: Operation not supported

Expected Behavior

Working

Current Behavior

Not working

Steps to Reproduce

sudo docker create \
  --name=wireguard \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Europe/London \
  -e SERVERURL=mydns.it \
  -e SERVERPORT=51820 \
  -e PEERS=1 \
  -e PEERDNS=auto \
  -e INTERNAL_SUBNET=10.13.13.0 \
  -p 51820:51820/udp \
  -v /home/pi/wireguard/config:/config \
  -v /lib/modules:/lib/modules \
  --restart unless-stopped \
  linuxserver/wireguard

Environment

Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 10 (buster)
Release:	10
Codename:	buster

My modules:

drwxr-xr-x  3 root root 4096 Jun  7 09:40 4.19.118+
drwxr-xr-x  3 root root 4096 Jun  7 09:40 4.19.118-v7+
drwxr-xr-x  3 root root 4096 Jun  7 09:40 4.19.118-v7l+
drwxr-xr-x  3 root root 4096 Feb 13 15:55 4.19.97+
drwxr-xr-x  3 root root 4096 Feb 13 15:55 4.19.97-v7+
drwxr-xr-x  3 root root 4096 Feb 13 15:55 4.19.97-v7l+
drwxr-xr-x  3 root root 4096 Feb 13 15:55 4.19.97-v8+

Docker logs

Setting up raspberrypi-kernel-headers (1.20200601-1) ...
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.19.118+
 * dkms: running auto installation service for kernel 4.19.118+          [ OK ] 
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.19.118-v7+
 * dkms: running auto installation service for kernel 4.19.118-v7+       [ OK ] 
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.19.118-v7l+
 * dkms: running auto installation service for kernel 4.19.118-v7l+      [ OK ] 
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.19.118-v8+
 * dkms: running auto installation service for kernel 4.19.118-v8+              Error! Your kernel headers for kernel 4.19.118-v8+ cannot be found.
Please install the linux-headers-4.19.118-v8+ package,
or use the --kernelsourcedir option to tell DKMS where it's located
[#] ip link add wg0 type wireguard
RTNETLINK answers: Operation not supported
Unable to access interface: Protocol not supported
[#] ip link delete dev wg0
Cannot find device "wg0"

Cannot Start Service On Non-Standard Kernel

linuxserver.io


Expected Behavior

When I create the container in Docker (using the example compose file), the image should download and build and become live

Current Behavior

Because I am on a non-standard Kernel (using a VPS that compiles their own Kernel's and don't allow switching to a vanilla one), the container fails to build and I get the following error:

**** No kernel headers found in the Ubuntu or Debian repos!! Will try the headers from host (if mapped), may or may not work ****

**** Kernel headers don't seem to be available, can't compile the module. Sleeping now. . . ****

Steps to Reproduce

  1. Use VPS (OVH) Running Ubuntu Server 16.04
  2. Set Up Container In Docker Compose As Per Instructions
  3. Pull And Start The Container

Docker Compose File:

  wireguard:
    image: linuxserver/wireguard:latest
    container_name: wireguard
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
#      - SERVERURL=wireguard.domain.com #optional
      - SERVERPORT=51820
#      - PEERS=1 #optional
#      - PEERDNS=auto #optional
      - INTERNAL_SUBNET=10.13.13.0
#      - ALLOWEDIPS=192.168.1.0/24,192.168.2.0/24 #optional
    volumes:
      - type: volume
        source: wireguard-config
        target: /config
        read_only: False
      - type: bind
        source: /lib/modules
        target: /lib/modules
        read_only: False
    networks:
      - vpn
    ports:
      - 51820:51820/udp
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    restart: unless-stopped

Environment

OS: Ubuntu Server 16.04 (4.19-ovh-xxxx-std-ipv6-64)
CPU architecture: x86_64
How docker service was installed: Docker Compose

Command used to create docker container (run/create/compose/screenshot)

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.

[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing... 
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing... 

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \ 
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
WireGuard: https://www.wireguard.com/donations/

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    1000
User gid:    999
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing... 
Uname info: Linux c85c57e9187f 4.19-ovh-xxxx-std-ipv6-64 #1454909 SMP Wed Oct 7 08:31:57 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
RTNETLINK answers: Operation not supported
**** The wireguard module is not active, will attempt kernel header install and module compilation. ****
**** Attempting kernel header install ****
Get:1 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic/multiverse Sources [216 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic/universe Sources [11.5 MB]
Get:6 http://archive.ubuntu.com/ubuntu bionic/main Sources [1,063 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic/restricted Sources [5,823 B]
Get:8 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1,344 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/restricted Sources [18.5 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/universe Sources [555 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/main Sources [624 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse Sources [12.7 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [2,130 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [2,208 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [54.4 kB]
Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [252 kB]
Get:20 http://archive.ubuntu.com/ubuntu bionic-security/main Sources [301 kB]
Get:21 http://archive.ubuntu.com/ubuntu bionic-security/multiverse Sources [4,358 B]
Get:22 http://archive.ubuntu.com/ubuntu bionic-security/restricted Sources [13.0 kB]
Get:23 http://archive.ubuntu.com/ubuntu bionic-security/universe Sources [337 kB]
Get:24 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1,365 kB]
Get:25 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages [1,781 kB]
Get:26 http://archive.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [222 kB]
Get:27 http://archive.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [15.8 kB]
Fetched 36.0 MB in 11s (3,163 kB/s)
Reading package lists...
**** No kernel headers found in the Ubuntu or Debian repos!! Will try the headers from host (if mapped), may or may not work ****
**** Kernel headers don't seem to be available, can't compile the module. Sleeping now. . . ****

Cannot generate client conf files

linuxserver.io


Expected Behavior

It is expected that starting the container the configuration file of the users declared in the docker-compose is generated.

Current Behavior

When starting the container it does not generate the client configuration file in the directory /config.

Steps to Reproduce

The container starts without problem but I see that it does not generate the configuration file of the only configured client (PEERS=clay), I understand that the configuration file should be generated automatically in /config but the directory is empty as well as the directory /config/templates

Environment

OS: Raspbian GNU/Linux 10 (buster)
CPU architecture: armv7l
Kernel version Linux 5.4.72-v7l
How docker service was installed: From the distro repo.

Command used to create docker container (run/create/compose/screenshot)

This is my docker-compose.yml

  wireguard:
    image: ghcr.io/linuxserver/wireguard
    container_name: wireguard
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Santiago
      - SERVERURL=xy.somesite.com
      - SERVERPORT=51820
      - PEERS=clay
      - PEERDNS=auto
      - INTERNAL_SUBNET=10.13.13.0
      - ALLOWEDIPS=192.168.0.0/24
    volumes:
      - /mnt/TOSHIBA/WireGuard/config:/config
      - /mnt/TOSHIBA/WireGuard/modules:/lib/modules
    ports:
      - 51820:51820/udp
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    restart: unless-stopped

Docker logs

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
Uname info: Linux 589854a38033 5.4.72-v7l+ #1356 SMP Thu Oct 22 13:57:51 BST 2020 armv7l armv7l armv7l GNU/Linux
Error: Unknown device type.
**** The wireguard module is not active, will attempt kernel header install and module compilation. ****
**** Kernel headers seem to be present, attempting to build the wireguard module. . . ****
**** Building the module ****
make: Entering directory '/app/wireguard-linux-compat/src'
Building modules, stage 2.
MODPOST 1 modules
make: Leaving directory '/app/wireguard-linux-compat/src'
make: Entering directory '/app/wireguard-linux-compat/src'
INSTALL /app/wireguard-linux-compat/src/wireguard.ko
DEPMOD 5.4.72-v7l+
Warning: modules_install: missing 'System.map' file. Skipping depmod.
depmod -b "/" -a 5.4.72-v7l+
depmod: WARNING: could not open //lib/modules/5.4.72-v7l+/modules.order: No such file or directory
depmod: WARNING: could not open //lib/modules/5.4.72-v7l+/modules.builtin: No such file or directory
make: Leaving directory '/app/wireguard-linux-compat/src'
**** Let's test our new module. ****
Error: Unknown device type.
**** The module is not active, review the logs. Sleeping now. . . ****

Port Forward?

Expected Behavior

I should be able to give a list of ports and destination IPs/docker containers to forward ports to for incoming traffic on the wireguard client.

Current Behavior

Doesn't appear to be possible to handle port forwarding.

iptables-restore: unable to initialize table 'raw'

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.


Expected Behavior

Container runs

Current Behavior

[#] iptables-restore -n
iptables-restore v1.6.1: iptables-restore: unable to initialize table 'raw'

Steps to Reproduce

  1. See container settings below.

Environment

OS: Synology DSM 6.23
CPU architecture: x86_64
How docker service was installed: synology package

Command used to create docker container (run/create/compose/screenshot)

docker create
--name=wireguard-keepsolid-client
--cap-add=NET_ADMIN
--cap-add=SYS_MODULE
-e PUID=1000
-e PGID=1000
-e TZ=Asia/Seoul
-p 51823:51820/udp
-v /volume2/docker/wireguard-keepsolid/client/config/wg0.conf:/config/wg0.conf
-v /lib/modules:/lib/modules
--sysctl="net.ipv4.conf.all.src_valid_mark=1"
--restart="on-failure:10"
linuxserver/wireguard

Docker logs

date stream content
2020-08-27 06:42:11 stderr [#] ip link delete dev wg0
2020-08-27 06:42:11 stderr [#] ip -4 rule delete table main suppress_prefixlength 0
2020-08-27 06:42:11 stderr [#] ip -4 rule delete table 51820
2020-08-27 06:42:11 stderr [#] resolvconf -d wg0 -f
2020-08-27 06:42:11 stderr Try `iptables-restore -h' or 'iptables-restore --help' for more information.
2020-08-27 06:42:11 stderr Error occurred at line: 1
2020-08-27 06:42:11 stderr  
2020-08-27 06:42:11 stderr iptables-restore v1.6.1: iptables-restore: unable to initialize table 'raw'
2020-08-27 06:42:11 stderr [#] iptables-restore -n
2020-08-27 06:42:11 stderr sysctl: setting key "net.ipv4.conf.all.src_valid_mark": Read-only file system
2020-08-27 06:42:11 stderr [#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
2020-08-27 06:42:11 stderr [#] ip -4 rule add table main suppress_prefixlength 0
2020-08-27 06:42:11 stderr [#] ip -4 rule add not fwmark 51820 table 51820
2020-08-27 06:42:11 stderr [#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
2020-08-27 06:42:11 stderr [#] wg set wg0 fwmark 51820
2020-08-27 06:42:11 stdout linux/amd64, go1.14.4, f59c03d
2020-08-27 06:42:11 stdout CoreDNS-1.7.0
2020-08-27 06:42:11 stdout .:53
2020-08-27 06:42:11 stderr [#] resolvconf -a wg0 -m 0 -x
2020-08-27 06:42:11 stderr [#] ip link set mtu 1420 up dev wg0
2020-08-27 06:42:11 stderr [#] ip -4 address add 10.100.3.178/32 dev wg0
2020-08-27 06:42:11 stderr [#] wg setconf wg0 /dev/fd/63
2020-08-27 06:42:11 stderr [#] ip link add wg0 type wireguard
2020-08-27 06:42:11 stdout [services.d] done.
2020-08-27 06:42:11 stdout [services.d] starting services
2020-08-27 06:42:11 stdout [cont-init.d] done.
2020-08-27 06:42:11 stdout [cont-init.d] 99-custom-scripts: exited 0.
2020-08-27 06:42:11 stdout [custom-init] no custom files found exiting...
2020-08-27 06:42:11 stdout [cont-init.d] 99-custom-scripts: executing...
2020-08-27 06:42:11 stdout [cont-init.d] 30-config: exited 0.
2020-08-27 06:42:11 stdout **** Client mode selected.
2020-08-27 06:42:11 stdout **** It seems the wireguard module is already active. Skipping kernel header install and module compilation. ****
2020-08-27 06:42:11 stdout Uname info: Linux 71a5161268bb 4.4.59+ #25426 SMP PREEMPT Tue May 12 04:54:55 CST 2020 x86_64 x86_64 x86_64 GNU/Linux
2020-08-27 06:42:11 stdout [cont-init.d] 30-config: executing...
2020-08-27 06:42:11 stdout [cont-init.d] 10-adduser: exited 0.
2020-08-27 06:42:11 stdout  
2020-08-27 06:42:11 stdout -------------------------------------
2020-08-27 06:42:11 stdout User gid:    1000
2020-08-27 06:42:11 stdout User uid:    1000
2020-08-27 06:42:11 stdout  
2020-08-27 06:42:11 stdout -------------------------------------
2020-08-27 06:42:11 stdout GID/UID
2020-08-27 06:42:11 stdout -------------------------------------
2020-08-27 06:42:11 stdout https://www.linuxserver.io/donate/
2020-08-27 06:42:11 stdout To support LSIO projects visit:
2020-08-27 06:42:11 stdout  
2020-08-27 06:42:11 stdout WireGuard: https://www.wireguard.com/donations/
2020-08-27 06:42:11 stdout To support the app dev(s) visit:
2020-08-27 06:42:11 stdout  
2020-08-27 06:42:11 stdout -------------------------------------
2020-08-27 06:42:11 stdout Brought to you by linuxserver.io
2020-08-27 06:42:11 stdout  
2020-08-27 06:42:11 stdout  
2020-08-27 06:42:11 stdout || |/ ||  _/
2020-08-27 06:42:11 stdout | | __ \ | | | () |
2020-08-27 06:42:11 stdout | | / __| | |  /  \
2020-08-27 06:42:11 stdout | |  ___   _    __
2020-08-27 06:42:11 stdout _         ()
2020-08-27 06:42:11 stdout -------------------------------------
2020-08-27 06:42:11 stdout  
2020-08-27 06:42:10 stdout [cont-init.d] 10-adduser: executing...
2020-08-27 06:42:10 stdout [cont-init.d] 01-envfile: exited 0.
2020-08-27 06:42:10 stdout [cont-init.d] 01-envfile: executing...
2020-08-27 06:42:10 stdout [cont-init.d] executing container initialization scripts...
2020-08-27 06:42:10 stdout [fix-attrs.d] done.
2020-08-27 06:42:10 stdout [fix-attrs.d] applying ownership & permissions fixes...
2020-08-27 06:42:10 stdout [s6-init] ensuring user provided files have correct perms...exited 0.
2020-08-27 06:42:10 stdout [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
date stream content
2020-08-27 06:42:11 stderr [#] ip link delete dev wg0
2020-08-27 06:42:11 stderr [#] ip -4 rule delete table main suppress_prefixlength 0
2020-08-27 06:42:11 stderr [#] ip -4 rule delete table 51820
2020-08-27 06:42:11 stderr [#] resolvconf -d wg0 -f
2020-08-27 06:42:11 stderr Try `iptables-restore -h' or 'iptables-restore --help' for more information.
2020-08-27 06:42:11 stderr Error occurred at line: 1
2020-08-27 06:42:11 stderr  
2020-08-27 06:42:11 stderr iptables-restore v1.6.1: iptables-restore: unable to initialize table 'raw'
2020-08-27 06:42:11 stderr [#] iptables-restore -n
2020-08-27 06:42:11 stderr sysctl: setting key "net.ipv4.conf.all.src_valid_mark": Read-only file system
2020-08-27 06:42:11 stderr [#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
2020-08-27 06:42:11 stderr [#] ip -4 rule add table main suppress_prefixlength 0
2020-08-27 06:42:11 stderr [#] ip -4 rule add not fwmark 51820 table 51820
2020-08-27 06:42:11 stderr [#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
2020-08-27 06:42:11 stderr [#] wg set wg0 fwmark 51820
2020-08-27 06:42:11 stdout linux/amd64, go1.14.4, f59c03d
2020-08-27 06:42:11 stdout CoreDNS-1.7.0
2020-08-27 06:42:11 stdout .:53
2020-08-27 06:42:11 stderr [#] resolvconf -a wg0 -m 0 -x
2020-08-27 06:42:11 stderr [#] ip link set mtu 1420 up dev wg0
2020-08-27 06:42:11 stderr [#] ip -4 address add 10.100.3.178/32 dev wg0
2020-08-27 06:42:11 stderr [#] wg setconf wg0 /dev/fd/63
2020-08-27 06:42:11 stderr [#] ip link add wg0 type wireguard
2020-08-27 06:42:11 stdout [services.d] done.
2020-08-27 06:42:11 stdout [services.d] starting services
2020-08-27 06:42:11 stdout [cont-init.d] done.
2020-08-27 06:42:11 stdout [cont-init.d] 99-custom-scripts: exited 0.
2020-08-27 06:42:11 stdout [custom-init] no custom files found exiting...
2020-08-27 06:42:11 stdout [cont-init.d] 99-custom-scripts: executing...
2020-08-27 06:42:11 stdout [cont-init.d] 30-config: exited 0.
2020-08-27 06:42:11 stdout **** Client mode selected.
2020-08-27 06:42:11 stdout **** It seems the wireguard module is already active. Skipping kernel header install and module compilation. ****
2020-08-27 06:42:11 stdout Uname info: Linux 71a5161268bb 4.4.59+ #25426 SMP PREEMPT Tue May 12 04:54:55 CST 2020 x86_64 x86_64 x86_64 GNU/Linux
2020-08-27 06:42:11 stdout [cont-init.d] 30-config: executing...
2020-08-27 06:42:11 stdout [cont-init.d] 10-adduser: exited 0.
2020-08-27 06:42:11 stdout  
2020-08-27 06:42:11 stdout -------------------------------------
2020-08-27 06:42:11 stdout User gid:    1000
2020-08-27 06:42:11 stdout User uid:    1000
2020-08-27 06:42:11 stdout  
2020-08-27 06:42:11 stdout -------------------------------------
2020-08-27 06:42:11 stdout GID/UID
2020-08-27 06:42:11 stdout -------------------------------------
2020-08-27 06:42:11 stdout https://www.linuxserver.io/donate/
2020-08-27 06:42:11 stdout To support LSIO projects visit:
2020-08-27 06:42:11 stdout  
2020-08-27 06:42:11 stdout WireGuard: https://www.wireguard.com/donations/
2020-08-27 06:42:11 stdout To support the app dev(s) visit:
2020-08-27 06:42:11 stdout  
2020-08-27 06:42:11 stdout -------------------------------------
2020-08-27 06:42:11 stdout Brought to you by linuxserver.io
2020-08-27 06:42:11 stdout  
2020-08-27 06:42:11 stdout  
2020-08-27 06:42:11 stdout || |/ ||  _/
2020-08-27 06:42:11 stdout | | __ \ | | | () |
2020-08-27 06:42:11 stdout | | / __| | |  /  \
2020-08-27 06:42:11 stdout | |  ___   _    __
2020-08-27 06:42:11 stdout _         ()
2020-08-27 06:42:11 stdout -------------------------------------
2020-08-27 06:42:11 stdout  
2020-08-27 06:42:10 stdout [cont-init.d] 10-adduser: executing...
2020-08-27 06:42:10 stdout [cont-init.d] 01-envfile: exited 0.
2020-08-27 06:42:10 stdout [cont-init.d] 01-envfile: executing...
2020-08-27 06:42:10 stdout [cont-init.d] executing container initialization scripts...
2020-08-27 06:42:10 stdout [fix-attrs.d] done.
2020-08-27 06:42:10 stdout [fix-attrs.d] applying ownership & permissions fixes...
2020-08-27 06:42:10 stdout [s6-init] ensuring user provided files have correct perms...exited 0.
2020-08-27 06:42:10 stdout [s6-init] making user provided files available at /var/run/s6/etc...exited 0.

Wireguard ls15 - RTNETLINK answers: Operation not supported

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.


Expected Behavior

I expect the container to create 3 peers and make a wireguard point

Current Behavior

The container starts, but never create the peers.

Steps to Reproduce

  1. create the docker compose file
  2. sudo docker-compose up -d

Environment

**OS:Ubuntu 18.04
CPU architecture: x86_64
How docker service was installed:
Sudo apt install docker.io docker-compose -y

Command used to create docker container (run/create/compose/screenshot)

docker-compose.yml


version: "2.1"
services:
wireguard:
image: linuxserver/wireguard:amd64-1.0.20200319-1ubuntu118.04-ls11
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Copenhagen
- SERVERURL=85.184.164.50
- SERVERPORT=51820
- PEERS=3
- PEERDNS=1.1.1.1
- INTERNAL_SUBNET=10.13.13.0
volumes:
- /docker/wireguard/config:/config
- /lib/modules:/lib/modules
ports:
- 51820:51820/udp
restart: unless-stopped

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...


      _         ()
     | |  ___   _    __
     | | / __| | |  /  \
     | | \__ \ | | | () |
     |_| |___/ |_|  \__/

Brought to you by linuxserver.io

To support the app dev(s) visit:
WireGuard: https://www.wireguard.com/donations/

To support LSIO projects visit:
https://www.linuxserver.io/donate/

GID/UID

User uid: 1000
User gid: 1000

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
**** The wireguard module is not loaded, will attempt kernel header install and module compilation. ****
**** Attempting kernel header install ****
Get:1 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic/main Sources [1,063 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic/universe Sources [11.5 MB]
Get:6 http://archive.ubuntu.com/ubuntu bionic/restricted Sources [5,823 B]
Get:7 http://archive.ubuntu.com/ubuntu bionic/multiverse Sources [216 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1,344 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
Get:10 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main Sources [411 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/restricted Sources [9,368 B]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse Sources [6,203 B]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/universe Sources [372 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1,270 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,398 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [93.9 kB]
Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [13.4 kB]
Get:20 http://archive.ubuntu.com/ubuntu bionic-security/main Sources [198 kB]
Get:21 http://archive.ubuntu.com/ubuntu bionic-security/universe Sources [218 kB]
Get:22 http://archive.ubuntu.com/ubuntu bionic-security/restricted Sources [7,075 B]
Get:23 http://archive.ubuntu.com/ubuntu bionic-security/multiverse Sources [3,235 B]
Get:24 http://archive.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [82.2 kB]
Get:25 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages [977 kB]
Get:26 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [862 kB]
Get:27 http://archive.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [9,012 B]
Fetched 32.0 MB in 7s (4,455 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
linux-headers-4.15.0-69
The following NEW packages will be installed:
linux-headers-4.15.0-69 linux-headers-4.15.0-69-generic
0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
Need to get 12.2 MB of archives.
After this operation, 89.0 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-headers-4.15.0-69 all 4.15.0-69.78 [11.0 MB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-headers-4.15.0-69-generic amd64 4.15.0-69.78 [1,187 kB]
Fetched 12.2 MB in 2s (5,981 kB/s)
Selecting previously unselected package linux-headers-4.15.0-69.
(Reading database ... 17543 files and directories currently installed.)
Preparing to unpack .../linux-headers-4.15.0-69_4.15.0-69.78_all.deb ...
Unpacking linux-headers-4.15.0-69 (4.15.0-69.78) ...
Selecting previously unselected package linux-headers-4.15.0-69-generic.
Preparing to unpack .../linux-headers-4.15.0-69-generic_4.15.0-69.78_amd64.deb ...
Unpacking linux-headers-4.15.0-69-generic (4.15.0-69.78) ...
Setting up linux-headers-4.15.0-69 (4.15.0-69.78) ...
Setting up linux-headers-4.15.0-69-generic (4.15.0-69.78) ...
/etc/kernel/header_postinst.d/dkms:

  • dkms: running auto installation service for kernel 4.15.0-69-generic
    ...done.
    **** Kernel headers seem to be present, attempting to build the wireguard module. . . ****
    **** Generating signing key ****
    Generating a RSA private key
    ...................++++
    ...................................................................................................................................++++
    writing new private key to 'signing_key.pem'

**** Building the module ****
make: Entering directory '/app/wireguard-linux-compat/src'
CC [M] /app/wireguard-linux-compat/src/main.o
CC [M] /app/wireguard-linux-compat/src/noise.o
CC [M] /app/wireguard-linux-compat/src/device.o
CC [M] /app/wireguard-linux-compat/src/peer.o
CC [M] /app/wireguard-linux-compat/src/timers.o
CC [M] /app/wireguard-linux-compat/src/queueing.o
CC [M] /app/wireguard-linux-compat/src/send.o
CC [M] /app/wireguard-linux-compat/src/receive.o
CC [M] /app/wireguard-linux-compat/src/socket.o
/app/wireguard-linux-compat/src/socket.c: In function ‘send6’:
/app/wireguard-linux-compat/src/socket.c:139:20: error: ‘const struct ipv6_stub’ has no member named ‘ipv6_dst_lookup_flow’; did you mean ‘ipv6_dst_lookup’?
dst = ipv6_stub->ipv6_dst_lookup_flow(sock_net(sock), sock, &fl,
^~~~~~~~~~~~~~~~~~~~
ipv6_dst_lookup
scripts/Makefile.build:330: recipe for target '/app/wireguard-linux-compat/src/socket.o' failed
make[2]: *** [/app/wireguard-linux-compat/src/socket.o] Error 1
Makefile:1577: recipe for target 'module/app/wireguard-linux-compat/src' failed
make[1]: *** [module/app/wireguard-linux-compat/src] Error 2
Makefile:25: recipe for target 'module' failed
make: *** [module] Error 2
make: Leaving directory '/app/wireguard-linux-compat/src'
make: Entering directory '/app/wireguard-linux-compat/src'
DEPMOD 4.15.0-69-generic
depmod -a 4.15.0-69-generic
make: Leaving directory '/app/wireguard-linux-compat/src'
**** Let's test our new module. ****
[!] Warning: This server is for testing purposes only. You may not use this server for abusive or illegal purposes.
[+] Generating private key.
[+] Sending public key to server.
[+] Parsing server response.
[+] Writing config file.
[+] Success. Run wg-quick up demo to turn on the tunnel to the demo server and wg-quick down demo to turn it off.
[#] ip link add demo type wireguard
RTNETLINK answers: Operation not supported
Unable to access interface: Protocol not supported
[#] ip link delete dev demo
Cannot find device "demo"
wg-quick: `demo' is not a WireGuard interface
**** The module is not working, review the logs. Sleeping now. . . ****

RTNETLINK answers: Operation not supported

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.

Sorry guys, my first issue on GitHub, I try to follow the template, please forgive me if it's not totally exhaustive, please ask for any further logs or whatever.

My issue

Client can't connect.
Having a Wireguard in server conf (with PEERS enabled), first peer (my GSM) can connect without any problem.
Second peer, a Debian Linux distro, can't connect though.
Could be somehow related to https://github.com/linuxserver/docker-wireguard/issues/12 but in this one, VPN connection seems working.


Expected Behavior

Linux client can connect.

Current Behavior

Getting this error in container's logs :

linux/amd64, go1.14.1, 1766568
[#] ip link add wg0 type wireguard
RTNETLINK answers: Operation not supported
Unable to access interface: Protocol not supported
[#] ip link delete dev wg0
Cannot find device "wg0"

Peer conf has been imported from server /config/templates/peers/peer2.conf
I added the /usr/src volume mounting since my issue seems related to kernel headers missing (or not suited?). But still no luck.

Steps to Reproduce

  1. Import peer2.conf
  2. Modify PUID/PGID to match my needs
  3. Add /usr/src volume mounting
  4. docker-compose up -d

Environment

OS: Linux nuc 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux
CPU architecture: x86_64/arm32/arm64 amd64
How docker service was installed:
Through docker repository
Docker version :

Version:           19.03.8
API version:       1.40

Docker-compose version :

docker-compose version 1.21.0, build unknown
docker-py version: 3.4.1

Command used to create docker container (run/create/compose/screenshot)

My docker-compose server file :

version: "2.1"
services:

   wireguard:
      image: linuxserver/wireguard
      container_name: wireguard
      hostname: wireguard
      cap_add:
         - NET_ADMIN
         - SYS_MODULE
      environment:
         - PUID=1001
         - PGID=1001
         - TZ=Europe/Brussels
         - SERVERURL=<REDACTED> #optional
         - SERVERPORT=51820 #optional
         - PEERS=4 #optional
         - PEERDNS=auto #optional
         - INTERNAL_SUBNET=10.13.13.0 #optional
      volumes:
         - ./config:/config
         - /lib/modules:/lib/modules
      ports:
         - 51820:51820/udp
      sysctls:
         - net.ipv4.conf.all.src_valid_mark=1
      restart: unless-stopped

My Debian distro docker-compose file :

version: "2.1"
services:


   wireguard:
      image: linuxserver/wireguard
      container_name: wireguard
      hostname: wireguard
      network_mode: bridge
      cap_add:
         - NET_ADMIN
         - SYS_MODULE
      environment:
         - PUID=1000
         - PGID=1000
         - TZ=Europe/Brussels
         - SERVERURL=<REDACTED> #optional
         - SERVERPORT=51820 #optional
         - PEERDNS=auto #optional
         - INTERNAL_SUBNET=10.13.13.0 #optional
      volumes:
         - ./config:/config
         - /lib/modules:/lib/modules
         - /usr/src:/usr/src
      ports:
         - 51820:51820/udp
      sysctls:
         - net.ipv4.conf.all.src_valid_mark=1
      restart: unless-stopped

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.,
[s6-init] ensuring user provided files have correct perms...exited 0.,
[fix-attrs.d] applying ownership & permissions fixes...,
[fix-attrs.d] done.,
[cont-init.d] executing container initialization scripts...,
[cont-init.d] 01-envfile: executing... ,
[cont-init.d] 01-envfile: exited 0.,
[cont-init.d] 10-adduser: executing... ,

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \ 
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/

Brought to you by linuxserver.io,
-------------------------------------,
To support the app dev(s) visit:
WireGuard: https://www.wireguard.com/donations/,
To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid:    1000,
User gid:    1000,
-------------------------------------
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing... 
Get:1 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic InRelease [15.9 kB],
Get:2 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB],
Get:3 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main Sources [1,212 B],
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB],
Get:5 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB],
Get:6 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main amd64 Packages [924 B],
Get:7 http://archive.ubuntu.com/ubuntu bionic/universe Sources [11.5 MB],
Get:8 http://archive.ubuntu.com/ubuntu bionic/multiverse Sources [216 kB],
Get:9 http://archive.ubuntu.com/ubuntu bionic/restricted Sources [5,823 B],
Get:10 http://archive.ubuntu.com/ubuntu bionic/main Sources [1,063 kB],
Get:11 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB],
Get:12 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1,344 kB],
Get:13 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB],
Get:14 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB],
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/main Sources [404 kB],
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse Sources [6,192 B],
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/universe Sources [369 kB],
Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/restricted Sources [8,069 B],
Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1,184 kB],
Get:20 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [12.6 kB],
Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,372 kB],
Get:22 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [59.0 kB],
Get:23 http://archive.ubuntu.com/ubuntu bionic-security/restricted Sources [5,440 B],
Get:24 http://archive.ubuntu.com/ubuntu bionic-security/universe Sources [214 kB],
Get:25 http://archive.ubuntu.com/ubuntu bionic-security/main Sources [187 kB],
Get:26 http://archive.ubuntu.com/ubuntu bionic-security/multiverse Sources [3,228 B],
Get:27 http://archive.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [44.6 kB],
Get:28 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [839 kB],
Get:29 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages [889 kB],
Get:30 http://archive.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [8,213 B],
Fetched 31.7 MB in 4s (7,915 kB/s),
Reading package lists...,
Debian host detected, attempting to install kernel headers from Debian Buster repo,
Warning: apt-key output should not be parsed (stdout is not a terminal),
OK,
Hit:1 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic InRelease,
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease,
Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease,
Get:4 http://deb.debian.org/debian buster InRelease [122 kB],
Hit:5 http://archive.ubuntu.com/ubuntu bionic-security InRelease,
Get:6 http://deb.debian.org/debian buster/non-free Sources [103 kB],
Get:7 http://deb.debian.org/debian buster/contrib Sources [50.5 kB],
Get:8 http://deb.debian.org/debian buster/main Sources [10.3 MB],
Get:9 http://deb.debian.org/debian buster/main amd64 Packages [10.6 MB],
Get:10 http://deb.debian.org/debian buster/non-free amd64 Packages [105 kB],
Get:11 http://deb.debian.org/debian buster/contrib amd64 Packages [60.8 kB],
Fetched 21.3 MB in 3s (6,832 kB/s),
Reading package lists...,
Reading package lists...,
Building dependency tree...,
Reading state information...,
The following additional packages will be installed:,
  cpp-8 gcc-8 libasan5 libgcc-8-dev libubsan1 linux-compiler-gcc-8-x86,
  linux-headers-4.19.0-8-common linux-kbuild-4.19 wireguard-dkms,
  wireguard-tools,
Suggested packages:,
  gcc-8-locales gcc-8-multilib gcc-8-doc libgcc1-dbg libgomp1-dbg libitm1-dbg,
  libatomic1-dbg libasan5-dbg liblsan0-dbg libtsan0-dbg libubsan1-dbg,
  libmpx2-dbg libquadmath0-dbg,
The following NEW packages will be installed:,
  cpp-8 gcc-8 libasan5 libgcc-8-dev libubsan1 linux-compiler-gcc-8-x86,
  linux-headers-4.19.0-8-amd64 linux-headers-4.19.0-8-common linux-kbuild-4.19,
  wireguard wireguard-dkms wireguard-tools,
0 upgraded, 12 newly installed, 0 to remove and 196 not upgraded.,
Need to get 28.6 MB of archives.,
After this operation, 129 MB of additional disk space will be used.,
Get:1 http://deb.debian.org/debian buster/main amd64 linux-compiler-gcc-8-x86 amd64 4.19.98-1 [396 kB],
Get:2 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main amd64 wireguard-dkms all 1.0.20200413-0ubuntu2~18.04 [254 kB],
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 cpp-8 amd64 8.4.0-1ubuntu1~18.04 [7,225 kB],
Get:4 http://deb.debian.org/debian buster/main amd64 linux-headers-4.19.0-8-common all 4.19.98-1 [8,329 kB],
Get:5 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main amd64 wireguard-tools amd64 1.0.20200319-0ppa1~18.04 [88.2 kB],
Get:6 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main amd64 wireguard all 1.0.20200319-0ppa1~18.04 [7,980 B],
Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libasan5 amd64 8.4.0-1ubuntu1~18.04 [366 kB],
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libubsan1 amd64 8.4.0-1ubuntu1~18.04 [122 kB],
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgcc-8-dev amd64 8.4.0-1ubuntu1~18.04 [2,305 kB],
Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 gcc-8 amd64 8.4.0-1ubuntu1~18.04 [8,044 kB],
Get:11 http://deb.debian.org/debian buster/main amd64 linux-kbuild-4.19 amd64 4.19.98-1 [629 kB],
Get:12 http://deb.debian.org/debian buster/main amd64 linux-headers-4.19.0-8-amd64 amd64 4.19.98-1 [879 kB],
Fetched 28.6 MB in 4s (7,122 kB/s),
Selecting previously unselected package cpp-8.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 45886 files and directories currently installed.)
Preparing to unpack .../00-cpp-8_8.4.0-1ubuntu1~18.04_amd64.deb ...
Unpacking cpp-8 (8.4.0-1ubuntu1~18.04) ...
Selecting previously unselected package libasan5:amd64.
Preparing to unpack .../01-libasan5_8.4.0-1ubuntu1~18.04_amd64.deb ...
Unpacking libasan5:amd64 (8.4.0-1ubuntu1~18.04) ...
Selecting previously unselected package libubsan1:amd64.
Preparing to unpack .../02-libubsan1_8.4.0-1ubuntu1~18.04_amd64.deb ...
Unpacking libubsan1:amd64 (8.4.0-1ubuntu1~18.04) ...
Selecting previously unselected package libgcc-8-dev:amd64.
Preparing to unpack .../03-libgcc-8-dev_8.4.0-1ubuntu1~18.04_amd64.deb ...
Unpacking libgcc-8-dev:amd64 (8.4.0-1ubuntu1~18.04) ...
Selecting previously unselected package gcc-8.
Preparing to unpack .../04-gcc-8_8.4.0-1ubuntu1~18.04_amd64.deb ...
Unpacking gcc-8 (8.4.0-1ubuntu1~18.04) ...
Selecting previously unselected package linux-compiler-gcc-8-x86.
Preparing to unpack .../05-linux-compiler-gcc-8-x86_4.19.98-1_amd64.deb ...
Unpacking linux-compiler-gcc-8-x86 (4.19.98-1) ...
Selecting previously unselected package linux-headers-4.19.0-8-common.
Preparing to unpack .../06-linux-headers-4.19.0-8-common_4.19.98-1_all.deb ...
Unpacking linux-headers-4.19.0-8-common (4.19.98-1) ...
Selecting previously unselected package linux-kbuild-4.19.
Preparing to unpack .../07-linux-kbuild-4.19_4.19.98-1_amd64.deb ...
Unpacking linux-kbuild-4.19 (4.19.98-1) ...
Selecting previously unselected package linux-headers-4.19.0-8-amd64.
Preparing to unpack .../08-linux-headers-4.19.0-8-amd64_4.19.98-1_amd64.deb ...
Unpacking linux-headers-4.19.0-8-amd64 (4.19.98-1) ...
Selecting previously unselected package wireguard-dkms.
Preparing to unpack .../09-wireguard-dkms_1.0.20200413-0ubuntu2~18.04_all.deb ...
Unpacking wireguard-dkms (1.0.20200413-0ubuntu2~18.04) ...
Selecting previously unselected package wireguard-tools.
Preparing to unpack .../10-wireguard-tools_1.0.20200319-0ppa1~18.04_amd64.deb ...
Unpacking wireguard-tools (1.0.20200319-0ppa1~18.04) ...
Selecting previously unselected package wireguard.
Preparing to unpack .../11-wireguard_1.0.20200319-0ppa1~18.04_all.deb ...
Unpacking wireguard (1.0.20200319-0ppa1~18.04) ...
Setting up cpp-8 (8.4.0-1ubuntu1~18.04) ...
Setting up wireguard-dkms (1.0.20200413-0ubuntu2~18.04) ...
Loading new wireguard-1.0.20200413 DKMS files...
It is likely that 4.19.0-8-amd64 belongs to a chroot's host
Building for 4.19.0-8-amd64
Building initial module for 4.19.0-8-amd64
Error! Bad return status for module build on kernel: 4.19.0-8-amd64 (x86_64)
Consult /var/lib/dkms/wireguard/1.0.20200413/build/make.log for more information.
Setting up wireguard-tools (1.0.20200319-0ppa1~18.04) ...
Setting up linux-kbuild-4.19 (4.19.98-1) ...
Setting up wireguard (1.0.20200319-0ppa1~18.04) ...
Setting up linux-headers-4.19.0-8-common (4.19.98-1) ...
Setting up libasan5:amd64 (8.4.0-1ubuntu1~18.04) ...
Setting up libubsan1:amd64 (8.4.0-1ubuntu1~18.04) ...
Setting up libgcc-8-dev:amd64 (8.4.0-1ubuntu1~18.04) ...
Setting up gcc-8 (8.4.0-1ubuntu1~18.04) ...
Setting up linux-compiler-gcc-8-x86 (4.19.98-1) ...
Setting up linux-headers-4.19.0-8-amd64 (4.19.98-1) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 4.19.0-8-amd64
Kernel preparation unnecessary for this kernel.  Skipping...
Building module:
cleaning build area...
make -j4 KERNELRELEASE=4.19.0-8-amd64 -C /lib/modules/4.19.0-8-amd64/build M=/var/lib/dkms/wireguard/1.0.20200413/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.19.0-8-amd64 (x86_64)
Consult /var/lib/dkms/wireguard/1.0.20200413/build/make.log for more information.
   ...done.
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Client mode selected.
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing... 
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
.:53
CoreDNS-1.6.9
linux/amd64, go1.14.1, 1766568
[#] ip link add wg0 type wireguard
RTNETLINK answers: Operation not supported
Unable to access interface: Protocol not supported
[#] ip link delete dev wg0
Cannot find device "wg0"

Wireguard starts but QR codes do not work.

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.


Expected Behavior

docker container spins up and works normally and QR codes are functional.

Current Behavior

When I run docker compose up -d the logs show several problems. I'm not sure exactly what is wrong. When I scan the QR codes from the logs with my phone, my phone says: The scanned QR code is not a valid Wireguard configuration.

Steps to Reproduce

  1. Run docker-compose with the following docker-compose.yml

Environment

OS: Raspbian GNU/Linux 10 (buster)
CPU architecture: arm64
How docker service was installed:

Command used to create docker container (run/create/compose/screenshot)

wireguard:
    image: linuxserver/wireguard
    container_name: wireguard
    restart: always
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
        ### optional ###
      - SERVERURL=mydomainname.tld
      - SERVERPORT=51820
      - PEERS=2
      - PEERDNS=192.168.0.253 # pihole IP
      - INTERNAL_SUBNET=10.13.13.0 # default
    volumes:
      - ${USERDIR}/docker/wireguard:/config
      - /lib/modules:/lib/modules
    ports:
      - 51820:51820/udp
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing... 
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing... 

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \ 
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
WireGuard: https://www.wireguard.com/donations/

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    1000
User gid:    994
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing... 
Err:1 http://ports.ubuntu.com/ubuntu-ports bionic InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Err:2 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic InRelease
  Temporary failure resolving 'ppa.launchpad.net'
Err:3 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Err:4 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Err:5 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Reading package lists...
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-backports/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-security/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ppa.launchpad.net/wireguard/wireguard/ubuntu/dists/bionic/InRelease  Temporary failure resolving 'ppa.launchpad.net'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Raspbian kernel naming convention detected, attempting to install raspbian kernel headers
Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: no valid OpenPGP data found.
Err:1 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic InRelease
  Temporary failure resolving 'ppa.launchpad.net'
Err:2 http://archive.raspberrypi.org/debian buster InRelease
  Temporary failure resolving 'archive.raspberrypi.org'
Err:3 http://ports.ubuntu.com/ubuntu-ports bionic InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Err:4 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Err:5 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Err:6 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Reading package lists...
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-backports/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-security/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://archive.raspberrypi.org/debian/dists/buster/InRelease  Temporary failure resolving 'archive.raspberrypi.org'
W: Failed to fetch http://ppa.launchpad.net/wireguard/wireguard/ubuntu/dists/bionic/InRelease  Temporary failure resolving 'ppa.launchpad.net'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package raspberrypi-kernel-headers
E: Unable to locate package wireguard
Server mode is selected
External server address is set to mydomainname.tld
External server port is set to 51820. Make sure that port is properly forwarded to port 51820 inside this container
Internal subnet is set to 10.13.13.0
Peer DNS servers will be set to 192.168.0.253
Server mode is selected
Server related environment variables changed, regenerating 1 server and 2 peer/client confs
PEER 1 QR code:
█████████████████████████████████████████████████████████
█████████████████████████████████████████████████████████
████ ▄▄▄▄▄ █▀▄  ▀▄▄ ▄ ██ ▀▄▀▄█▄ ▀ █▀█ █▀█▀▀▀ █ ▄▄▄▄▄ ████
████ █   █ █▄▀▀▀▀ █ ▄▀▄ █▀  ▄▀█▄ ▀▄▄ ██ █▀█ ▄█ █   █ ████
████ █▄▄▄█ █ █ █ █   ▄▄▀█▄ ▄▄▄  ▀██   █▀ ▀▀███ █▄▄▄█ ████
████▄▄▄▄▄▄▄█ ▀ █▄█ █▄▀ ▀ ▀ █▄█ ▀ █▄▀▄█ ▀▄▀▄█▄█▄▄▄▄▄▄▄████
████▄▄▀▄▀█▄▄▀▄▄▀ ▄█▀▄  ▄ ▀ ▄   ▀ ▄▀▀█▀█▀ ▀ ▄█▀▄▄ █▄▄█████
████ ███▀▄▄█▀ █ █▀█▄█▄▀▀█ ██▄  ▀██▄▀  ▄ ▄▀ █▄█▄▀ ██▄ ████
████▀▀▀█▄█▄█▀█▀ █▄█   █▄▄   █▀▀▄▀▀▄██▄▄▀█▀▄ ▀▄▄▄ █▀▄ ████
█████▄  █▀▄█▄█▀▄ ▄▀ ▄██ █▀█▄▀▀▄▄█▄█ ▀█▄▄▄▄█▀▄▄█▀▄ ▀▀ ████
████▀██▄▄▀▄█ ▀ ▀▄ ▄   █▄▄▀█▄▀▄▄▄ ▀▀ ▀█ ▄ ▄▀▀█▀▀▀▄▄█ ▀████
████▀▀██▀▀▄█▄█▄▀▀▀▄▄ █▄▀▄  ▀▄▄██▄ ▀█  █▄▄▀ ▀▀▄█▄▄▄ ▀█████
████ ▄▄█  ▄ ▄  ▀ ███ ▄▄█▀ █▀█ ▄██▀▄▄▄   ██▄▀█▄▄██ █▀ ████
█████ ▄█ ▄▄▄ ▀ ▄██ █ ██▄█▄ ▄▄▄ ▀█ █▀ █▄▀ █ ▄ ▄▄▄ ▀▄ ▄████
█████▄   █▄█ █▄▀  █▀██▀ ▄  █▄█ ▀▄▄█▀ ██▀▀▀█▀ █▄█ ▀ █▀████
█████▀▀▀▄ ▄▄  ▄ ▄  ▀▄▀▀ ▀▄▄ ▄ ▄▀▄▀███▄▄█▄▄█    ▄ ██  ████
████ █▀▄█ ▄▄▀ ▄▄ ▀▀ █▄█  ▀▀█▄▀ ▄█▄ ▄▀▄▀▀ ▀ ▄▄▄ ▄█▀▄▄▄████
█████▀█▄█ ▄█▄▀▄▄▄█▄  █▀█▄▀▀ ███████▄▀  ██▀▄████▀█▄█▄ ████
████▄▄▄▄█ ▄▀▄▀█▄▄▀ ▀▀  ▄▀▄ ▄▀▀▀█ ▄██▀ ▀  █ ██▀▄▄█▄▄▄█████
█████▀█ █▄▄▀▀▄▄  ▄ ▀█▀▄▀ ▄█▀▄▀█▄▀ ▄ ▄▀ ▄▄█▀▀█  █ █▄█▀████
████ ▀▀█  ▄ ▀ ██ ▀▄█▄█▄█▀█▀█▀█▄█▀▄ ▀▄ ▄██ ▄█    ▄▀▀▄▄████
█████ ▀▀█▄▄▄▄██▄▀▄██▀ ▄▀█▀▄ █▄▄ ▄▄▄ █▀▄ ▄███▀▀▀██▀██▄████
████▄▄▄███▄▄   ██  ▄█▄▀ ▄█ ▄▄▄ ██▀█▄█▄▄█▀▄██ ▄▄▄ ▀█▄▄████
████ ▄▄▄▄▄ █▄▄▀██▄▀▄  ▀▀▄█ █▄█ ▄ █ ▀▄▄ ▄ ███ █▄█ ▄  ▀████
████ █   █ █▀▄ ▀▄ ▄ ▄▀█▀█▄  ▄ ▄███ █▄▄ ▄▀█▀▀▄ ▄  ▀██▄████
████ █▄▄▄█ █▀▄▄▄▄█▄ █▄▄▀▀▀█▄█▀▀██ ▄▄  █▀ ▄ ▄▀▀██▄▀▀█▄████
████▄▄▄▄▄▄▄█▄█▄▄▄▄▄█▄▄▄▄█▄█▄▄█▄███▄█▄▄██▄▄█▄▄███▄██▄▄████
█████████████████████████████████████████████████████████
█████████████████████████████████████████████████████████
PEER 2 QR code:
█████████████████████████████████████████████████████████
█████████████████████████████████████████████████████████
████ ▄▄▄▄▄ █▀▄ ▄▀▄▄ ▄ ██ ▀▄▀▄█▄ ▀ █▀█ █▀█▀▀▀ █ ▄▄▄▄▄ ████
████ █   █ █▄▀▀ ▀ █ ▄▀▄ █▀  ▄▀█▄ ▀▄▄ ██ █▀█ ▄█ █   █ ████
████ █▄▄▄█ █ █ █ █   ▄▄▀█▄ ▄▄▄  ▀██   █▀ ▀▀███ █▄▄▄█ ████
████▄▄▄▄▄▄▄█ ▀ █▄█ █▄▀ ▀ ▀ █▄█ ▀ █▄▀▄█ ▀▄▀▄█▄█▄▄▄▄▄▄▄████
████▄ ▀ ▀█▄▄▀ █▄ ▄█▀▄  ▄ ▀ ▄   ▀ ▄▀▀█▀█▀ ▀ ▄█▀▄▄ █▄▄█████
████ █ ▀█ ▄▀▀ █▀ ▀█▄█▄▀▀█ ██▄  ▀██▄▀  ▄ ▄▀ █▄█▄▀ ██▄ ████
████▀▀▀█  ▄█▀█▀ █▄█   █▄▄   █▀▀▄▀▀▄██▄▄▀█▀▄ ▀▄▄▄ █▀▄ ████
█████▀  ▄▀▄▄██ ▄ ▄▀ ▄██ █▀█▄▀▀▄▄█▄█ ▀█▄▄▄▄█▀▄▄█▀▄ ▀▀ ████
████▄█ ▄▄▀▄█ ▀▄▄█ ▄   █▄▄▀█▄▀▄▄▄ ▀▀ ▀█ ▄ ▄▀▀█▀▀▀▄▄█ ▀████
████▀▀█▀▀█▄█▄█▄█ ▀▄▄ █▄▀▄  ▀▄▄██▄ ▀█  █▄▄▀ ▀▀▄█▄▄▄ ▀█████
████ ▄▄█▀ ▄ █  ▀ ███ ▄▄█▀ █▀█ ▄██▀▄▄▄  ▀██▄▀█▄▄██ █▀ ████
████▀▀▄█ ▄▄▄ █▄▄██ █ ██▄█▄ ▄▄▄ ▀█ █▀ █▄▀ █ ▄ ▄▄▄ ▀▄ ▄████
██████▀▄ █▄█ ▄▀ █ █▀██▀ ▄  █▄█ ▀▄▄█▀ ██▀▀▀█▀ █▄█ ▀ █▀████
█████▀ ▀▄ ▄▄▄ ▄█▀  ▀▄▀▀ ▀▄▄ ▄ ▄▀▄▀███▄▄█▄▄█    ▄ ██  ████
████ █▀▄█ ▄▄▀ ▄▄ ▀▀ █▄█  ▀▀█▄▀ ▄█▄ ▄▀▄▀▀ ▀ ▄▄▄ ▄█▀▄▄▄████
████  █▄█ ▄█▄█▄▄▄█▄  █▀█▄▀▀ ███████▄▀  ██▀▄████▀█▄█▄ ████
████ █ ███▄▄▀ ▄█▀▀ ▀▀  ▄▀▄ ▄▀▀▀█ ▄██▀ ▀  █ ██▀▄▄█▄▄▄█████
█████▀████▄▀▀▄▄▀ ▄ ▀█▀▄▀ ▄█▀▄▀█▄▀ ▄ ▄▀ ▄▄█▀▀█  █ █▄█▀████
████ ▀▀█  ▄ ▀ ██ ▀▄█▄█▄█▀█▀█▀█▄█▀▄ ▀▄ ▄██ ▄█    ▄▀▀▄▄████
█████ ▀▀█▄▄▄▄██▄▀▄██▀ ▄▀█▀▄ █▄▄ ▄▄▄ █▀▄ ▄███▀▀▀██▀██▄████
████▄▄▄███▄▄▀▀▄██  ▄█▄▀ ▄█ ▄▄▄ ██▀█▄█▄▄█▀▄██ ▄▄▄ ▀█▄▄████
████ ▄▄▄▄▄ █▄▄▀██▄▀▄  ▀▀▄█ █▄█ ▄ █ ▀▄▄ ▄ ███ █▄█ ▄  ▀████
████ █   █ █▀▄ ▀▄ ▄ ▄▀█▀█▄  ▄ ▄███ █▄▄ ▄▀█▀▀▄ ▄  ▀██▄████
████ █▄▄▄█ █▀▀▄▄▄█▄ █▄▄▀▀▀█▄█▀▀██ ▄▄  █▀ ▄ ▄▀▀██▄▀▀█▄████
████▄▄▄▄▄▄▄█▄▄█▄▄▄▄█▄▄▄▄█▄█▄▄█▄███▄█▄▄██▄▄█▄▄███▄██▄▄████
█████████████████████████████████████████████████████████
█████████████████████████████████████████████████████████
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing... 
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
./run: line 10: wg-quick: command not found
[services.d] done.
.:53
CoreDNS-1.6.9
linux/arm, go1.14.1, 1766568

Can't get Client browse either the local network or the internet

linuxserver.io

Expected Behavior

Android phone connected to server successfully should be able to browse both local servers and the internet

Current Behavior

Client connects fine gets 10.13.13.2 as an address from wireguard.
Doesn't appear to get a gateway nor be able to browse across the network

Steps to Reproduce

  1. Fired up with defaults, but 5 peers.
  2. Opened the port on my firewall and forwarded it to the ip of the host
  3. Downloaded the android client
  4. Scanned the Q/R Code.
  5. Tried to browse the internet - Nothing
  6. Tried to browse local by ip - Nothing
  7. Used nettools to ping local by ip - nothing

Environment

Linux Ubuntu 19.10 Host
CPU architecture: x86_64
How docker service was installed:
apt install docker.io

Command used to create docker container (run/create/compose/screenshot)

version: "3.0"
services:
wireguard-server:
image: linuxserver/wireguard
container_name: wireguard-server
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- PUID=1002
- PGID=1002
- TZ=Americas/New_York
- SERVERURL=vpn.<redacted> #optional
- SERVERPORT=51820 #optional
- PEERS=5 #optional
- PEERDNS=<Internal IP Range>.1 #optional
- INTERNAL_SUBNET=10.13.13.0 #optional
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./config:/config
- /lib/modules:/lib/modules
ports:
- 51820:51820/udp
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
restart: always

Logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...


      _         ()
     | |  ___   _    __
     | | / __| | |  /  \ 
     | | \__ \ | | | () |
     |_| |___/ |_|  \__/

Brought to you by linuxserver.io

To support the app dev(s) visit:
WireGuard: https://www.wireguard.com/donations/

To support LSIO projects visit:
https://www.linuxserver.io/donate/

GID/UID

User uid: 1002
User gid: 1002

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
Get:1 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic InRelease [15.9 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:3 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main Sources [1,170 B]
Get:4 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main amd64 Packages [924 B]
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic/multiverse Sources [216 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic/universe Sources [11.5 MB]
Get:9 http://archive.ubuntu.com/ubuntu bionic/restricted Sources [5,823 B]
Get:10 http://archive.ubuntu.com/ubuntu bionic/main Sources [1,063 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1,344 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
Get:13 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/restricted Sources [8,069 B]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/universe Sources [368 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main Sources [403 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse Sources [6,197 B]
Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,371 kB]
Get:20 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [12.6 kB]
Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1,183 kB]
Get:22 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [59.0 kB]
Get:23 http://archive.ubuntu.com/ubuntu bionic-security/main Sources [187 kB]
Get:24 http://archive.ubuntu.com/ubuntu bionic-security/multiverse Sources [3,232 B]
Get:25 http://archive.ubuntu.com/ubuntu bionic-security/universe Sources [215 kB]
Get:26 http://archive.ubuntu.com/ubuntu bionic-security/restricted Sources [5,440 B]
Get:27 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages [889 kB]
Get:28 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [839 kB]
Get:29 http://archive.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [44.6 kB]
Get:30 http://archive.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [8,213 B]
Fetched 31.7 MB in 4s (8,438 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
linux-headers-5.3.0-46 wireguard-dkms wireguard-tools
The following NEW packages will be installed:
linux-headers-5.3.0-46 linux-headers-5.3.0-46-generic wireguard
wireguard-dkms wireguard-tools
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 12.6 MB of archives.
After this operation, 86.5 MB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main amd64 wireguard-dkms all 1.0.20200401-1ubuntu118.04 [253 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-headers-5.3.0-46 all 5.3.0-46.38
18.04.1 [11.0 MB]
Get:3 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main amd64 wireguard-tools amd64 1.0.20200319-0ppa118.04 [88.2 kB]
Get:4 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic/main amd64 wireguard all 1.0.20200319-0ppa1
18.04 [7,980 B]
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-headers-5.3.0-46-generic amd64 5.3.0-46.3818.04.1 [1,198 kB]
Fetched 12.6 MB in 2s (6,542 kB/s)
Selecting previously unselected package linux-headers-5.3.0-46.
(Reading database ... 45886 files and directories currently installed.)
Preparing to unpack .../linux-headers-5.3.0-46_5.3.0-46.38
18.04.1_all.deb ...
Unpacking linux-headers-5.3.0-46 (5.3.0-46.3818.04.1) ...
Selecting previously unselected package linux-headers-5.3.0-46-generic.
Preparing to unpack .../linux-headers-5.3.0-46-generic_5.3.0-46.38
18.04.1_amd64.deb ...
Unpacking linux-headers-5.3.0-46-generic (5.3.0-46.3818.04.1) ...
Selecting previously unselected package wireguard-dkms.
Preparing to unpack .../wireguard-dkms_1.0.20200401-1ubuntu1
18.04_all.deb ...
Unpacking wireguard-dkms (1.0.20200401-1ubuntu118.04) ...
Selecting previously unselected package wireguard-tools.
Preparing to unpack .../wireguard-tools_1.0.20200319-0ppa1
18.04_amd64.deb ...
Unpacking wireguard-tools (1.0.20200319-0ppa118.04) ...
Selecting previously unselected package wireguard.
Preparing to unpack .../wireguard_1.0.20200319-0ppa1
18.04_all.deb ...
Unpacking wireguard (1.0.20200319-0ppa118.04) ...
Setting up linux-headers-5.3.0-46 (5.3.0-46.38
18.04.1) ...
Setting up wireguard-dkms (1.0.20200401-1ubuntu1~18.04) ...
Loading new wireguard-1.0.20200401 DKMS files...
It is likely that 5.3.0-46-generic belongs to a chroot's host
Building for 5.3.0-18-generic and 5.3.0-46-generic
Module build for kernel 5.3.0-18-generic was skipped since the
kernel headers for this kernel does not seem to be installed.
Building initial module for 5.3.0-46-generic
Done.

wireguard:
Running module version sanity check.

Good news! Module version 1.0.20200401 for wireguard.ko
exactly matches what is already found in kernel 5.3.0-46-generic.
DKMS will not replace this module.
You may override by specifying --force.

depmod...

DKMS: install completed.
Setting up wireguard-tools (1.0.20200319-0ppa118.04) ...
Setting up wireguard (1.0.20200319-0ppa1
18.04) ...
Setting up linux-headers-5.3.0-46-generic (5.3.0-46.38~18.04.1) ...
/etc/kernel/header_postinst.d/dkms:

  • dkms: running auto installation service for kernel 5.3.0-46-generic
    ...done.
    Server mode is selected
    External server address is set to vpn.<redacted>
    External server port is set to 51820. Make sure that port is properly forwarded to port 51820 inside this container
    Internal subnet is set to 10.13.13.0
    Peer DNS servers will be set to <Internal IP Range>.1
    Server mode is selected
    Server related environment variables changed, regenerating 1 server and 5 peer/client confs
    PEER 1 QR code: (image)

PEER 2 QR code: (image)

PEER 3 QR code: (image)

PEER 4 QR code: (image)

PEER 5 QR code: (image)

[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
Warning: `/config/wg0.conf' is world accessible
.:53
CoreDNS-1.6.9
linux/amd64, go1.14.1, 1766568
[services.d] done.
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.13.13.1 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] ip -4 route add 10.13.13.6/32 dev wg0
[#] ip -4 route add 10.13.13.5/32 dev wg0
[#] ip -4 route add 10.13.13.4/32 dev wg0
[#] ip -4 route add 10.13.13.3/32 dev wg0
[#] ip -4 route add 10.13.13.2/32 dev wg0
[#] iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

51820 is exposed regardless of settings

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.


Expected Behavior

Setting the port in the - SERVERPORT=51821 #optional as well as the ports:
- 51821:51821/udp should result in the server listening on that port

Current Behavior

a78d1d056fc7 linuxserver/wireguard "/init" 2 minutes ago Up 2 minutes 51820/udp, 0.0.0.0:51821->51821/udp wireguard2 e47149b49b75 linuxserver/wireguard "/init" 43 minutes ago Up 43 minutes 0.0.0.0:51820->51820/udp wireguard
Server attempts to listen on the default port even if you tell it not to.

Steps to Reproduce

Create wireguard as instructed by documents
Create wireguard2 as instructed by documents, changing instances of 51820 to 51821

Attempt to connect to wireguard2 using the provided configs

Environment

OS: 20.04.01
CPU architecture: x86_64
How docker service was installed: docker-compose.yml

on the dockerfile on the last line, it says EXPOSE 51820/udp when it should probably be taking an arguement from the config or something

Command used to create docker container (run/create/compose/screenshot)

wireguard2: image: linuxserver/wireguard container_name: wireguard2 cap_add: - NET_ADMIN - SYS_MODULE environment: - PUID=1000 - PGID=1000 - TZ=America/Anchorage - SERVERURL= myurl.tld - SERVERPORT=51821 #optional - PEERS=2 #optional - PEERDNS=10.10.10.200 #optiol - INTERNAL_SUBNET=10.13.13.0 #optional volumes: - /config/wireguard2:/config - /lib/modules:/lib/modules ports: - 51821:51821/udp sysctls: - net.ipv4.conf.all.src_valid_mark=1 networks: app_net: ipv4_address: 10.10.10.222 restart: unless-stopped

wireguard: image: linuxserver/wireguard container_name: wireguard cap_add: - NET_ADMIN - SYS_MODULE environment: - PUID=1000 - PGID=1000 - TZ=America/Anchorage - SERVERURL=myhost.tld #optional - SERVERPORT=51820 #optional - PEERS=2 #optional - PEERDNS=10.10.10.200 #optiol - INTERNAL_SUBNET=10.13.13.0 #optional volumes: - /config/wireguard:/config - /lib/modules:/lib/modules ports: - 51820:51820/udp sysctls: - net.ipv4.conf.all.src_valid_mark=1 networks: app_net: ipv4_address: 10.10.10.221 restart: unless-stopped

Docker logs

@omnibus:/config/wireguard2$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES a78d1d056fc7 linuxserver/wireguard "/init" 2 minutes ago Up 2 minutes 51820/udp, 0.0.0.0:51821->51821/udp wireguard2 e47149b49b75 linuxserver/wireguard "/init" 43 minutes ago Up 43 minutes 0.0.0.0:51820->51820/udp wireguard

Inodes exhausting

Expected Behavior

docker start should start the container

Current Behavior

container downloads tons of kernel headers and tries to unpack it so all inodes are exhausted

Steps to Reproduce

docker create \
  --name=wireguard \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  -e PUID=0 \
  -e PGID=0 \
  -e TZ=Asia/Yekaterinburg \
  -e SERVERURL=<ServerIP> \
  -e SERVERPORT=51820 \
  -e PEERS=3 \
  -e PEERDNS=auto \
  -e INTERNAL_SUBNET=10.13.13.0 \
  -p 51820:51820/udp \
  -v /root/.config/wireguard:/config \
  -v /lib/modules:/lib/modules \
  --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
  --restart unless-stopped \
  linuxserver/wireguard

docker start wireguard

docker exec -it wireguard /bin/bash

root@7c882bc80701:/# ls -l /usr/src/
total 384
drwxr-xr-x 25 root root 4096 Jun  6 15:57 linux-azure-4.15-headers-4.15.0-1082
drwxr-xr-x 25 root root 4096 Jun  6 15:57 linux-azure-4.15-headers-4.15.0-1083
drwxr-xr-x 27 root root 4096 Jun  6 15:57 linux-azure-headers-4.15.0-1009
drwxr-xr-x 27 root root 4096 Jun  6 15:57 linux-azure-headers-4.15.0-1012
drwxr-xr-x 27 root root 4096 Jun  6 15:57 linux-azure-headers-4.15.0-1013
drwxr-xr-x 27 root root 4096 Jun  6 15:58 linux-azure-headers-4.15.0-1014
drwxr-xr-x 27 root root 4096 Jun  6 15:58 linux-azure-headers-4.15.0-1018
drwxr-xr-x 27 root root 4096 Jun  6 15:58 linux-azure-headers-4.15.0-1019
drwxr-xr-x 27 root root 4096 Jun  6 15:58 linux-azure-headers-4.15.0-1021
drwxr-xr-x 27 root root 4096 Jun  6 15:58 linux-azure-headers-4.15.0-1022
drwxr-xr-x 27 root root 4096 Jun  6 15:58 linux-azure-headers-4.15.0-1023
drwxr-xr-x 27 root root 4096 Jun  6 15:59 linux-azure-headers-4.15.0-1025
drwxr-xr-x 27 root root 4096 Jun  6 15:59 linux-azure-headers-4.15.0-1028
drwxr-xr-x 27 root root 4096 Jun  6 15:59 linux-azure-headers-4.15.0-1030
drwxr-xr-x 27 root root 4096 Jun  6 15:59 linux-azure-headers-4.15.0-1031
drwxr-xr-x 27 root root 4096 Jun  6 15:59 linux-azure-headers-4.15.0-1032
drwxr-xr-x 27 root root 4096 Jun  6 15:59 linux-azure-headers-4.15.0-1035
drwxr-xr-x 27 root root 4096 Jun  6 15:59 linux-azure-headers-4.15.0-1036
drwxr-xr-x 27 root root 4096 Jun  6 15:59 linux-azure-headers-4.15.0-1037
drwxr-xr-x 25 root root 4096 Jun  6 16:00 linux-gcp-4.15-headers-4.15.0-1071
drwxr-xr-x 27 root root 4096 Jun  6 16:00 linux-gcp-headers-4.15.0-1006
drwxr-xr-x 27 root root 4096 Jun  6 16:00 linux-gcp-headers-4.15.0-1008
drwxr-xr-x 27 root root 4096 Jun  6 16:00 linux-gcp-headers-4.15.0-1009
drwxr-xr-x 27 root root 4096 Jun  6 16:00 linux-gcp-headers-4.15.0-1010
drwxr-xr-x 27 root root 4096 Jun  6 16:00 linux-gcp-headers-4.15.0-1014
drwxr-xr-x 27 root root 4096 Jun  6 16:00 linux-gcp-headers-4.15.0-1015
drwxr-xr-x 27 root root 4096 Jun  6 16:01 linux-gcp-headers-4.15.0-1017
drwxr-xr-x 27 root root 4096 Jun  6 16:01 linux-gcp-headers-4.15.0-1018
drwxr-xr-x 27 root root 4096 Jun  6 16:01 linux-gcp-headers-4.15.0-1019
drwxr-xr-x 27 root root 4096 Jun  6 16:01 linux-gcp-headers-4.15.0-1021
drwxr-xr-x 27 root root 4096 Jun  6 16:01 linux-gcp-headers-4.15.0-1023
drwxr-xr-x 27 root root 4096 Jun  6 16:01 linux-gcp-headers-4.15.0-1024
drwxr-xr-x 27 root root 4096 Jun  6 16:02 linux-gcp-headers-4.15.0-1025
drwxr-xr-x 27 root root 4096 Jun  6 16:02 linux-gcp-headers-4.15.0-1026
drwxr-xr-x 27 root root 4096 Jun  6 16:02 linux-gcp-headers-4.15.0-1027
drwxr-xr-x 27 root root 4096 Jun  6 16:02 linux-gcp-headers-4.15.0-1028
drwxr-xr-x 27 root root 4096 Jun  6 16:02 linux-gcp-headers-4.15.0-1029
drwxr-xr-x 27 root root 4096 Jun  6 16:02 linux-gcp-headers-4.15.0-1030
drwxr-xr-x 27 root root 4096 Jun  6 16:02 linux-gcp-headers-4.15.0-1032
drwxr-xr-x 27 root root 4096 Jun  6 16:03 linux-gcp-headers-4.15.0-1033
drwxr-xr-x 27 root root 4096 Jun  6 16:03 linux-gcp-headers-4.15.0-1034
drwxr-xr-x 27 root root 4096 Jun  6 16:03 linux-gcp-headers-4.15.0-1036
drwxr-xr-x 27 root root 4096 Jun  6 16:03 linux-gcp-headers-4.15.0-1037
drwxr-xr-x 25 root root 4096 Jun  6 16:03 linux-gcp-headers-4.15.0-1040
drwxr-xr-x 25 root root 4096 Jun  6 16:03 linux-gcp-headers-4.15.0-1042
drwxr-xr-x 25 root root 4096 Jun  6 16:03 linux-gcp-headers-4.15.0-1044
drwxr-xr-x 27 root root 4096 Jun  6 16:04 linux-gke-4.15-headers-4.15.0-1030
drwxr-xr-x 27 root root 4096 Jun  6 16:04 linux-gke-4.15-headers-4.15.0-1032
drwxr-xr-x 27 root root 4096 Jun  6 16:04 linux-gke-4.15-headers-4.15.0-1033
drwxr-xr-x 27 root root 4096 Jun  6 16:04 linux-gke-4.15-headers-4.15.0-1034
drwxr-xr-x 27 root root 4096 Jun  6 16:04 linux-gke-4.15-headers-4.15.0-1036
drwxr-xr-x 27 root root 4096 Jun  6 16:04 linux-gke-4.15-headers-4.15.0-1037
drwxr-xr-x 25 root root 4096 Jun  6 16:05 linux-gke-4.15-headers-4.15.0-1040
drwxr-xr-x 25 root root 4096 Jun  6 16:05 linux-gke-4.15-headers-4.15.0-1041
drwxr-xr-x 25 root root 4096 Jun  6 16:05 linux-gke-4.15-headers-4.15.0-1042
drwxr-xr-x 25 root root 4096 Jun  6 16:05 linux-gke-4.15-headers-4.15.0-1044
drwxr-xr-x 25 root root 4096 Jun  6 16:05 linux-gke-4.15-headers-4.15.0-1045
drwxr-xr-x 25 root root 4096 Jun  6 16:05 linux-gke-4.15-headers-4.15.0-1046
drwxr-xr-x 25 root root 4096 Jun  6 16:06 linux-gke-4.15-headers-4.15.0-1048
drwxr-xr-x 25 root root 4096 Jun  6 16:06 linux-gke-4.15-headers-4.15.0-1049
drwxr-xr-x 25 root root 4096 Jun  6 16:06 linux-gke-4.15-headers-4.15.0-1050
drwxr-xr-x 25 root root 4096 Jun  6 16:06 linux-gke-4.15-headers-4.15.0-1052
drwxr-xr-x 25 root root 4096 Jun  6 16:06 linux-gke-4.15-headers-4.15.0-1055
drwxr-xr-x 25 root root 4096 Jun  6 16:07 linux-gke-4.15-headers-4.15.0-1057
drwxr-xr-x 25 root root 4096 Jun  6 16:07 linux-gke-4.15-headers-4.15.0-1058
drwxr-xr-x 25 root root 4096 Jun  6 16:07 linux-gke-4.15-headers-4.15.0-1059
drwxr-xr-x  8 root root 4096 Jun  6 14:32 linux-headers-4.15.0-1004-oem
drwxr-xr-x  8 root root 4096 Jun  6 16:07 linux-headers-4.15.0-1006-gcp
drwxr-xr-x  8 root root 4096 Jun  6 16:08 linux-headers-4.15.0-1006-oem
drwxr-xr-x  8 root root 4096 Jun  6 16:08 linux-headers-4.15.0-1007-aws
drwxr-xr-x  8 root root 4096 Jun  6 16:08 linux-headers-4.15.0-1007-oracle
drwxr-xr-x  8 root root 4096 Jun  6 16:08 linux-headers-4.15.0-1008-gcp
drwxr-xr-x  8 root root 4096 Jun  6 16:08 linux-headers-4.15.0-1008-kvm
drwxr-xr-x  8 root root 4096 Jun  6 16:09 linux-headers-4.15.0-1008-oem
drwxr-xr-x  8 root root 4096 Jun  6 16:28 linux-headers-4.15.0-1008-oracle
drwxr-xr-x  8 root root 4096 Jun  6 16:28 linux-headers-4.15.0-1009-aws
drwxr-xr-x  8 root root 4096 Jun  6 16:28 linux-headers-4.15.0-1009-azure
drwxr-xr-x  8 root root 4096 Jun  6 16:28 linux-headers-4.15.0-1009-gcp
drwxr-xr-x  8 root root 4096 Jun  6 16:29 linux-headers-4.15.0-1009-oem
drwxr-xr-x  8 root root 4096 Jun  6 16:29 linux-headers-4.15.0-1009-oracle
drwxr-xr-x 25 root root 4096 May 30 00:21 linux-headers-4.15.0-101
drwxr-xr-x  8 root root 4096 Jun  6 16:29 linux-headers-4.15.0-1010-aws
drwxr-xr-x  8 root root 4096 Jun  6 16:29 linux-headers-4.15.0-1010-gcp
drwxr-xr-x  8 root root 4096 Jun  6 16:29 linux-headers-4.15.0-1010-kvm
drwxr-xr-x  8 root root 4096 May 30 00:21 linux-headers-4.15.0-101-generic
drwxr-xr-x  8 root root 4096 Jun  6 16:29 linux-headers-4.15.0-101-lowlatency
drwxr-xr-x 27 root root 4096 Jun  6 16:08 linux-kvm-headers-4.15.0-1008
drwxr-xr-x 27 root root 4096 Jun  6 16:29 linux-kvm-headers-4.15.0-1010
drwxr-xr-x 27 root root 4096 Jun  6 15:42 linux-oem-headers-4.15.0-1004
drwxr-xr-x 27 root root 4096 Jun  6 16:08 linux-oem-headers-4.15.0-1006
drwxr-xr-x 27 root root 4096 Jun  6 16:09 linux-oem-headers-4.15.0-1008
drwxr-xr-x 27 root root 4096 Jun  6 16:29 linux-oem-headers-4.15.0-1009
drwxr-xr-x 27 root root 4096 Jun  6 16:08 linux-oracle-headers-4.15.0-1007
drwxr-xr-x 27 root root 4096 Jun  6 16:09 linux-oracle-headers-4.15.0-1008
drwxr-xr-x 27 root root 4096 Jun  6 16:29 linux-oracle-headers-4.15.0-1009
drwxr-xr-x 27 root root 4096 Jun  6 16:29 linux-oracle-headers-4.15.0-1010

docker logs -f wireguard
dpkg: error processing archive /tmp/apt-dpkg-install-aGVFZI/154-linux-oem-headers-4.15.0-1015_4.15.0-1015.18_all.deb (--unpack):
 unable to create '/usr/src/linux-oem-headers-4.15.0-1015/arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/reg_map_asm.h.dpkg-new' (while processing './usr/src/linux-oem-headers-4.15.0-1015/arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/reg_map_asm.h'): No space left on device
dpkg: too many errors, stopping
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)

root@linux:~# df -i
Filesystem         Inodes   IUsed  IFree IUse% Mounted on
/dev/ploop54112p1 1966080 1964744   1336  100% /
none               131072      17 131055    1% /sys/fs/cgroup
none               131072      75 130997    1% /dev
tmpfs              131072       1 131071    1% /dev/shm
tmpfs              131072     220 130852    1% /run
tmpfs              131072       3 131069    1% /run/lock
none               131072       1 131071    1% /run/shm
overlay           1966080 1964744   1336  100% /var/lib/docker/overlay2/6f5b67c2ed4507382975ac023103f1f79e69432d8dc9ba165bc6435778f6d824/merged

root@linux:~# df -h
Filesystem         Size  Used Avail Use% Mounted on
/dev/ploop54112p1   30G   13G   16G  45% /
none               512M     0  512M   0% /sys/fs/cgroup
none               512M     0  512M   0% /dev
tmpfs              512M     0  512M   0% /dev/shm
tmpfs              512M  1.2M  511M   1% /run
tmpfs              5.0M     0  5.0M   0% /run/lock
none               512M     0  512M   0% /run/shm
overlay             30G   13G   16G  45% /var/lib/docker/overlay2/6f5b67c2ed4507382975ac023103f1f79e69432d8dc9ba165bc6435778f6d824/merged

Environment

OS: Ubuntu 18.04.4 LTS
CPU architecture: x86_64
How docker service was installed:
from official PPA

Debian 10. RTNETLINK answers: Operation not supported

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.


Expected Behavior

Current Behavior

Docker container errors during start

Steps to Reproduce

  1. Create docker-compose.yaml
  wireguard:
    image: linuxserver/wireguard
    container_name: wireguard
    ports:
      - 52820:51820/udp
    volumes:
      - ./wireguard:/config
      - /lib/modules:/lib/modules
    environment:
      - TZ=Europe/Moscow
      - PUID=1000
      - PGID=1000
      - SERVERURL=[redacted]
      - SERVERPORT=52820
      - PEERS=3
      - PEERDNS=auto
      - INTERNAL_SUBNET=10.14.14.0
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    restart: unless-stopped
  1. Run docker-compose up -d

  2. Run docker logs -f wireguard

  3. I get errors

wireguard    | /etc/kernel/header_postinst.d/dkms:
wireguard    |  * dkms: running auto installation service for kernel 4.19.0-9-amd64
wireguard    |    ...done.
wireguard    | Setting up libdevmapper1.02.1:amd64 (2:1.02.155-3) ...
wireguard    | Setting up grub-common (2.02+dfsg1-20) ...
wireguard    | Setting up dmsetup (2:1.02.155-3) ...
wireguard    | Setting up grub-pc-bin (2.02+dfsg1-20) ...
wireguard    | Setting up grub2-common (2.02+dfsg1-20) ...
wireguard    | Setting up os-prober (1.77) ...
wireguard    | Setting up grub-pc (2.02+dfsg1-20) ...
wireguard    |
wireguard    | Creating config file /etc/default/grub with new version
wireguard    | grub-probe: error: failed to get canonical path of `overlay'.
wireguard    | grub-probe: error: failed to get canonical path of `overlay'.
wireguard    | grub-probe: error: failed to get canonical path of `overlay'.
wireguard    | Processing triggers for libc-bin (2.28-10) ...
wireguard    | Processing triggers for linux-image-5.3.0-1026-gke (5.3.0-1026.28~18.04.1) ...
wireguard    | /etc/kernel/postinst.d/dkms:
wireguard    |  * dkms: running auto installation service for kernel 5.3.0-1026-gke
wireguard    |    ...done.
wireguard    | Server mode is selected
wireguard    | External server address is set to DomainName
wireguard    | External server port is set to 52820. Make sure that port is properly forwarded to port 51820 inside this container
wireguard    | Internal subnet is set to 10.14.14.0
wireguard    | PEERDNS var is either not set or is set to "auto", setting peer DNS to 10.14.14.1 to use wireguard docker host's DNS.
wireguard    | No found wg0.conf found (maybe an initial install), generating 1 server and 3 peer/client confs
wireguard    | PEER 1 QR code:
wireguard    | [cont-init.d] 30-config: exited 0.
wireguard    | [cont-init.d] 99-custom-scripts: executing...
wireguard    | [custom-init] no custom files found exiting...
wireguard    | [cont-init.d] 99-custom-scripts: exited 0.
wireguard    | [cont-init.d] done.
wireguard    | [services.d] starting services
wireguard    | [services.d] done.
wireguard    | [#] ip link add wg0 type wireguard
wireguard    | RTNETLINK answers: Operation not supported
wireguard    | Unable to access interface: Protocol not supported
wireguard    | [#] ip link delete dev wg0
wireguard    | Cannot find device "wg0"
wireguard    | .:53
wireguard    | CoreDNS-1.6.9
wireguard    | linux/amd64, go1.14.1, 1766568

Environment

OS:
CPU architecture: x86_64/arm32/arm64
How docker service was installed:

uname -a
Linux docker-2 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux

docker -v
Docker version 19.03.11, build 42e35e61f3

Command used to create docker container (run/create/compose/screenshot)

As above

Docker logs

As above

Unclear how to disable CoreDNS

Expected Behavior

When in client mode, the CoreDNS instance may not be necessary, or even obstructive, e.g. when using --network host. The latter might be necessary when using IPv6.

Current Behavior

Starting the container in host networking mode works fine, and IPv6 also works as expected. However the container starts a CoreDNS instance on port 53, which – in this networking mode – is the host port.

In the most cases when run as client, it is not necessary to run a DNS server. As it uses port 53, there might even be conflicts with other services on the host.

Steps to Reproduce

  1. Use the container in client mode with --network host

Environment

OS: Linuxx
CPU architecture: arm32
How docker service was installed: Debian docker.io packages

Command used to create docker container (run/create/compose/screenshot)

version: "2.1"
services:
  wireguard:
    image: linuxserver/wireguard
    container_name: wireguard
    network_mode: host
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
    volumes:
      - ./config:/config
      - /lib/modules:/lib/modules
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    restart: unless-stopped

… where ./config/wg0.conf is an existing and working WireGuard client configuration.

IPv6 Support

Is there any plan for adding IPv6 support to this in addition to the current IPv4?

Wireguard not working under Proxmox kernel

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.

Wireguard not starting under Proxmox kernel under Docker container for OpenMediaVault 5.

Expected Behavior

Wireguard should be running on configured port.

Current Behavior

[#] ip link add wg0 type wireguard,
Error: Unknown device type.,
Unable to access interface: Protocol not supported,
[#] ip link delete dev wg0,
Cannot find device "wg0",

Steps to Reproduce

  1. Install Proxmox kernel via http://omv-extras.org/
  2. Install Docker via http://omv-extras.org/
  3. Run docker command listed below.

Environment

OS: Linux 5.3.13-3-pve
CPU architecture: arm64
How docker service was installed:

http://omv-extras.org/

Command used to create docker container (run/create/compose/screenshot)

docker create \
  --name=wireguard \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=America/Chicago \
  -e SERVERURL=<EXTERNAL_IP_CHANGED_FOR_SECURITY> `#optional` \
  -e SERVERPORT=51820 `#optional` \
  -e PEERS=1 `#optional` \
  -e PEERDNS=auto `#optional` \
  -e INTERNAL_SUBNET=10.13.13.0 `#optional` \
  -p 51820:51820/udp \
  -v /path/to/appdata/config:/config \
  -v /lib/modules:/lib/modules \
  --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
  --restart unless-stopped \
  linuxserver/wireguard

Docker logs

Internal subnet is set to 10.13.13.0,
PEERDNS var is either not set or is set to "auto", setting peer DNS to 10.13.13.1 to use wireguard docker host's DNS.,
Server mode is selected,
No changes to parameters. Existing configs are used.,
[cont-init.d] 30-config: exited 0.,
[cont-init.d] 99-custom-scripts: executing... ,
[custom-init] no custom files found exiting...,
[cont-init.d] 99-custom-scripts: exited 0.,
[cont-init.d] done.,
[services.d] starting services,
[services.d] done.,
Warning: `/config/wg0.conf' is world accessible,
.:53,
CoreDNS-1.6.9,
linux/amd64, go1.14.1, 1766568,
[#] ip link add wg0 type wireguard,
Error: Unknown device type.,
Unable to access interface: Protocol not supported,
[#] ip link delete dev wg0,
Cannot find device "wg0",
[INFO] SIGTERM: Shutting down servers then terminating,
Caught SIGTERM signal!,
[cont-finish.d] executing container finish scripts...,
[cont-finish.d] done.,
[s6-finish] waiting for services.,
Warning: `/config/wg0.conf' is world accessible,
wg-quick: `wg0' is not a WireGuard interface,
[s6-finish] sending all processes the TERM signal.,
[s6-finish] sending all processes the KILL signal and exiting.,
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.,
[s6-init] ensuring user provided files have correct perms...exited 0.,
[fix-attrs.d] applying ownership & permissions fixes...,
[fix-attrs.d] done.,
[cont-init.d] executing container initialization scripts...,
[cont-init.d] 01-envfile: executing... ,
[cont-init.d] 01-envfile: exited 0.,
[cont-init.d] 10-adduser: executing... ,
usermod: no changes,
,
-------------------------------------,
          _         (),
         | |  ___   _    __,
         | | / __| | |  /  \ ,
         | | \__ \ | | | () |,
         |_| |___/ |_|  \__/,
,
,
Brought to you by linuxserver.io,
-------------------------------------,
,
To support the app dev(s) visit:,
WireGuard: https://www.wireguard.com/donations/,
,
To support LSIO projects visit:,
https://www.linuxserver.io/donate/,
-------------------------------------,
GID/UID,
-------------------------------------,
,
User uid:    1000,
User gid:    1000,
-------------------------------------,
,
[cont-init.d] 10-adduser: exited 0.,
[cont-init.d] 30-config: executing... ,
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease,
Hit:2 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic InRelease,
Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease,
Hit:4 http://archive.ubuntu.com/ubuntu bionic-security InRelease,
Hit:5 http://download.proxmox.com/debian/pve buster InRelease,
Reading package lists...,
No kernel headers found in the Ubuntu or Debian repos!! Will try the headers from host (if mapped), may or may not work,
Reading package lists...,
Building dependency tree...,
Reading state information...,
wireguard is already the newest version (1.0.20200319-1ubuntu1~18.04).,
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.,
Server mode is selected,
External server address is set to <EXTERNAL_IP_CHANGED_FOR_SECURITY>,
External server port is set to 51820. Make sure that port is properly forwarded to port 51820 inside this container,
Internal subnet is set to 10.13.13.0,
PEERDNS var is either not set or is set to "auto", setting peer DNS to 10.13.13.1 to use wireguard docker host's DNS.,
Server mode is selected,
No changes to parameters. Existing configs are used.,
[cont-init.d] 30-config: exited 0.,
[cont-init.d] 99-custom-scripts: executing... ,
[custom-init] no custom files found exiting...,
[cont-init.d] 99-custom-scripts: exited 0.,
[cont-init.d] done.,
[services.d] starting services,
[services.d] done.,
Warning: `/config/wg0.conf' is world accessible,
.:53,
CoreDNS-1.6.9,
linux/amd64, go1.14.1, 1766568,
[#] ip link add wg0 type wireguard,
Error: Unknown device type.,
Unable to access interface: Protocol not supported,
[#] ip link delete dev wg0,
Cannot find device "wg0",

RTNETLINK answers: Operation not supported && Cannot find device "wg0"

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.


Expected Behavior

Docker container loads correctly

Current Behavior

Docker container errors during start

Steps to Reproduce

  1. Create docker-compose.yaml with the following contents
---
version: "2.1"
services:
  wireguard:
    image: linuxserver/wireguard
    container_name: wireguard
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
   #  - SERVERURL=[redacted] #optional
      - SERVERPORT=51820 #optional
      - PEERS=1 #optional
   #  - PEERDNS=auto #optional
   #  - INTERNAL_SUBNET=10.13.13.0 #optional
    volumes:
      - /home/ubuntu/wireguard/config:/config
      - /lib/modules:/lib/modules
    ports:
      - 51820:51820/udp
      - 51820:51820/tcp
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
      - net.ipv6.conf.all.disable_ipv6=0
    restart: unless-stopped
  1. Run docker-compose up -d
  2. Run docker logs -f wireguard
  3. Observe the following errors
wireguard is already the newest version (1.0.20200513-1~18.04).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Server mode is selected
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    12  100    12    0     0     85      0 --:--:-- --:--:-- --:--:--    85
SERVERURL var is either not set or is set to "auto", setting external IP to auto detected value of [redacted]
External server port is set to 51820. Make sure that port is properly forwarded to port 51820 inside this container
Internal subnet is set to 10.13.13.0
PEERDNS var is either not set or is set to "auto", setting peer DNS to 10.13.13.1 to use wireguard docker host's DNS.
Server mode is selected
No changes to parameters. Existing configs are used.
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
.:53
CoreDNS-1.6.9
linux/amd64, go1.14.1, 1766568
[#] ip link add wg0 type wireguard
RTNETLINK answers: Operation not supported
Unable to access interface: Protocol not supported
[#] ip link delete dev wg0
Cannot find device "wg0"

Environment

OS: Ubuntu server 18.04
CPU architecture: x86_64
How docker service was installed:
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04

Command used to create docker container (run/create/compose/screenshot)

As above

Docker logs

As above.

Wg0.conf unwanted overwrite

Expected Behavior

Wg0.conf should not be updated on container image update/pull and restart

Current Behavior

Upgrade to latest yesterday. Wg0.conf was updated and my PresharedKey line was removed. Client failed to connect.

Restored from backup to regain function. Config folder is a bind mount for persistence.

Log not available as I'm posting this late (sorry)

May need a check to see if it's native code updating wg0.conf or a boot script?

Container exiting with code 128 on server reboot

linuxserver.io


Expected Behavior

Container should be running on reboot

Current Behavior

I am using this container with restart: always, and it always exits on server reboot. I think the error comes from the network not yet being available when the container is started up again, but it does not EVER try to restart. I have to bring it back up manually every time I reboot. I can bring it back up with docker-compose up or by restarting the docker daemon.

Steps to Reproduce

1.Have container running with restart: always or unless-stopped
2.Restart machine
3.docker-compose ps

Environment

OS: Ubuntu Server 18.04
CPU architecture: x86_64
How docker service was installed: Official docker repo

Command used to create docker container (run/create/compose/screenshot)

docker-compose up

services:
  vpn:
    image: linuxserver/wireguard
    container_name: vpn
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
     # - SERVERURL=wireguard.domain.com #optional
     # - SERVERPORT=51820 #optional
     # - INTERNAL_SUBNET=10.13.13.0 #optional
      - ALLOWEDIPS=0.0.0.0/24 #optional
    volumes:
      - ${ROOT}/config/vpn:/config
      - /lib/modules:/lib/modules
    ports:
      - 9091:9091 # port for transmission web UI to be reachable from local network
      - 51820:51820/udp
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    restart: always

Docker logs


vpn            |
vpn            | -------------------------------------
vpn            |           _         ()
vpn            |          | |  ___   _    __
vpn            |          | | / __| | |  /  \
vpn            |          | | \__ \ | | | () |
vpn            |          |_| |___/ |_|  \__/
vpn            |
vpn            |
vpn            | Brought to you by linuxserver.io
vpn            | -------------------------------------
vpn            |
vpn            | To support the app dev(s) visit:
vpn            | WireGuard: https://www.wireguard.com/donations/
vpn            |
vpn            | To support LSIO projects visit:
vpn            | https://www.linuxserver.io/donate/
vpn            | -------------------------------------
vpn            | GID/UID
vpn            | -------------------------------------
vpn            |
vpn            | User uid:    1000
vpn            | User gid:    1000
vpn            | -------------------------------------
vpn            |
vpn            | [cont-init.d] 10-adduser: exited 0.
vpn            | [cont-init.d] 30-config: executing...
vpn            | Uname info: Linux 8c0bb1a30ea2 4.4.0-176-generic #206-Ubuntu SMP Fri Feb 28 05:02:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
vpn            | **** It seems the wireguard module is already active. Skipping kernel header install and module compilation. ****
vpn            | **** Client mode selected.
vpn            | [cont-init.d] 30-config: exited 0.
vpn            | [cont-init.d] 99-custom-scripts: executing...
vpn            | [custom-init] no custom files found exiting...
vpn            | [cont-init.d] 99-custom-scripts: exited 0.
vpn            | [cont-init.d] done.
vpn            | [services.d] starting services
vpn            | [services.d] done.
vpn            | Warning: `/config/wg0.conf' is world accessible
vpn            | [#] ip link add wg0 type wireguard
vpn            | [#] wg setconf wg0 /dev/fd/63
vpn            | [#] ip -4 address add 10.11.4.252/16 dev wg0
vpn            | [#] ip link set mtu 1420 up dev wg0
vpn            | [#] resolvconf -a wg0 -m 0 -x
vpn            | [#] wg set wg0 fwmark 51820
vpn            | [#] ip -6 route add ::/0 dev wg0 table 51820
vpn            | [#] ip -6 rule add not fwmark 51820 table 51820
vpn            | [#] ip -6 rule add table main suppress_prefixlength 0
vpn            | [#] ip6tables-restore -n
vpn            | [#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
vpn            | [#] ip -4 rule add not fwmark 51820 table 51820
vpn            | [#] ip -4 rule add table main suppress_prefixlength 0
vpn            | [#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
vpn            | sysctl: setting key "net.ipv4.conf.all.src_valid_mark": Read-only file system
vpn            | [#] iptables-restore -n
vpn            | [#] DROUTE=$(ip route | grep default | awk '{print $3}'); HOMENET=192.168.0.0/16; HOMENET2=10.0.0.0/8; HOMENET3=172.16.0.0/12; ip route add $HOMENET3 via $DROUTE;ip route add $HOMENET2 via $DROUTE; ip route add $HOMENET via $DROUTE;iptables -I OUTPUT -d $HOMENET -j ACCEPT;iptables -A OUTPUT -d $HOMENET2 -j ACCEPT; iptables -A OUTPUT -d $HOMENET3 -j ACCEPT;  iptables -A OUTPUT ! -o wg0 -m mark ! --mark $(wg show wg0 fwmark) -m addrtype ! --dst-type LOCAL -j REJECT
vpn            | .:53
vpn            | CoreDNS-1.7.1
vpn            | linux/amd64, go1.15.2, aa82ca6
vpn            | Caught SIGTERM signal!
vpn            | [INFO] SIGTERM: Shutting down servers then terminating
vpn            | [cont-finish.d] executing container finish scripts...
vpn            | [cont-finish.d] done.
vpn            | [s6-finish] waiting for services.
vpn            | Warning: `/config/wg0.conf' is world accessible
vpn            | [#] HOMENET=192.168.0.0/16; HOMENET2=10.0.0.0/8; HOMENET3=172.16.0.0/12; ip route del $HOMENET3 via $DROUTE;ip route del $HOMENET2 via $DROUTE; ip route del $HOMENET via $DROUTE; iptables -D OUTPUT ! -o wg0 -m mark ! --mark $(wg show wg0 fwmark) -m addrtype ! --dst-type LOCAL -j REJECT; iptables -D OUTPUT -d $HOMENET -j ACCEPT; iptables -D OUTPUT -d $HOMENET2 -j ACCEPT; iptables -D OUTPUT -d $HOMENET3 -j ACCEPT
vpn            | Command line is not complete. Try option "help"
vpn            | [s6-finish] sending all processes the TERM signal.
vpn            | [s6-finish] sending all processes the KILL signal and exiting.

wireguard docker won't run because of issue with socket.c file

linuxserver.io


Expected Behavior

The docker should generate peer config files.

Current Behavior

The docker does not generate peer config files.

Steps to Reproduce

  1. Run the docker-compose.yaml that's posted on the site.

Environment

OS: Debian 10
CPU architecture: x86_64
How docker service was installed:

From the official docker repo.

Command used to create docker container (run/create/compose/screenshot)

docker-compose up -d

Potentially useful information

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959157

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...


      _         ()
     | |  ___   _    __
     | | / __| | |  /  \ 
     | | \__ \ | | | () |
     |_| |___/ |_|  \__/

Brought to you by linuxserver.io

To support the app dev(s) visit:
WireGuard: https://www.wireguard.com/donations/

To support LSIO projects visit:
https://www.linuxserver.io/donate/

GID/UID

User uid: 1000
User gid: 1000

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
Uname info: Linux f75cd96521c9 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 x86_64 x86_64 GNU/Linux
RTNETLINK answers: Operation not supported
**** The wireguard module is not active, will attempt kernel header install and module compilation. ****
**** Attempting kernel header install ****
Get:1 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic/restricted Sources [5,823 B]
Get:5 http://archive.ubuntu.com/ubuntu bionic/multiverse Sources [216 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic/universe Sources [11.5 MB]
Get:7 http://archive.ubuntu.com/ubuntu bionic/main Sources [1,063 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
Get:11 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1,344 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse Sources [11.6 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/restricted Sources [18.4 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/main Sources [621 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/universe Sources [547 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [231 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [45.5 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [2,112 kB]
Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [2,150 kB]
Get:20 http://archive.ubuntu.com/ubuntu bionic-security/universe Sources [331 kB]
Get:21 http://archive.ubuntu.com/ubuntu bionic-security/multiverse Sources [4,352 B]
Get:22 http://archive.ubuntu.com/ubuntu bionic-security/main Sources [298 kB]
Get:23 http://archive.ubuntu.com/ubuntu bionic-security/restricted Sources [13.0 kB]
Get:24 http://archive.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [205 kB]
Get:25 http://archive.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [15.0 kB]
Get:26 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages [1,733 kB]
Get:27 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1,348 kB]
Fetched 35.8 MB in 10s (3,606 kB/s)
Reading package lists...
**** Debian host detected, attempting to install kernel headers from Debian Buster repo ****
Warning: apt-key output should not be parsed (stdout is not a terminal)
OK
Warning: apt-key output should not be parsed (stdout is not a terminal)
OK
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Get:4 http://deb.debian.org/debian buster InRelease [121 kB]
Get:5 http://deb.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:6 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Get:7 http://deb.debian.org/debian buster-backports InRelease [46.7 kB]
Get:8 http://deb.debian.org/debian buster/contrib Sources [50.8 kB]
Get:9 http://deb.debian.org/debian buster/non-free Sources [104 kB]
Get:10 http://deb.debian.org/debian buster/main Sources [10.4 MB]
Get:11 http://deb.debian.org/debian buster/contrib amd64 Packages [60.7 kB]
Get:12 http://deb.debian.org/debian buster/main amd64 Packages [10.7 MB]
Get:13 http://deb.debian.org/debian buster/non-free amd64 Packages [107 kB]
Get:14 http://deb.debian.org/debian-security buster/updates/main Sources [190 kB]
Get:15 http://deb.debian.org/debian-security buster/updates/non-free Sources [610 B]
Get:16 http://deb.debian.org/debian-security buster/updates/non-free amd64 Packages [486 B]
Get:17 http://deb.debian.org/debian-security buster/updates/main amd64 Packages [295 kB]
Get:18 http://deb.debian.org/debian buster-updates/non-free Sources [638 B]
Get:19 http://deb.debian.org/debian buster-updates/main Sources [3,966 B]
Get:20 http://deb.debian.org/debian buster-updates/main amd64 Packages [8,791 B]
Get:21 http://deb.debian.org/debian buster-updates/non-free amd64 Packages [529 B]
Get:22 http://deb.debian.org/debian buster-backports/contrib Sources [4,220 B]
Get:23 http://deb.debian.org/debian buster-backports/main Sources [352 kB]
Get:24 http://deb.debian.org/debian buster-backports/non-free Sources [8,240 B]
Get:25 http://deb.debian.org/debian buster-backports/contrib amd64 Packages [7,788 B]
Get:26 http://deb.debian.org/debian buster-backports/main amd64 Packages [355 kB]
Get:27 http://deb.debian.org/debian buster-backports/non-free amd64 Packages [27.5 kB]
Fetched 23.0 MB in 11s (2,122 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
cpp-8 gcc-8 libasan5 libgcc-8-dev libubsan1 linux-compiler-gcc-8-x86
linux-headers-4.19.0-8-common linux-kbuild-4.19
Suggested packages:
gcc-8-locales gcc-8-multilib gcc-8-doc libgcc1-dbg libgomp1-dbg libitm1-dbg
libatomic1-dbg libasan5-dbg liblsan0-dbg libtsan0-dbg libubsan1-dbg
libmpx2-dbg libquadmath0-dbg
The following NEW packages will be installed:
cpp-8 gcc-8 libasan5 libgcc-8-dev libubsan1 linux-compiler-gcc-8-x86
linux-headers-4.19.0-8-amd64 linux-headers-4.19.0-8-common linux-kbuild-4.19
0 upgraded, 9 newly installed, 0 to remove and 183 not upgraded.
Need to get 28.5 MB of archives.
After this operation, 127 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 linux-compiler-gcc-8-x86 amd64 4.19.146-1 [476 kB]
Get:2 http://deb.debian.org/debian-security buster/updates/main amd64 linux-headers-4.19.0-8-common all 4.19.98-1+deb10u1 [8,329 kB]
Get:3 http://deb.debian.org/debian buster/main amd64 linux-kbuild-4.19 amd64 4.19.146-1 [709 kB]
Get:4 http://deb.debian.org/debian-security buster/updates/main amd64 linux-headers-4.19.0-8-amd64 amd64 4.19.98-1+deb10u1 [879 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 cpp-8 amd64 8.4.0-1ubuntu118.04 [7,225 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libasan5 amd64 8.4.0-1ubuntu1
18.04 [366 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libubsan1 amd64 8.4.0-1ubuntu118.04 [122 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgcc-8-dev amd64 8.4.0-1ubuntu1
18.04 [2,305 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 gcc-8 amd64 8.4.0-1ubuntu118.04 [8,044 kB]
Fetched 28.5 MB in 7s (3,906 kB/s)
Selecting previously unselected package cpp-8.
(Reading database ... 14293 files and directories currently installed.)
Preparing to unpack .../0-cpp-8_8.4.0-1ubuntu1
18.04_amd64.deb ...
Unpacking cpp-8 (8.4.0-1ubuntu118.04) ...
Selecting previously unselected package libasan5:amd64.
Preparing to unpack .../1-libasan5_8.4.0-1ubuntu1
18.04_amd64.deb ...
Unpacking libasan5:amd64 (8.4.0-1ubuntu118.04) ...
Selecting previously unselected package libubsan1:amd64.
Preparing to unpack .../2-libubsan1_8.4.0-1ubuntu1
18.04_amd64.deb ...
Unpacking libubsan1:amd64 (8.4.0-1ubuntu118.04) ...
Selecting previously unselected package libgcc-8-dev:amd64.
Preparing to unpack .../3-libgcc-8-dev_8.4.0-1ubuntu1
18.04_amd64.deb ...
Unpacking libgcc-8-dev:amd64 (8.4.0-1ubuntu118.04) ...
Selecting previously unselected package gcc-8.
Preparing to unpack .../4-gcc-8_8.4.0-1ubuntu1
18.04_amd64.deb ...
Unpacking gcc-8 (8.4.0-1ubuntu118.04) ...
Selecting previously unselected package linux-compiler-gcc-8-x86.
Preparing to unpack .../5-linux-compiler-gcc-8-x86_4.19.146-1_amd64.deb ...
Unpacking linux-compiler-gcc-8-x86 (4.19.146-1) ...
Selecting previously unselected package linux-headers-4.19.0-8-common.
Preparing to unpack .../6-linux-headers-4.19.0-8-common_4.19.98-1+deb10u1_all.deb ...
Unpacking linux-headers-4.19.0-8-common (4.19.98-1+deb10u1) ...
Selecting previously unselected package linux-kbuild-4.19.
Preparing to unpack .../7-linux-kbuild-4.19_4.19.146-1_amd64.deb ...
Unpacking linux-kbuild-4.19 (4.19.146-1) ...
Selecting previously unselected package linux-headers-4.19.0-8-amd64.
Preparing to unpack .../8-linux-headers-4.19.0-8-amd64_4.19.98-1+deb10u1_amd64.deb ...
Unpacking linux-headers-4.19.0-8-amd64 (4.19.98-1+deb10u1) ...
Setting up cpp-8 (8.4.0-1ubuntu1
18.04) ...
Setting up linux-kbuild-4.19 (4.19.146-1) ...
Setting up linux-headers-4.19.0-8-common (4.19.98-1+deb10u1) ...
Setting up libasan5:amd64 (8.4.0-1ubuntu118.04) ...
Setting up libubsan1:amd64 (8.4.0-1ubuntu1
18.04) ...
Setting up libgcc-8-dev:amd64 (8.4.0-1ubuntu118.04) ...
Setting up gcc-8 (8.4.0-1ubuntu1
18.04) ...
Setting up linux-compiler-gcc-8-x86 (4.19.146-1) ...
Setting up linux-headers-4.19.0-8-amd64 (4.19.98-1+deb10u1) ...
/etc/kernel/header_postinst.d/dkms:

  • dkms: running auto installation service for kernel 4.19.0-8-amd64
    ...done.
    Processing triggers for libc-bin (2.27-3ubuntu1.2) ...
    **** Kernel headers seem to be present, attempting to build the wireguard module. . . ****
    **** Generating signing key ****
    Generating a RSA private key
    ..............................................................................................................................++++
    .......................++++
    writing new private key to 'signing_key.pem'

**** Building the module ****
make: Entering directory '/app/wireguard-linux-compat/src'
CC [M] /app/wireguard-linux-compat/src/main.o
CC [M] /app/wireguard-linux-compat/src/noise.o
CC [M] /app/wireguard-linux-compat/src/device.o
CC [M] /app/wireguard-linux-compat/src/peer.o
CC [M] /app/wireguard-linux-compat/src/timers.o
CC [M] /app/wireguard-linux-compat/src/queueing.o
CC [M] /app/wireguard-linux-compat/src/send.o
CC [M] /app/wireguard-linux-compat/src/receive.o
CC [M] /app/wireguard-linux-compat/src/socket.o
CC [M] /app/wireguard-linux-compat/src/peerlookup.o
CC [M] /app/wireguard-linux-compat/src/allowedips.o
CC [M] /app/wireguard-linux-compat/src/ratelimiter.o
/app/wireguard-linux-compat/src/socket.c: In function ‘send6’:
/app/wireguard-linux-compat/src/socket.c:139:20: error: ‘const struct ipv6_stub’ has no member named ‘ipv6_dst_lookup_flow’; did you mean ‘ipv6_dst_lookup’?
dst = ipv6_stub->ipv6_dst_lookup_flow(sock_net(sock), sock, &fl,
^~~~~~~~~~~~~~~~~~~~
ipv6_dst_lookup
/usr/src/linux-headers-4.19.0-8-common/scripts/Makefile.build:308: recipe for target '/app/wireguard-linux-compat/src/socket.o' failed
make[4]: *** [/app/wireguard-linux-compat/src/socket.o] Error 1
make[4]: *** Waiting for unfinished jobs....
/usr/src/linux-headers-4.19.0-8-common/Makefile:1537: recipe for target 'module/app/wireguard-linux-compat/src' failed
make[3]: *** [module/app/wireguard-linux-compat/src] Error 2
Makefile:146: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
Makefile:8: recipe for target 'all' failed
Makefile:26: recipe for target 'module' failed
make: Leaving directory '/app/wireguard-linux-compat/src'
make: *** [module] Error 2
make: Entering directory '/app/wireguard-linux-compat/src'
DEPMOD 4.19.0-8-amd64
Warning: modules_install: missing 'System.map' file. Skipping depmod.
depmod -b "/" -a 4.19.0-8-amd64
make: Leaving directory '/app/wireguard-linux-compat/src'
**** Let's test our new module. ****
RTNETLINK answers: Operation not supported
**** The module is not active, review the logs. Sleeping now. . . ****

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.