Pritunl WG auth issues

I have a server that wont auth via WG:

log output from the client:
2023-01-24 07:21:29 Closing TUN/TAP interface/n
2023-01-24 07:21:29 SIGTERM[hard,] received, process exiting/n

(I am trying to get logs from the router but it’s not as easy as it should :roll_eyes:)

ports are forwarded (both ovpn and wg)…

It works as expected for ovpn.

The client is on windows, Pritunl Client v1.3.3373.6, WG is installed as well…

What am I missing?

Check all the logs from the drop down selection in the client log viewer.

[2023-1-24 7:21:32][ERROR] Request: JSON parse failed
SyntaxError: Unexpected token ‘<’, "
"… is not valid JSON
SyntaxError: Unexpected token ‘<’, "
"… is not valid JSON
at JSON.parse ()
at Response.json (webpack-internal:///./app/Request.js:45:25)
at eval (webpack-internal:///./app/types/ProfileTypes.js:619:37)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
[2023-1-24 7:22:27][ERROR] Request: JSON parse failed
SyntaxError: Unexpected token ‘<’, "
"… is not valid JSON
SyntaxError: Unexpected token ‘<’, "
"… is not valid JSON
at JSON.parse ()
at Response.json (webpack-internal:///./app/Request.js:45:25)
at eval (webpack-internal:///./app/types/ProfileTypes.js:619:37)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)

This was in the Client logs a few seconds after that entry (that I shared in orig post) went into the server specific log…

the closest errors in the service logs were from about half an hr earlier when I was still playing with some ovpn stuff…

This appears to be an error requesting the profile logs from the background service. Try deleting all log files in the C:\Users\USERNAME\AppData\Roaming\pritunl and C:\ProgramData\Pritunl directories. Then restart the computer or the Pritunl service. If this doesn’t work delete both the directories and import the profiles again.

stopping pritunl helper service then deleting logs, starting helper service, then reimporting profile didnt work - same result.

During server creation I set ovpnport to 4242 and wg port to 4243, but only 4242 is in the ovpn file, is wg port communicated over ovpn port?

When you suggested “deleting both directories” do you mean all contents? Would this require new install of pritunl im guessing?

Thanks!

You can open the developer tools from the top right menu and check for other errors in the console. Is Pritunl server behind a load balancer?

Pritunl is not behind a load balancer, I have a port forwarded for both OVPN and WG…

I get “Failed to connect” immeditely after typingin the OTP
servicelogs"

[2023-01-30 06:44:07][INFO] ▶ profile: Connecting ◆ disable_gateway=false ◆ dynamic_firewall=false ◆ mode="wg" ◆ profile_id="f68552090bb69428" ◆ reconnect=true ◆ sso_auth=false
[2023-01-30 06:44:07][ERRO] ▶ profile: Request wg connection failed
profile: Bad status 405 code from server
ORIGINAL STACK TRACE:
github.com/pritunl/pritunl-client-electron/service/profile.(*Profile).reqWg
	C:/Users/Windows/go/src/github.com/pritunl/pritunl-client-electron/service/profile/profile.go:2535 +0x663c94
github.com/pritunl/pritunl-client-electron/service/profile.(*Profile).startWg
	C:/Users/Windows/go/src/github.com/pritunl/pritunl-client-electron/service/profile/profile.go:3556 +0x668fa4
github.com/pritunl/pritunl-client-electron/service/profile.(*Profile).Start
	C:/Users/Windows/go/src/github.com/pritunl/pritunl-client-electron/service/profile/profile.go:1229 +0x659ee7
github.com/pritunl/pritunl-client-electron/service/handlers.profilePost.func1
	C:/Users/Windows/go/src/github.com/pritunl/pritunl-client-electron/service/handlers/profile.go:99 +0x672029
runtime.goexit
	C:/Program Files/Go/src/runtime/asm_amd64.s:1594 +0x1871e0
[2023-01-30 06:44:08][INFO] ▶ profile: Disconnecting ◆ profile_id="f68552090bb69428"
[2023-01-30 06:44:09][INFO] ▶ profile: Disconnected ◆ profile_id="f68552090bb69428"

clientlogs:

[2023-1-30 6:43:59][ERROR] Request: JSON parse failed
SyntaxError: Unexpected token '<', "<html>
   "... is not valid JSON
SyntaxError: Unexpected token '<', "<html>
   "... is not valid JSON
    at JSON.parse (<anonymous>)
    at Response.json (webpack-internal:///./app/Request.js:45:25)
    at eval (webpack-internal:///./app/types/ProfileTypes.js:619:37)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
[2023-1-30 6:44:42][ERROR] Request: JSON parse failed
SyntaxError: Unexpected token '<', "<html>
   "... is not valid JSON
SyntaxError: Unexpected token '<', "<html>
   "... is not valid JSON
    at JSON.parse (<anonymous>)
    at Response.json (webpack-internal:///./app/Request.js:45:25)
    at eval (webpack-internal:///./app/types/ProfileTypes.js:619:37)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)

thanks!

A 405 error is an invalid timestamp in the signature. Verify the client and server have the correct time.

I changed time zone on the server to make sure they match and same result… (howmany seconds of error would trigger an issue?) I’m puzzled why ovpn works fine but wg gives me the “failed to connect right away”, there is no log output on the server side that I see either… thanks for your help though!