Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
Not applicable

VPN pre-shared key

Just wondering if anybody else experienced this: The only way I can get the pre-shared key to work is if I manually enter the pre-shared key into the FortiGate (copy and paste won' t work). I want a really complex randomly generated key and it takes a really long time to enter it in manually. I am able to copy and paste that same pre-shared key into the Forti-Client which saves some time. But I could save more time if I could copy and paste it into the FortiGate.
15 REPLIES 15
freaky
New Contributor

Never had those issues, but I did have issues with special chars (about 1-2 year ago tho' haven' t tested it with recent versions). So I don' t use special chars anymore. Pasting things like this always goes fine for me tho' (linux pwgen -s 40 1): lzcgpIiSndD5mRO0f0lrLIhJtHbG0RGAdVo4NfEJ
Not applicable

Paul, I have had some issues before with Fortimanager where I copied and pasted a password and it failed. When typing the password by hand (and comparing to the clipboard to make sure it matched) it worked. No workaround at this point.
rwpatterson
Valued Contributor III

Take a look at the backup file. The pre-shared key is encrypted. You can paste this encrypted version into another box in the correct area, and be done with the whole mess...

Bob - self proclaimed posting junkie!
See my Fortigate related scripts at: http://fortigate.camerabob.com

Bob - self proclaimed posting junkie!See my Fortigate related scripts at: http://fortigate.camerabob.com
mhe
Contributor II

You can copy the PSK using the cli: config vpn ipsec phase1 edit " yourphase1" set psksecret yourverycomplexpsk next end martin
Not applicable

I think what Paul is mentioning is the following: -Create a random pre-shared key -Copy and paste the random key into the Web GUI so before you even get to the stage of copying it to other units. Let' s say you email the key to the other side that is using a non-Fortigate unit. So potentially the pre-shared keys don' t match. I have run into this before also where I had to manually retype the admin password into Fortimanager, copy and paste inserted something into the admin password field but not the admin password ;)
Not applicable

loorimar, Yes, that' s exactly what I mean. I have to manually type it in to the FortiGate to get it to work. I' m going to try mhe' s suggestion and copy-and-paste it using the CLI. I found out something when I did that: there is an 80 character limit. NOTE: This was not a problem I had before since I only tested it out with a 24 character PSK before. I know Windows has a 256 character limit for passwords so that' s what I like to use for ultimate security. I' ll test out the VPN tonight and see it the copy-and-paste in the CLI works.
rwpatterson
Valued Contributor III

I' ll test out the VPN tonight and see it the copy-and-paste in the CLI works.
Only if both units are Fortigates, for sure....

Bob - self proclaimed posting junkie!
See my Fortigate related scripts at: http://fortigate.camerabob.com

Bob - self proclaimed posting junkie!See my Fortigate related scripts at: http://fortigate.camerabob.com
Not applicable

OK, I tried the copy and paste in the CLI but that didn' t work either. Just to clarify what I mean if anybody is still confused, I CAN copy and paste into the GUI and the CLI, but when I do, the VPN doesn' t work. Anyway, my VPN does work so I shouldn' t really complain. I created a random 80 character password, entered it manually into the FortiGate, copied and pasted it into the FortiClient, and the VPN works.
abelio

Just to clarify what I mean if anybody is still confused, I CAN copy and paste into the GUI and the CLI, but when I do, the VPN doesn' t work.
is important to re-check charset matching between source terminal (where Copy takes place) and destination terminal (FGT console, SSH console, etc where Paste happens); ISO-UTF8, ISO-8859-1, ISO-8859-15, Hyperterminal ascii configuration etc all things to re-check if your PSK includes so long characters sequence and if you use non-common characters.

regards




/ Abel

regards / Abel
Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors