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

connecting with @ in username and context in host #1204

Open
rmacian opened this issue Mar 6, 2024 · 3 comments
Open

connecting with @ in username and context in host #1204

rmacian opened this issue Mar 6, 2024 · 3 comments

Comments

@rmacian
Copy link

rmacian commented Mar 6, 2024

My Forticlient is connecting with a user like [email protected] 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 = [email protected]
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 ..

@DimitriPapadopoulos
Copy link
Collaborator

Please use meaningful names. I suspect the foo and bar in [email protected] and https://foo/bar are different, aren't they?

@rmacian
Copy link
Author

rmacian commented Mar 7, 2024

@DimitriPapadopoulos
Copy link
Collaborator

DimitriPapadopoulos commented Mar 7, 2024

Try;

openfortivpn -u '[email protected]' --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 '[email protected]' --realm=context --cookie =... anotherdomain.com 

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

No branches or pull requests

2 participants