11

NetworkManager 使用IPsec L2TP的一些错误解决

 3 years ago
source link: https://blog.ihipop.info/2020/02/5242.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

老旧加密算法的列表

NetworkManager-l2tp versions 1.2.6 to 1.2.14 使用 strongSwan默认的加密算法列表,一些被认为是弱加密的算法被默认排除了 
需要自己设置。nm-l2tp项目整理了一个他们认为常见的加密组合,需要填写到nm-l2tp的Phase1和Phase2里面(相当于动态生成的ipsec配置文件里面的ike和esp选项,位于/var/run/nm-l2tp-ipsec-*.conf),也可以使用文档里面提到的ike-scan脚本进行扫描。如果你的日志里面出现类似日志

received NO_PROPOSAL_CHOSEN error notify

基本上就是这个问题,自己无脑抄写设置一下即可。末尾的感叹号不是必须的。

老旧加密算法支持插件

需要注意的是,有些加密算法,默认没有预装在Debian系列的strongSwan的内建支持内,比如出现类似日志

ENCRYPTION_ALGORITHM 3DES_CBC (key size 0) not supported!

需要安装strongSwan的插件支持此类老旧算法,我的Debian9安装了如下两个包:

apt-get install libstrongswan-standard-plugins  libstrongswan-extra-plugins

实际起作用的是第一个。

Router OS 的特殊问题

手里有台Routeros默认的l2tp over ipsec也是支持3des之类的,使用ike-scan扫描的结果也是如此,但是实际上在IPsec包的设置里面,默认的IPsec Proposal只勾选了aes-128-cbc/blowfish,可能这个优先级比较高,使用ike-scan扫描的结果并不能提现如上设置,针对性的设置

Phase1 (IKE):aes128-sha1-modp1024

Phase2(ESP):aes128-sha1

即可,如上选项也默认在nm-l2tp推荐的设置里面

Author Info : From:NetworkManager 使用IPsec L2TP的一些错误解决 URL:https://blog.ihipop.info/2020/02/5242.html Please Reserve This Link,Thanks!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK