What's new

Voxel Voxel Firmware on LBR20 - Preshared Key on WG client

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

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="
 
/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.
 
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.
 
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.
 
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