Installing Wireguard

trying to install WG server using https://openwrt.org/docs/guide-user/services/vpn/wireguard/server
On step two Key managment i got

root@Open22Wrt:~# umask go=
root@Open22Wrt:~# wg genkey | tee wgserver.key | wg pubkey > wgserver.pub
root@Open22Wrt:~# WG_KEY="$(cat wgserver.key)"
root@Open22Wrt:~# WG_PSK="$(cat wgclient.psk)"
cat: can't open 'wgclient.psk': No such file or directory

what is wrong

There's a step missing from the documentation: the creation of the pre-shared key itself.

Create a pre-shared key, save it to the file wgclient.psk. Remember to distribute the .psk to any other device which will connect to the WG server.

2 Likes

What is the correct sytacsys I can't figure it out

wg --help

It is mentioned in the client config page.

# Generate keys
umask go=
...
wg genpsk > wgclient.psk
2 Likes

The client keys are supposed to be generated on the client.
So, relevant instructions are listed in the WireGuard client how-to mentioned by @trendy.

This is the canonical implementation of the public-key cryptography concept.
Although, if we consider the server secure enough, we can generate all the keys in one place.

2 Likes

it was unusual to me to understand that client generates its keys by itself, in openVPN all generating goes on server.
now i need to change MTU dont know how, also cant find where is config files for client and server or all configs in /etc/config/network?
Also the WG shows the best perfomance compering to pptp and openvpn on my router up to 10 mbits
adn it is encripted and looks like there is no way to reduce encription

1 Like

Yes, the supported protocol options are listed here:
Protocol "wireguard" (Wireguard VPN)

Great! :+1:

1 Like

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