Voxel Voxel Firmware on LBR20 - Preshared Key on WG client

  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

UndyingShadow

New Around Here
I'm using the latest Voxel Firmware on an LBR20 with the Wireguard client. The Quickstart.txt indicates to use the following template for the wireguard.conf file:


------------------------- cut here ---------------------------------------
EndPoint="wireguard.5july.net"
LocalIP="10.0.xxx.xxx/24"
PrivateKey="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX="
PublicKey="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX="
Port="48574"
------------------------- cut here ---------------------------------------

Problem is that I'm trying to connect to a VPN provider that provides a Preshared Key.
The WG VPN client doesn't seem to work without it.
Trying a different provider without a PSK does work. Is there a way to specify this?
I tried PresharedKey="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX="
 

UndyingShadow

New Around Here
/etc/init.d/wg-client appears to be responsible for creating /tmp/wg0.conf
It doesn't have anything for parsing PSK out of the wireguard.conf file.

# WireGuard: create wg0 config (wg0.conf)
echo "[Interface]" > $WGConfig
echo "PrivateKey = $PrivateKey" >> $WGConfig
echo "[Peer]" >> $WGConfig
echo "PublicKey = $PublicKey" >> $WGConfig
echo "Endpoint = $IP:$Port" >> $WGConfig
echo "AllowedIPs = 0.0.0.0/0" >> $WGConfig

I tried to modify the script but my changes do not persist.
 

Voxel

Part of the Furniture
The use of PresharedKey is optional and VPN provider (I could use for testing) does not support it.

OK, I'll add this optional PresharedKey support to wg-client, but I cannot test it.

I tried to modify the script but my changes do not persist.

Check my QuickStart.txt re: how to keep your changes.

2. Overlay partition on Circle partition.

You should save your changed script as

/mnt/circle/overlay/etc/init.d/wg-client

Change it to:

. . .
# WireGuard: create wg0 config (wg0.conf)
echo "[Interface]" > $WGConfig
echo "PrivateKey = $PrivateKey" >> $WGConfig
echo "[Peer]" >> $WGConfig
echo "PublicKey = $PublicKey" >> $WGConfig

if [ ! -z "$PresharedKey" ]; then
echo "PresharedKey = $PresharedKey" >> $WGConfig
fi
echo "Endpoint = $IP:$Port" >> $WGConfig
echo "AllowedIPs = 0.0.0.0/0" >> $WGConfig
. . .



It is what I'll change.

Voxel.
 

UndyingShadow

New Around Here
Okay, cool, I didn't know if the overlay would allow to overwrite existing files.

Thanks for the info and for the fix. And thanks for the firmware, it is very much appreciated.
 

UndyingShadow

New Around Here
I can confirm this script edit works, both with and without PresharedKey in wireguard.conf file. Both types connected and completed speedtest through VPN
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top