Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **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).
Expand Down
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ app_setup_block: |

# changelog
changelogs:
- { date: "25.06.20:", desc: "Simplify module tests, prevent iptables issues from resulting in false negatives." }
- { date: "19.06.20:", desc: "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." }
- { date: "29.05.20:", desc: "Add support for 64bit raspbian." }
- { date: "28.04.20:", desc: "Add Buster/Stretch backports repos for Debian. Tested with OMV 5 and OMV 4 (on kernel 4.19.0-0.bpo.8-amd64)." }
Expand Down
33 changes: 11 additions & 22 deletions root/etc/cont-init.d/30-config
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,13 @@
mkdir -p /config/{templates,coredns}

# check for wireguard module
if grep -q wireguard /proc/modules; then
echo "**** It seems the wireguard module is already loaded, let's test to make sure it works. ****"
/app/wireguard-tools/contrib/ncat-client-server/client-quick.sh
wg-quick up demo
if wg show | grep -q demo; then
echo "**** The module is working properly, skipping kernel header install and module compilation. ****"
SKIP_COMPILE="true"
else
echo "**** The module is not functional, will attempt kernel header install and module compilation. ****"
fi
wg-quick down demo
rm -f /etc/wireguard/demo.conf
ip link del dev test 2>/dev/null
if ip link add dev test type wireguard; then
echo "**** It seems the wireguard module is already active. Skipping kernel header install and module compilation. ****"
SKIP_COMPILE="true"
ip link del dev test
else
echo "**** The wireguard module is not loaded, will attempt kernel header install and module compilation. ****"
echo "**** The wireguard module is not active, will attempt kernel header install and module compilation. ****"
fi

# install headers if necessary
Expand Down Expand Up @@ -133,18 +126,14 @@ DUDE
make -C wireguard-linux-compat/src -j$(nproc)
make -C wireguard-linux-compat/src install
echo "**** Let's test our new module. ****"
/app/wireguard-tools/contrib/ncat-client-server/client-quick.sh
wg-quick up demo
if wg show | grep -q demo; then
echo "**** The module is working properly, moving forward with setup. ****"
ip link del dev test 2>/dev/null
if ip link add dev test type wireguard; then
echo "**** The module is active, moving forward with setup. ****"
ip link del dev test
else
wg-quick down demo
rm -f /etc/wireguard/demo.conf
echo "**** The module is not working, review the logs. Sleeping now. . . ****"
echo "**** The module is not active, review the logs. Sleeping now. . . ****"
sleep infinity
fi
wg-quick down demo
rm -f /etc/wireguard/demo.conf
else
echo "**** Kernel headers don't seem to be available, can't compile the module. Sleeping now. . . ****"
sleep infinity
Expand Down