connecting with @ in username and context in host
rmacian opened this issue · comments
My Forticlient is connecting with a user like foo@bar.xyz and the host is shown has https://foo/bar (I have two vpns on different context, the other is foo/qux)
I have also activated a 2FA where I get a code from Microsoft authenticator
How does is translated in the config file ? I tried
host = foo/bar
port = 10443
username = foo@bar.xyz
password = mypass
otp = 1234
I get
ERROR: getaddrinfo: nodename nor servname provided, or not known
If omit the context I get
DEBUG: Empty cookie.
ERROR: Could not authenticate to gateway. Please check the password, client certificate, etc.
DEBUG: No cookie given (-7)
Help does not explain, also the 2FA is not even clear ..
Please use meaningful names. I suspect the foo
and bar
in foo@bar.xyz
and https://foo/bar
are different, aren't they?
yes its user@domain.com and https://anotherdomain.com/context
Try;
openfortivpn -u 'user@domain.com' --realm=context anotherdomain.com
However, 2FA is not directly supported. You would have to connect to https://anotherdomain.com/context
using a web browser, retrieve the cookie, and feed it to openfortivpn:
openfortivpn -u 'user@domain.com' --realm=context --cookie =... anotherdomain.com