Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flags --otp and --persistent don't play nice together #1244

Open
smktpd opened this issue Sep 17, 2024 · 1 comment
Open

Flags --otp and --persistent don't play nice together #1244

smktpd opened this issue Sep 17, 2024 · 1 comment

Comments

@smktpd
Copy link

smktpd commented Sep 17, 2024

Flag --otp is for specifying time-based one-time password, I make a sub-shell call $() to retrieve it from keepassxc.
Flag --persistent attempts to re-connect if tunnel failed. But it looks like the attempts to reconnect using old totp.

Connection log looks like this
INFO:   Connected to gateway.
INFO:   Authenticated.
INFO:   Remote gateway has allocated a VPN.
...
INFO:   Tunnel is up and running.
INFO:   Cancelling threads...
INFO:   Cleanup, joining threads...
INFO:   Setting ppp0 interface down.
INFO:   Restoring routes...
delete host ${pub_ip_of_vpn_server}: gateway 192.168.88.1
${date} : Hangup (SIGHUP)
${date} : Modem hangup
${date} : Connection terminated.
${date} : LCP close (User request).
${date} : Connect time 24.1 minutes.
${date} : Sent 435481 bytes, received 5043662 bytes.
ERROR:  pppd: The link was terminated by the modem hanging up.
INFO:   Terminated pppd.
INFO:   Closed connection to gateway.
INFO:   Logged out.
INFO:   Connected to gateway.
ERROR:  Could not authenticate to gateway. Please check the password, client certificate, etc.
INFO:   Closed connection to gateway.
INFO:   Logged out.
INFO:   Connected to gateway.
ERROR:  Could not authenticate to gateway. Please check the password, client certificate, etc.

A possible solution would be to remake --otp flag (or introduce a new one) so that it would expect not the totp code itself, but a command that should yield one.

I'm on ARM-based device with macos Sonoma 14.6 (23G80) running openfortivpn installed from brew, tried versions 1.20.5 and 1.22.1 (latest available).

@dligthart
Copy link

dligthart commented Oct 29, 2024

Yes, I'm experiencing the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants