越过长城,走向世界,穿梭网络,享受自由
折腾VPS上的L2TP/IPsec,顺带PPTP
这几天买VPS上瘾,又到手2个XEN的VPS,由于联通把GRE协议封掉了,只好选择搭建L2TP满足所有的需求,PPTP的安装太简单,顺带就一起讲了
用是 onenetwork.net 的 XEN,1刀首月体验,以后每月5刀吧,可以的话就续租下去了。
(这里以CentOS为例,Ubuntu就用apt-get代替yum)
这里预装的操作系统是CentOS 5.4,由于L2TP需要PPP设备,所以VPS必须是XEN而非OpenVZ的。
安装L2TP 需要 MPPE 和较高版本的 ppp 支持,不过一般Centos5.4 的内核已经集成了 MPPE,但不一定有ppp 。
更新软件源
32位
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
64位
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm
安装IPsec支持件Openswan,建议直接去openswan.org下载rpm安装,用yum install openswan有点小问题
http://www.openswan.org/download/binaries/centos/5/without-nss/openswan-2.6.24rc5-1.i386.rpm
http://www.openswan.org/download/binaries/centos/5/without-nss/openswan-2.6.24rc5-1.x86_64.rpm
安装openawan需要gmp协议支持,可以先用 yum install gmp 安装
然后yum install xl2tpd
没有iptables的继续安装 yum install iptables
最后在安装一个yum install lsof (打开4500 500端口需要)
软件就绪,开始配置,这里会有很多问题,我们慢慢解决。
配置IPsec部分
IPsec最后配置成功检查,下面是一个配置成功的检查,用ipsec verify查看,后面会对每一个FAILED的问题进行解决
#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.24rc5/K2.6.18-164.11.1.el5xen (netkey)
Checking for IPsec support in kernel [OK]
Testing against enforced SElinux mode [OK]
NETKEY detected, testing for disabled ICMP send_redirects [OK] // 这里失败通过修改sysctl.conf解决
NETKEY detected, testing for disabled ICMP accept_redirects [OK]// 这里失败通过修改sysctl.conf解决
Checking for RSA private key (/etc/ipsec.secrets) [OK]
Checking that pluto is running [OK] // 这里失败,在提示目录下执行ipsec pluto
Pluto listening for IKE on udp 500 [OK] // 这里失败开提示,一般是没有安装lsof
Pluto listening for NAT-T on udp 4500 [OK] // 这里失败开提示,一般是没有安装lsof
Two or more interfaces found, checking IP forwarding [OK] //这里失败,是因为sysctl.conf下 net.ipv4.ip_forward = 0,要改成 1
Checking NAT and MASQUERADEing //这里失败,是因为iptables没有打开NAT
Checking for ‘ip’ command [OK]
Checking for ‘iptables’ command [OK]
Opportunistic Encryption Support [DISABLED] //这个之前可能会有一个DNS失败的提示,通过配置no_oe.conf解决
配置实例:
IPsec配置部分
vim /etc/ipsec.conf
# /etc/ipsec.conf – Openswan IPsec configuration file
#
# Manual: ipsec.conf.5
#
# Please place your own config files in /etc/ipsec.d/ ending in .conf
version 2.0 # conforms to second version of ipsec.conf specification# basic configuration
config setup
# Debug-logging controls: “none” for (almost) none, “all” for lots.
# klipsdebug=none
# plutodebug=”control parsing”
# For Red Hat Enterprise Linux and Fedora, leave protostack=netkey
protostack=netkey
nat_traversal=yes
virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12 #一般默认这里是没有的,需要添加上,有些同学这里没有加上配置,PC端是可以连接的,手机就不行
#oe=off #关闭这个
# Enable this if you see “failed to find any available worker”
nhelpers=0#You may put your configuration (.conf) file in the “/etc/ipsec.d/” and uncomment this.
#include /etc/ipsec.d/*.conf
# Add connections here# sample VPN connections, see /etc/ipsec.d/examples/
include /etc/ipsec.d/l2tp-psk.conf #添加l2tp配置#Disable Opportunistic Encryption
include /etc/ipsec.d/no_oe.conf #添加oe配置
no_oe配置
vim /etc/ipsec.d/no_oe.conf
conn block
auto=ignore
conn private
auto=ignore
conn private-or-clear
auto=ignore
conn clear-or-private
auto=ignore
conn clear
auto=ignore
conn packetdefault
auto=ignore
这个主要是解决#ipsec verify的如下错误
Opportunistic Encryption DNS checks:
Looking for TXT in forward dns zone: localhost.localdomain [MISSING]
Does the machine have at least one non-private address? [OK]
Looking for TXT in reverse dns zone: xx.xx.xx.xx.in-addr.arpa. [MISSING]
l2tp-psk.conf的配置
vim /etc/ipsec.d/l2tp-psk.conf
conn L2TP-PSK-NAT
rightsubnet=vhost:%no,%priv #%no,这个参数要不要都行
#forceencaps=yes #这个参数默认是启用的,但如果连接失败抓包分析看到不停的循环在和500端口交换PSK的话就去掉它
also=L2TP-PSK-noNAT
conn L2TP-PSK-noNAT
#
# Configuration for one user with any type of IPsec/L2TP client
# including the updated Windows 2000/XP (MS KB Q818043), but
# excluding the non-updated Windows 2000/XP.
#
#
# Use a Preshared Key. Disable Perfect Forward Secrecy.
#
# PreSharedSecret needs to be specified in /etc/ipsec.secrets as
# YourIPAddress %any: “sharedsecret”
authby=secret #认证方式为PSK
pfs=no
auto=add
keyingtries=3
# we cannot rekey for %any, let client rekey
rekey=no
#type=transport #传输类型,有transport和 tunnel模式,但实际应用中没区别
#
left=1.2.3.4 #VPS的IP地址
leftnexthop=1.2.3.5 #吓一跳地址,通过route -n 可以查看 gateway地址
# or you can use: left=YourIPAddress
#
# For updated Windows 2000/XP clients,
# to support old clients as well, use leftprotoport=17/%any
leftprotoport=17/1701 #这是客户端连进来的端口
#
# The remote user.
#
right=%any
# Using the magic port of “0″ means “any one single port”. This is
# a work around required for Apple OSX clients that use a randomly
# high port, but propose “0″ instead of their port.
rightprotoport=17/%any #这里%any也可以换成0,但有些同学会遇到不停的往4500端口发312字节的报文,那么就要换成%any了
vim /etc/ipsec.secrets
#include /etc/ipsec.d/*.secrets 下面是psk的配置,主机IP 2个空格 %any: PSK “密码”,有些配置说要2个空格,我看一个空格也可以,这里的密码就是设置预共享的密钥
1.2.3.4 %any: PSK “pskpassword”
配置sysctl.conf
vim /etc/sysctl.conf
修改如下
net.ipv4.ip_forward = 1
添加以下
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
然后 sysctl -p 生效,解决ICMP的失败问题。
到此IPsec配置完成,然后运行 ipsec setup –restart 重新运行并用ipsec verify查看运行状态,然后排错直到全部都ok。
XL2TPD配置部分
xl2tpd服务器配置
vim /etc/xl2tpd/xl2tpd.conf
[global]
listen-addr = 1.2.3.4 ;服务器地址,特别说明一下,这里的注释使用分号;
;
; requires openswan-2.5.18 or higher – Also does not yet work in combination
; with kernel mode l2tp as present in linux 2.6.23+
ipsec saref = yes ;打开这里
; forceuserspace = yes
;
; debug tunnel = yes
[lns default]
ip range = 192.168.1.128-192.168.1.254 ;客户端的IP范围
local ip = 192.168.1.99 ;设置l2tp服务器的IP
;require chap = yes ;特别说明2号,这里要注释掉,不然你会抓包发现一直往服务器的4500端口(ipsec-nat)发148字节的报文直到停止
refuse pap = yes
refuse chap = yes ;添加这行
require authentication = yes
name = l2tpd ;设置名称
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes
options设置
vim /etc/ppp/options.xl2tpd
ipcp-accept-local
ipcp-accept-remote
ms-dns 8.8.8.8 #这样配置就成了,取消掉wins
ms-dns 8.8.4.4
noccp
auth
crtscts
idle 1800
mtu 1410
mru 1410
nodefaultroute
debug
lock
proxyarp
connect-delay 5000
配置用户密码
vim /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client server secret IP addresses
#user servername password IP
suoluo * suoluo *
#用户名_服务名称(用*代表所有的服务l2tpd和pptpd)_密码_允许的IP(*代表所有地址)
xl2tp配置完成,使用 service xl2tpd restart 重启,一般不会有什么问题。
最后就是iptable的设置了
iptables -A INPUT -p 50 -j ACCEPT
iptables -A INPUT -p udp -d 1.2.3.4 –dport 500 -j ACCEPT
iptables -A INPUT -p udp -d 1.2.3.4 –dport 4500 -j ACCEPT
iptables -A INPUT -p udp -d 1.2.3.4 –dport 1701 -j ACCEPT
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE
/etc/init.d/iptables save
/etc/init.d/iptables restart
然后检查启动组
chkconfig –list
把没有自启动的服务加上,比如 chkconfig xl2tpd on
至此服务器就配完了,客户端就不用我介绍了吧,太简单了。要注意的就是别忘了设置IPsec的预共享密钥。
有什么问题就联系我,或留言。
PPTPD
随带把PPTPD的一块说了,下面是下载地址,用rpm安装。
http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-1.rhel5.1.i386.rpm
http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-1.rhel5.1.x86_64.rpm
鉴于前面用yum install xl2tpd的时候把相关的包都安装了,一个ppp,一个libpcap。如果仅装PPTPD的请yum安装这两个包。
配置那是相当的简单,给2个配置实例看看明白
vim /etc/ppp/options.pptpd
name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
proxyarp
lock
nobsdcomp
novj
#nomultilink 不能多人链接
#nomp 不能多人连接一个帐户
novjccomp
nologfd
ms-dns 8.8.8.8 #这两行是要添加的
ms-dns 8.8.4.4
vim /etc/pptpd.conf
localip 172.38.39.1 #打开这两个选项设置客户端IP个pptp服务器ip
remoteip 172.38.39.8-254
配置密码,参见前文
vim /etc/ppp/chap-secrets
最后设置iptables
iptables -A INPUT -p tcp –dport 1723 -j ACCEPT
iptables -A INPUT -p tcp –dport 47 -j ACCEPT
iptables -A INPUT -p gre -j ACCEPT
iptables -t nat -A POSTROUTING -s 172.38.39.0/24 -o eth0 -j MASQUERADE
/etc/init.d/iptables save
/etc/init.d/iptables restart
chkconfig pptpd on
servcie pptpd restart
全文结束,配置有问题的时候留言。

大约5月前
这个是改成1。
另外,debian系跟redhat系在配置上差距很大,不要说“Ubuntu就用apt-get代替yum”之类的傻话。
大约5月前
谢谢,我也是新手,自个慢慢琢磨的。
大约5月前
好东西,收藏了
大约4月前
xen vps
ipsec全部ok
但是客户端无法连上,奇怪了。
大约4月前
什么提示?最好抓包看看,给我说说卡在哪里了?
大约4月前
跟四楼情况一样,全部步骤OK,死活连不上
大约4月前
按照windows客户端上的提示根本就连不上
大约4月前
@Suoluo
今天重试了一次,全部OK还是连不上。
怎么弄出debug信息呢?
另外,如何判断内核是否支持。
大约4月前
这是什么情况?500端口
10:38:00.237823 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 1 R ident
10:38:00.428608 IP 120.8.31.36.isakmp > 221.122.115.57.isakmp: isakmp: phase 1 I ident
10:38:00.432647 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 1 R ident
10:38:00.537515 IP 120.8.31.36.isakmp > 221.122.115.57.isakmp: isakmp: phase 1 I ident[E]
10:38:00.537662 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 2/others R inf
10:38:01.837501 IP 120.8.31.36.isakmp > 221.122.115.57.isakmp: isakmp: phase 1 I ident[E]
10:38:01.837640 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 2/others R inf
10:38:03.837781 IP 120.8.31.36.isakmp > 221.122.115.57.isakmp: isakmp: phase 1 I ident[E]
10:38:03.837935 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 2/others R inf
10:38:07.837573 IP 120.8.31.36.isakmp > 221.122.115.57.isakmp: isakmp: phase 1 I ident[E]
10:38:07.837715 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 2/others R inf
10:38:08.316046 IP 120.8.31.36.isakmp > 221.122.115.57.isakmp: isakmp: phase 2/others I inf[E]
10:38:08.316176 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 2/others R inf
10:38:10.315973 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 1 R ident
10:38:30.317880 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 1 R ident
10:49:01.244582 IP 120.8.31.36.isakmp > 221.122.115.57.isakmp: isakmp: phase 1 I ident
10:49:01.244757 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 1 R ident
10:49:01.438456 IP 120.8.31.36.isakmp > 221.122.115.57.isakmp: isakmp: phase 1 I ident
10:49:01.442455 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 1 R ident
10:49:02.843288 IP 120.8.31.36.isakmp > 221.122.115.57.isakmp: isakmp: phase 1 I ident
10:49:04.843792 IP 120.8.31.36.isakmp > 221.122.115.57.isakmp: isakmp: phase 1 I ident
10:49:08.362045 IP 120.8.31.36.isakmp > 221.122.115.57.isakmp: isakmp: phase 2/others I inf
10:49:11.362803 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 1 R ident
10:49:32.665854 IP 120.8.31.36.isakmp > 221.122.115.57.isakmp: isakmp: phase 1 I ident
10:49:32.666054 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 1 R ident
10:49:32.861866 IP 120.8.31.36.isakmp > 221.122.115.57.isakmp: isakmp: phase 1 I ident
10:49:32.865840 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 1 R ident
10:49:32.971691 IP 120.8.31.36.isakmp > 221.122.115.57.isakmp: isakmp: phase 1 I ident[E]
10:49:32.971868 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 2/others R inf
10:49:33.841208 IP 120.8.31.36.isakmp > 221.122.115.57.isakmp: isakmp: phase 1 I ident[E]
10:49:33.841347 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 2/others R inf
10:49:35.840533 IP 120.8.31.36.isakmp > 221.122.115.57.isakmp: isakmp: phase 1 I ident[E]
10:49:35.840670 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 2/others R inf
10:49:39.841532 IP 120.8.31.36.isakmp > 221.122.115.57.isakmp: isakmp: phase 1 I ident[E]
10:49:39.841712 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 2/others R inf
10:49:42.840924 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 1 R ident
10:49:47.841051 IP 120.8.31.36.isakmp > 221.122.115.57.isakmp: isakmp: phase 1 I ident[E]
10:49:47.841229 IP 221.122.115.57.isakmp > 120.8.31.36.isakmp: isakmp: phase 2/others R inf
大约4月前
PSK未设置正确
大约4月前
楼主能帮我设置一下我的vps么。没弄明白-。-
大约4月前
给我密码,发邮件到suoluo.do@gmail.com
大约4月前
Linux Openswan U2.6.24rc5/K(no kernel code presently loaded)
Checking for IPsec support in kernel [FAILED]
请问如何解决?
大约3月前
l2tp一直超时怎么办啊?
大约3月前
老大,你ipsec都没启动。。。
ipsec setup –start
大约3月前
超时?你的ipsec配置好没?通过了没
大约3月前
谢谢,ipsec setup -start 启动后一切正常 电脑可以连接,我用vpn连接器,不用那么麻烦的设置windows。
电脑正常连接,itouch 连接失败。
请Suoluo 高手再指点下。
大约3月前
注意PSK设置
大约3月前
04:04:09.571119 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 10.10.10.44.telindus > 116.255.134.4.ssh: P 0:52(52) ack 1461 win 65535}
04:04:09.690164 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 10.10.10.44.telindus > 116.255.134.4.ssh: . ack 1461 win 65535}
04:04:09.750276 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 192.168.9.128.4198 > 121.14.98.31.http: P 364:445(81) ack 964 win 64572}
04:04:09.938821 IP 76.164.231.89.l2tp > hn.kd.smx.adsl.l2tp: l2tp:[L](6/1) {IP 121.14.98.31.http > 192.168.9.128.4198: P 964:1405(441) ack 445 win 7504}
04:04:10.232087 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 192.168.9.128.4198 > 121.14.98.31.http: P 445:630(185) ack 1405 win 65535}
04:04:10.337995 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 192.168.9.128.4194 > 239.255.255.250.ssdp: UDP, length 133}
04:04:10.410049 IP 76.164.231.89.l2tp > hn.kd.smx.adsl.l2tp: l2tp:[L](6/1) {IP 121.14.98.31.http > 192.168.9.128.4198: P 1405:1774(369) ack 630 win 8576}
04:04:10.576912 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 10.10.10.44.4066 > 121.14.98.31.http: F 0:0(0) ack 1 win 64700}
04:04:10.699555 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 192.168.9.128.4198 > 121.14.98.31.http: P 630:711(81) ack 1774 win 65166}
04:04:10.778094 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 10.10.10.44.telindus > 116.255.134.4.ssh: P 0:52(52) ack 1461 win 65535}
04:04:10.833079 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 10.10.10.44.4066 > 121.14.98.31.http: . ack 1 win 64700}
04:04:10.886958 IP 76.164.231.89.l2tp > hn.kd.smx.adsl.l2tp: l2tp:[L](6/1) {IP 121.14.98.31.http > 192.168.9.128.4198: P 1774:2215(441) ack 711 win 8576}
04:04:11.281092 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 192.168.9.128.4198 > 121.14.98.31.http: . ack 2215 win 64725}
04:04:13.192469 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 10.10.10.44.telindus > 116.255.134.4.ssh: P 0:52(52) ack 1461 win 65535}
04:04:13.347536 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 10.10.10.44.telindus > 116.255.134.4.ssh: . ack 1461 win 65535}
04:04:13.436761 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 192.168.9.128.fjmpjps > 221.204.145.164.fjmpjps: UDP, length 79}
04:04:13.568455 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 192.168.9.128.msnp > reverse.gdsz.cncnet.net.irdmi: UDP, length 61}
04:04:13.800967 IP 76.164.231.89.l2tp > hn.kd.smx.adsl.l2tp: l2tp:[L](6/1) {IP reverse.gdsz.cncnet.net.irdmi > 192.168.9.128.msnp: UDP, length 38}
04:04:14.016029 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 10.10.10.44.telindus > 116.255.134.4.ssh: P 52:88(36) ack 1461 win 65535}
04:04:15.505765 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 10.10.10.44.4066 > 121.14.98.31.http: F 0:0(0) ack 1 win 64700}
04:04:17.752149 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 10.10.10.44.4066 > 121.14.98.31.http: . ack 1 win 64700}
04:04:18.021010 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 10.10.10.44.telindus > 116.255.134.4.ssh: P 0:88(88) ack 1461 win 65535}
04:04:20.690064 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 10.10.10.44.telindus > 116.255.134.4.ssh: . ack 1461 win 65535}
04:04:23.499351 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 192.168.9.128.fjmpjps > 221.204.145.164.fjmpjps: UDP, length 79}
04:04:24.834913 IP hn.kd.smx.adsl.l2tp > 76.164.231.89.l2tp: l2tp:[L](44353/21710) {IP 192.168.9.128.4200 > 119.147.19.187.17800: UDP, length 261}
电脑l2tp拨号正常,apple iphone 拨号时,抓包没有任何信息。Suoluo老大帮我呀!
大约3月前
500端口抓包:
23:32:57.057789 IP hn.kd.smx.adsl.isakmp > 76.164.231.103.isakmp: isakmp: phase 1 I ident
23:32:57.061987 IP 76.164.231.103.isakmp > hn.kd.smx.adsl.isakmp: isakmp: phase 1 R ident
23:32:57.482596 IP hn.kd.smx.adsl.isakmp > 76.164.231.103.isakmp: isakmp: phase 1 I ident
23:32:57.485869 IP 76.164.231.103.isakmp > hn.kd.smx.adsl.isakmp: isakmp: phase 1 R ident
大约3月前
tail /var/log/message
May 28 23:36:16 vps3508333 xl2tpd[2661]: Maximum retries exceeded for tunnel 63471. Closing.
May 28 23:36:24 vps3508333 xl2tpd[2661]: Connection 22 closed to 221.13.130.179, port 49173 (Timeout)
大约3月前
很奇怪的现象,apple iphone 拨号始终不成功,但打开 tcpdump udp port 500
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
21:58:43.177333 IP 212.8.55.123.broad.ly.ha.dynamic.163data.com.cn.4768 > 76.164.231.103.isakmp: isakmp: phase 1 I ident
21:58:43.179059 IP 76.164.231.103.isakmp > 212.8.55.123.broad.ly.ha.dynamic.163data.com.cn.4768: isakmp: phase 1 R ident
21:58:43.583920 IP 212.8.55.123.broad.ly.ha.dynamic.163data.com.cn.4768 > 76.164.231.103.isakmp: isakmp: phase 1 I ident
21:58:43.585805 IP 76.164.231.103.isakmp > 212.8.55.123.broad.ly.ha.dynamic.163data.com.cn.4768: isakmp: phase 1 R ident
此时拨号成功,iphone退出vpn后再拨号又失败,重启ipsec后再拨号成功,iphone退出vpn后,再拨号又失败,重启ipsec后又成功..反复如此
大约3月前
windows下是不是要修改注册表啊,有人配置了不需要修改注册表也能成功的,这样iphone上也能用了,楼上的,加一下我QQ:3552105
大约3月前
apple iphone 可以正常拨号,但断开后,再拨号就失败。
ipsec 重启后 iphone拨号正常,断开后再拨号又失败,如此反复。请Suoluo 指点下
大约3月前
请问一下:
客户端能拨上,但获取的IP地址等参数总是这样的:
IP:192.168.1.128
掩码:255.255.255.255
网关:192.168.1.128
(IP地址和网关是一样的,掩码是4个255)
可能是哪里的原因?
大约2月前
问个问题。。。
博主你的yum源是怎样设置的?
我的VPS上
yum install xl2tpd
提示
No package xl2tpd available.
请问哈 如何搞定?
大约1月前
又一个回帖不看贴的
更新软件源
32位
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
64位
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm
大约1月前
同学,我全部配置完毕了,可是 ipsec verify 的时候出现了
Pluto listening for NAT-T on udp 4500 [FAILED]
Two or more interfaces found, checking IP forwarding [FAILED]
之前测试是没有问题的,我的 转发也已经打开了的,请问这是什么问题?
大约1月前
问下楼主 为什么只要开防火墙 就出现 DNS无法解析
就是说 只要我开防火墙 可以正常连接 但是无法ping同网址 但是ping网址的IP却可以 用IP也可以打开网站
麻烦了
大约1月前
您好,配置成功,win可以连接,但macosx和iphone不能连接,请问是什么问题?
#conn %default
# forceencaps=yes
conn L2TP-PSK-NAT
rightsubnet=vhost:%priv
also=L2TP-PSK-noNAT
conn L2TP-PSK-noNAT
authby=secret
pfs=no
auto=add
keyingtries=3
rekey=no
# ikelifetime=8h
# keylife=1h
# type=transport
left=173.224.212.123
leftprotoport=17/1701
right=%any
rightprotoport=17/%any