在ECS CentOS上配置L2tP服务,一直无法连接,提示“no connection has been authorized with policy=PSK”-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

在ECS CentOS上配置L2tP服务,一直无法连接,提示“no connection has been authorized with policy=PSK”

camore 2017-11-17 13:36:02 6611

ECS上配置L2TP服务后,执行ipsec verify,正常:
Checking your system to see if IPsec got installed and started correctly:
Version check and ipsec on-path [OK]
Linux Openswan U2.6.38/K3.10.0-514.26.2.el7.x86_64 (netkey)
Checking for IPsec support in kernel [OK]
SAref kernel support [N/A]
NETKEY: Testing XFRM related proc values [OK]

[OK]
[OK]

Hardware RNG detected, testing if used properly [OK]
Checking that pluto is running [OK]
Pluto listening for IKE on udp 500 [OK]
Pluto listening for NAT-T on udp 4500 [OK]
Checking for 'ip' command [OK]
Checking /bin/sh is not /bin/dash [OK]
Checking for 'iptables' command [OK]
Opportunistic Encryption Support [DISABLED]

但是连接L2TP时,/var/log/secure中出现下列错误:
Nov 17 11:43:15 izj6c6h25ghj5n6vo0emwnz pluto[10722]: packet from 124.205.127.38:500: ignoring Vendor ID payload [IKE CGA version 1]
Nov 17 11:43:15 izj6c6h25ghj5n6vo0emwnz pluto[10722]: packet from 124.205.127.38:500: initial Main Mode message received on 172.31.232.230:500 but no connection has been authorized with policy=PSK
Nov 17 11:43:16 izj6c6h25ghj5n6vo0emwnz pluto[10722]: packet from 124.205.127.38:500: phase 1 message is part of an unknown exchange
折腾了3天仍然不知原因,能否指点一下?
非常感谢!

弹性计算 Shell Linux 网络安全 网络虚拟化
分享到
取消 提交回答
全部回答(4)
  • gv5kdw6lbl3f6
    2021-04-08 18:27:49

    最佳回答:

    一般都是安全组和iptables的问题, 4500/500/1701 udp端口允许

    然后就能连上, 不过连上不一定能上网, 解决方式如下

    vi /etc/sysconfig/iptables

    注释掉-A POSTROUTING -s 192.168.8.0/24 -j SNAT -o eth0 --to-source 47.52.xxx.xxx(外网IP)

    加一条-A POSTROUTING -s 192.168.8.0/24 -o eth0 -j MASQUERADE

    service iptables restart

    更多参考地址: 阿里云官方(新用户需官网注册查看)

    0 0
  • 1059438988127036
    2019-07-17 21:44:09

    兄台,解决了没有,安全组端口都打开了,还是这样,求解

    0 0
  • ooloo
    2019-07-17 21:44:09

    一般都是安全组和iptables的问题, 4500/500/1701 udp端口允许

    然后就能连上, 不过连上不一定能上网, 解决方式如下

    vi /etc/sysconfig/iptables

    注释掉-A POSTROUTING -s 192.168.8.0/24 -j SNAT -o eth0 --to-source 47.52.xxx.xxx(外网IP)
    加一条-A POSTROUTING -s 192.168.8.0/24 -o eth0 -j MASQUERADE

    service iptables restart

    0 0
  • 火蓝云
    2019-07-17 21:44:09

    建议使用 1000+以上端口试下

    0 0
添加回答
开发与运维
使用钉钉扫一扫加入圈子
+ 订阅

集结各类场景实战经验,助你开发运维畅行无忧

推荐文章
相似问题
推荐课程