我试图在运行openswan和shorewall的Linux路由器(主机A,服务子网10.10.0.0/16)和运行RouterOS 6.3的MikroTek RouterBoard (主机B,服务192.168.88.0/24)之间创建一个站点对站点VPN。
IPSEC隧道本身似乎已经开通,主持人A说:
# service ipsec status
IPsec running - pluto pid: 4292
pluto pid 4292
1 tunnels up
some eroutes exist以及:
#ipsec auto --status
<SNIP>
000 #2: "office-connect":500 STATE_QUICK_I2 (sent QI2, IPsec SA established); EVENT_SA_REPLACE in 27422s; newest IPSEC; eroute owner; isakmp#1; idle; import:admin initiate
000 #2: "office-connect" esp.65bcd1d@<REDACTED> esp.c8d18ebd@<REDACTED> tun.0@<REDACTED> tun.0@<REDACTED> ref=0 refhim=4294901761
000 #1: "office-connect":500 STATE_MAIN_I4 (ISAKMP SA established); EVENT_SA_REPLACE in 2348s; newest ISAKMP; lastdpd=72s(seq in:0 out:0); idle; import:admin initiate在东道B时:
/ip ipsec remote-peers print
0 local-address=<REDACTED> remote-address=<REDACTED> state=established side=responder established=11m26s 以及:
/ip ipsec policy print
Flags: T - template, X - disabled, D - dynamic, I - inactive
0 src-address=192.168.88.0/24 src-port=any dst-address=10.10.0.0/16 dst-port=any protocol=all action=encrypt level=require ipsec-protocols=esp tunnel=yes
sa-src-address=<REDACTED> sa-dst-address=<REDACTED> proposal=Office-Connect priority=0我按照http://www.shorewall.net/IPSEC-2.6.html上的指令配置shorewall和http://wiki.mikrotik.com/wiki/Manual:IP/IPsec以设置NAT旁路规则。
然而,我实际上无法从隧道中得到任何数据包,在A上:
# ping -c4 192.168.88.1
PING 192.168.88.1 (192.168.88.1) 56(84) bytes of data.
--- 192.168.88.1 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3016ms关于B:
/ping count=4 10.10.0.1
HOST SIZE TTL TIME STATUS
10.10.0.1 timeout
10.10.0.1 timeout
10.10.0.1 timeout
10.10.0.1 timeout
sent=4 received=0 packet-loss=100% 我有点不知所措,我在网络方面的经验不是很好。因此,对于任何提示,甚至是如何调试这个问题,我都会有所帮助。如果需要,我很乐意提供额外的配置示例或日志输出。非常感谢!
发布于 2013-09-23 16:16:30
如果其他人也有同样的问题.问题是,我在shorewall框上有另一个虚拟专用网设置,它是一个名为vpn (站点到站点VPN命名为ovpn)的L2TP公路战士设置,所以我的/etc/shorewall/zones文件如下所示:
#ZONE TYPE OPTIONS IN OUT
# OPTIONS OPTIONS
<SNIP>
vpn ipsec
l2tp ipv4
ovpn ipv4我的/etc/shorewall/hosts是这样的:
#ZONE HOST(S) OPTIONS
vpn eth0:0.0.0.0/0
ovpn eth0:192.168.88.0/24,<REDACTED> ipsec结果表明,区域文件中区域声明的顺序很重要(但在主机文件中不重要),-for--每个连接shorewall都选择匹配的第一个区域。由于vpn区域有一个与每个远程主机匹配的主机条目,所以所有ovpn连接都将由vpn区域匹配,然后路由到xl2tpd,这当然是行不通的。
因此,我反转了vpn和ovpn的区域条目,一切都很好。
https://serverfault.com/questions/540967
复制相似问题