手机升级到Android 6以后,以前正常使用的L2TP VPN却无法连接了。服务器端日志:

"vpnpsk"[119] 114.249.245.192 #240: no acceptable Proposal in IPsec SA
"vpnpsk"[119] 114.249.245.192 #240: sending encrypted notification NO_PROPOSAL_CHOSEN to 114.249.245.192:4500

看起来应该是在加密环节出现了问题。在Libreswan的bugzilla上找到了一段说明:

Android 6.0 appears to be stubborn and only wants to use
AES_256-HMAC_SHA2_256 (needing sha2-truncbug=yes)

phase2alg=aes_gcm-null,aes256-sha1,aes256-sha2_256

and other variations including aes_gcm-null have no positive effect.

The Android 5.1.1 version I am using (Cyanogenmod 12.1) happily runs with SHA1 both with sha2-truncbug=yes or no, so the configuration for now with these two Android versions are

phase2alg=aes_gcm-null,aes256-sha1,aes256-sha2_256
sha2-truncbug=yes

尝试对服务器上的/etc/ipsec.conf文件进行修改:

#修改以下两行配置,在行尾加入“aes256-sha2_256”,以此增加对sha2的支持ike=3des-sha1,aes-sha1,aes256-sha1,aes256-sha2_256
phase2alg=3des-sha1,aes-sha1,aes256-sha1,aes256-sha2_256
#新增一行配置
sha2-truncbug=yes

保存配置文件后重启IPSEC服务,Android 6手机连接恢复正常!

服务器环境:Ubuntu 12.04 LTS + Libreswan

Andorid 6连接Libreswan L2TP VPN的更多相关文章

  1. Win10 连接L2TP VPN 失败解决方法

    Win10 连接L2TP VPN 失败解决方法 iOS系统不知道在什么时候,已经不支持PPTP VPN.偶尔的机会刚好看到github上的一键式VPN服务器部署脚本setup-ipsec-vpn,就在 ...

  2. 如何在Ubuntu 11.10上连接L2TP VPN

    要在家继续项目的开发,但架设的GitLab只能校内访问,更悲催的是学校架设的SSL VPN不支持Linux,好在想起学校以前架设的L2TP VPN,应该可以支持Linux,于是便一通谷歌百度,然而发现 ...

  3. Centos6一键搭建L2TP VPN服务器

    用VPS在墙上打洞还有一种叫L2TP,也是常见的一种方式.本脚本结合了L2TP(Layer Tunneling Protocol)和IPSec(Internet Protocol Security), ...

  4. CentOS Linux VPS安装IPSec+L2TP VPN

    CentOS Linux VPS安装IPSec+L2TP VPN 时间 -- :: 天使羊波波闪耀光芒 相似文章 () 原文 http://www.live-in.org/archives/818.h ...

  5. How to: Set up Openswan L2TP VPN Server on CentOS 6

    Have you ever wanted to set up your own VPN server? By following the steps below, you can set up you ...

  6. juniper防火墙 L2TP VPN配置

    juniper防火墙 L2TP  VPN配置 建立L2TP_POOL 创建连接的用户: 创建用户组: 更改L2TP的连接池: 更改L2TP的隧道: 设置防火墙的策略: Win7连接:

  7. setting up a IPSEC/L2TP vpn on CentOS 6 or Red Hat Enterprise Linux 6 or Scientific Linux

    This is a guide on setting up a IPSEC/L2TP vpn on CentOS 6 or Red Hat Enterprise Linux 6 or Scientif ...

  8. 浙大玉泉ubuntu L2TP VPN连接设置

    网络连接设置 1.内网有线 如果是笔记本且只用无线,剩下的就不需要看了.实验室台式机没有无线网卡不得不折腾-- 玉泉有线都是要绑定固定ip的,实验室无需和mac地址绑定,命令如下sudo gedit ...

  9. 远程连接实验室的VPN

    Windows 7 (win8类似)的用户请按以下步骤进行操作:1.点击“开始”菜单,然后点击“控制面板”,然后点击“查看网络和任务”.2.点击“设置新连接或网络”.3.点击“连接到工作区”,然后点击 ...

随机推荐

  1. 《Continuous Integration》读书笔记

    Trigger a Build whenever a change occurs. it can help us reduce assumptions on a projecvt by rebuild ...

  2. JPA persistence

    Play provides a set of very useful helpers to simplify the management of your JPA entities. Note tha ...

  3. Node.js+Express配置入门

    Node.js是一个Javascript运行环境(runtime).实际上它是对Google V8引擎进行了封装.V8引 擎执行Javascript的速度非常快,性能非常好.Node.js对一些特殊用 ...

  4. 小数5.2500四舍五入保留1位小数的java算法之一

    BigDecimal bd = new BigDecimal(5.2500); BigDecimal a = bd.setScale(1, BigDecimal.ROUND_HALF_UP); dou ...

  5. ae开发基础功能

    放大.缩小.pan.框选要素(新建命令,建立命令HOOK,赋给当前地图控件): ICommand cmd = new ControlsSelectFeaturesTool(); cmd.OnCreat ...

  6. 8款超实用JavaScript框架

    下面盘点了8款实用的JavaScript框架: 1. Hammer.js Hammer.js是被广泛使用的轻量级JavaScript框架,它提供了常用触摸操作的规范,比如收缩.拖放.双击和删除等等.它 ...

  7. ViewPager的使用小技巧

    1.在ViewPager中默认加载当前屏幕上的界面和左右相邻界面的数据从而实现页面滑动的快速切换.可以通过调用setOffscreenPageLimit(int)方法,定制预加载相邻页面的数目. 2. ...

  8. LeakCanary中英文文档+使用例子

    Android 开源界最伟(jian)大(zhi)高(kai)效(gua)的公司 Square 又向业界投下一颗重磅炸弹.推出了一个叫 LeakCanary 的玩意儿,可以通过简单粗暴的方式来让开发者 ...

  9. Xcode中的常用快捷键

    新建项目     com + shift +N 新建文件    com  + N 偏好设置  通用   com + , 跳到指定行 com + L 当前行加断点    com + \ 移动编辑区最上方 ...

  10. iOS React-Native入门指南之HelloWorld

    React-native 作为facebook开源项目,最近是火的一塌糊涂,它采用node.js能够写ios和android的native界面代码,简直是太酷了.支持动态更新,而且appstore 提 ...