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天仍然不知原因,能否指点一下?
非常感谢!
一般都是安全组和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
更多参考地址: 阿里云官方(新用户需官网注册查看)
一般都是安全组和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
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。