Let's assume the above script has been copied and pasted to a file called ike-scan.sh. To run the script, issue something like the following on the command-line. Note: ike-scan needs UDP port 500 to be free, this can be achieved by stopping any running IPsec service (e.g. sudo ipsec stop). Replace 123.54.76.9 in the below with your VPN server and we'll grep for SA (i.e. IPSec Security Association) which is the main thing we are interested in.
sudo ipsec stop chmod a+rx ./ike-scan.sh sudo ./ike-scan.sh 123.54.76.9 | grep SA= It may take a few minutes for the script to run to completion and the output shall look something like:
SA=(Enc=3DES Hash=SHA1 Auth=PSK Group=2:modp1024 LifeType=Seconds LifeDuration(4)=0x00007080) SA=(Enc=AES Hash=SHA1 Auth=PSK Group=14:modp2048 KeyLength=128 LifeType=Seconds LifeDuration(4)=0x00007080 From the above example script output, it would mean the following phase 1 & 2 algorithms options could be set in the IPsec dialog box advanced options: