One of the colleague was working on fortios conversion and needed a means to gather the existing PSK from the vpn ipsec in text format.
Here's a simple method for extracting this details by using a API call
The API entry point is ;
"https://x.x.x.x/api/v2/cmdb/vpn.ipsec/phase1-interface?plain-text-password=1?
The full http get would look like the following ;
curl -k -H "Authorization: Bearer zw7q8QyGrHwtfrn8tkGyfNbnGGN7js" "https://192.168.1.99/api/v2/cmdb/vpn.ipsec/phase1-interface?plain-text-password=1?access_token=zw7q8QyGrHwtfrn8tkGyfNbnGGN7js"
The output and field for "psksecret": will show the text value.
That's a simple method to reverse the encrypted field to cleartext for VPN PSK.
No comments:
Post a Comment