[Share Experiences] VPN IPSEC的连接
Tofloor
poster avatar
186******10
deepin
2023-07-20 22:56
Author

系统版本 deepin 20.9

1、编辑shell脚本

#!/bin/bash

Encryption algorithms: 3des=5, aes128=7/128, aes192=7/192, aes256=7/256

ENCLIST="5 7/128 7/192 7/256"

Hash algorithms: md5=1, sha1=2, sha256=5, sha384=6, sha512=7

HASHLIST="1 2 5 6 7"

Diffie-Hellman groups: 1, 2, 5, 14, 15, 19, 20, 21

GROUPLIST="1 2 5 14 15 19 20 21"

Authentication method: Preshared Key=1

AUTH=1

for ENC in $ENCLIST; do

for HASH in $HASHLIST; do

for GROUP in $GROUPLIST; do

echo ike-scan --trans=​ENC,HASH,​AUTH,GROUP -M "$@"

ike-scan --trans=​ENC,HASH,​AUTH,GROUP -M "$@"

done

done

done

添加脚本的运行权限

sudo chmod +x ./ike-scan.sh

2、运行脚本:

运行:sudo ./ike-scan.sh VPN的地址 | grep SA

3、查看返回的结果有如下SA:

SA=(Enc=3DES Hash=SHA1 Group=2:modp1024 Auth=PSK LifeType=Seconds LifeDuration=28800)

根据SA可知道下面信息:

1].密钥交换协议是:3des-sha1-modp1024

2].安全封装协议是:3des-sha1

4、安装libreswan

在终端中运行命令:sudo apt install libreswan

微信图片_20230720145521.png.png

Reply Favorite View the author
All Replies
青稚
Moderator
2023-07-20 23:00
#1

like

Reply View the author