安卓手机的IPSec /PPTP/L2TP连接

背景

现在加密隧道的协议有了迭代,手机默认的IPSec是IKEv2版本。但是总有一些场景或是配置是使用之前的版本,需要怎么切换使用以前版本的加密协议呢

日期:2023年2月17日

设备:IQOO8

安卓版本:Android12

操作步骤

1. 打开手机的【设置】-【其他网络与连接】

各安卓手机的路径都大同小异,这边给出iqoo的路径,其他品牌可以做个参考

2.找到【VPN】点击进入

 

3. 【添加VPN网络】

 

4.选择【类型】-【显示安全性低的类型】

 

5.根据自己的需求选择所需协议类型,因为这次我需要用到的是IPsec Xauth PSK ,所以就圈了这个

 

 VPN

可以看到默认显示的是IKEv2/IPsec MSCHAPv2;IKEv2/IPsec PSK; IKEv2/IPsec RSA

而归为安全性低的PPTP;L2TP/IPsec PSK; L2TP/IPsec RSA; IPsec Xauth PSK; IPsec Xauth RSA; IPsec Hybrid RSA。也是可以选择的

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
可以按照以下步骤在 CentOS 上快速部署 L2TP 服务: 1. 安装 L2TPPPTP 服务 ``` yum install xl2tpd ppp pptpd ``` 2. 配置 xl2tpd 编辑 `/etc/xl2tpd/xl2tpd.conf` 文件,将以下内容添加到文件末尾: ``` [global] ipsec saref = no [lns default] ip range = 192.168.42.10-192.168.42.20 local ip = 192.168.42.1 require chap = yes refuse pap = yes require authentication = yes name = l2tpd ppp debug = yes pppoptfile = /etc/ppp/options.xl2tpd length bit = yes ``` 3. 配置 ppp 创建 `/etc/ppp/options.xl2tpd` 文件,并将以下内容添加到文件中: ``` require-mschap-v2 ms-dns 8.8.8.8 ms-dns 8.8.4.4 proxyarp mtu 1400 mru 1400 auth name l2tpd password l2tpdpassword ``` 注意将 `l2tpdpassword` 改为你自己的密码。 4. 配置 pptpd 编辑 `/etc/pptpd.conf` 文件,将以下内容添加到文件末尾: ``` localip 192.168.42.1 remoteip 192.168.42.100-200 ``` 5. 配置 chap-secrets 编辑 `/etc/ppp/chap-secrets` 文件,将以下内容添加到文件末尾: ``` username l2tpd password * ``` 注意将 `l2tpd` 和 `password` 改为你自己的用户名和密码。 6. 启动服务 ``` systemctl start pptpd systemctl start xl2tpd ``` 7. 配置防火墙规则 ``` iptables -A INPUT -p udp --dport 1701 -j ACCEPT iptables -A INPUT -p udp --dport 500 -j ACCEPT iptables -A INPUT -p udp --dport 4500 -j ACCEPT iptables -A INPUT -p gre -j ACCEPT iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu ``` 完成以上步骤后,即可在 CentOS 上快速部署 L2TP 服务。
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值