手机升级到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. CSS3背景温故

    1.背景的五种基本属性background-color(背景颜色)background-image(背景图片)background-repeat(背景图片展示方式)background-attachm ...

  2. iOS:JSON格式字符串转字典,字典转JSON格式字符串

    在iOS开发中,和服务器交互中,经常用到字典和JSON格式字符串相互转换. 代码如下: 1.JSON格式字符串转字典 + (NSDictionary *)dictionaryWithJsonStrin ...

  3. Oracle12C相关

    1.jar包安装到MVN本地库 mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.1 ...

  4. linux集群运维工具:clustershell和pssh

    由于需要安装hadoop集群,有10台机器需要安装,一开始打算用SCP复制,后来觉得不可接受(实际现场可能数倍的机器集群,就是10台也不想干).后来在网上找了,发现了clustershell和pssh ...

  5. The quieter you become,The more you are able to hear.

  6. android键盘弹出头部上移处理

    <ScrollView android:id="@+id/top_bar" android:layout_width="fill_parent" andr ...

  7. mysql 时间函数转换

    1 NOW() //当前时间 2 SYSDATE() //当前时间 3 CURRENT_TIMESTAMP 4 以'YYYY-MM-DD HH:MM:SS'或YYYYMMDDHHMMSS格式返回当前的 ...

  8. 小技巧,如何在Label中显示图片

    这个需求其实是有的,比如QQ聊天界面里面发送的信息,可以用label来显示文字(也可以用button显示),但是有时候用户可能会发送图片.如果能让Label遇到文字就显示文字,遇到图片就显示图片就好了 ...

  9. Android之SeekBar定制

    1.SeekBar样式定制 xml文件中:  <SeekBar             android:id="@+id/seekbar_voice"             ...

  10. 编译Android系统源码(高通平台)

    在Android源码根目录执行下面命令 source build/envsetup.sh choosecombo make –j4 其他命令(首先需要在android源码根目录执行source bui ...