RAK7268CV2 Wireguard CLI Installation

Hi all,

I’m having trouble installing the Wireguard extension via the command line on my RAK7268CV2 running WisGateOS_2.2.8_RAK. I am able to successfully install the Wireguard extension using the Extension Gallery during tests, but this will not be an option for configuring over 1000 devices.

I’ve tried installing the stand-alone ipk extension here, transferring it over and then running opkg install /tmp/wes-wireguard-1.0.1_b46.ipk, but it seems to be missing some essential components. The gateway’s logs show the following line: ./wireguard.sh: eval: line 133: /usr/bin/wg: not found coming up repeatedly.

How can I install Wireguard extension without going through the web interface and the extension gallery?

Frank

Updating and closing this out here.

I was able to install the WireGuard extension onto the latest WisGateOS_2.2.8_RAK firmware, but not by uploading the ipk file and installing it using the command-line. Instead I used the web interface I was hoping to avoid.

The following sequence of curl commands installs WireGuard once the gateway’s Nginx web console has started:

LOGIN_TOKEN=$(curl --header "Content-Type: application/json" \
	--request POST --data "{\"password\":\"${PASSWORD}\"}" \
	-k https://${RAK_IP}/api/auth/token 2>/dev/null \
	| jq -r .payload.jwtToken)

curl --header "Authorization: Bearer ${LOGIN_TOKEN}" -k \
	https://${RAK_IP}/api/ext/gallery > /dev/null 2>&1

curl --header "Content-Type: application/json" \
	--header "Authorization: Bearer ${LOGIN_TOKEN}" \
	--request POST --data '{"autoUpdate": false}' -k \
	https://${RAK_IP}/api/ext/db/com_rak_wireguard \
    > /dev/null 2>&1

PASSWORD is the password to login to the gateway as root and RAK_IP is the address allocated to the gateway’s WAN port by the local DHCP server. Needless to say the WAN interface must be routed to the Internet for this to work.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.