我不得不重新解决一个多年前(2009年)的问题,而这一次它正在踢我的屁股。
我们的办公室通过RDP通过IPSec隧道连接到托pipe服务器场(托pipe服务提供商有一个思科terminal;我们有pfSense)。办公室的用户连接到远程服务器没有问题。
对于road-warrior访问,我设置了OpenVPN并将其与LAN子网桥接。 这在pfSense v.1.2.3中运行良好,而且由于我不想破坏所有东西,所以我已经阻止了升级。 由于情况,我现在已经升级到2.3(并打算保持最新状态),但是我不能让远程服务器再次访问远程服务器。
LAN subnet: 192.168.1.0/24 Hosting provider's subnet: 172.23.4.0/24
在1.2.3下,我设置了下列自定义选项:
dev tap0; server-bridge 192.168.1.1 255.255.255.0 192.168.1.44 192.168.1.50; push "route 172.23.4.0 255.255.255.0";
大多数这些自定义选项现在在GUI中可以select2.3,当然,这实际上使事情复杂化。 我已经尝试了几十种不同的安排。 以下是我现在所拥有的:
General Information Disabled - no Server mode - Remote Access (SSL/TLS) Protocol - UDP Device mode - tap Interface - WAN Local port - 1194 Tunnel Settings IPv4 Tunnel Network (empty) IPv6 Tunnel Network (empty) Bridge DHCP (yes) Bridge Interface - LAN (I've also tried putting my bridge interface here; different tutorials disagree, but I _think_ LAN is what I want) Server Bridge DHCP Start - 192.168.1.46 Server Bridge DHCP End - 192.168.1.50 Redirect Gateway - (no) IPv4 Local network(s) - 192.168.1.0/24, 172.23.4.0/24 (I've also tried each of them by itself) IPv6 Local network(s) - (empty) Concurrent connections - 5 Compression - Enabled with Adaptive Compression (I've tried all five options) Type-of-Service - (no) Inter-client communication - (no) but I've tried both ways Duplicate Connection - (no) Client Settings Dynamic IP - (yes) Address Pool - (no) (but I've tried both ways) Advanced Client Settings DNS Default Domain - (no) DNS Server enable - (yes) DNS Server 1 - 192.168.1.1 Block Outside DNS - (no) (but I've tried both) Force DNS cache update - (yes) (but I've tried both) NTP Server enable - (no) NetBIOS enable - (no) Enable custom port - (no) Advanced Configuration Custom options - push "route 172.23.4.0 255.255.255.0 192.168.1.1" (I've rung every change on this that I can think of) Verbosity level - default
在“自定义选项”下,我尝试推送两条路线,或者一次一条路线, 我尝试了使用和不使用192.168.1.1作为网关。 结果是一样的。
我的客户端configuration与之前没有变化:
client dev tap dev-node OpenVPN proto udp remote (pfSense WAN address) 1194 resolv-retry infinite nobind persist-key persist-tun mute-replay-warnings ca ca.crt cert my.crt key my.key ns-cert-type server cipher BF-CBC comp-lzo verb 3
结果有点奇怪:
Wireless LAN adapter Wi-Fi: Description . . . . . . . . . . . : Wi-Fi Adapter DHCP Enabled. . . . . . . . . . . : Yes IPv4 Address. . . . . . . . . . . : 192.168.125.135(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.125.1 DHCP Server . . . . . . . . . . . : 192.168.125.1 DNS Servers . . . . . . . . . . . : 127.0.0.1 Ethernet adapter OpenVPN: Description . . . . . . . . . . . : TAP-Windows Adapter V9 DHCP Enabled. . . . . . . . . . . : Yes IPv4 Address. . . . . . . . . . . : 192.168.1.46(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : DHCP Server . . . . . . . . . . . : 192.168.1.0 DNS Servers . . . . . . . . . . . : 192.168.1.1
(OpenVPN DHCP服务器是怎么回事?)
IPv4 Route Table =========================================================================== Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.125.1 192.168.125.135 55 127.0.0.0 255.0.0.0 On-link 127.0.0.1 331 127.0.0.1 255.255.255.255 On-link 127.0.0.1 331 127.255.255.255 255.255.255.255 On-link 127.0.0.1 331 172.23.4.0 255.255.255.0 192.168.1.1 192.168.1.46 55 172.23.4.0 255.255.255.0 192.168.1.1 192.168.125.135 56 192.168.1.0 255.255.255.0 On-link 192.168.1.46 311 192.168.1.0 255.255.255.0 192.168.1.1 192.168.1.46 55 192.168.1.46 255.255.255.255 On-link 192.168.1.46 311 192.168.1.255 255.255.255.255 On-link 192.168.1.46 311 192.168.125.0 255.255.255.0 On-link 192.168.125.135 311 192.168.125.135 255.255.255.255 On-link 192.168.125.135 311 192.168.125.255 255.255.255.255 On-link 192.168.125.135 311 224.0.0.0 240.0.0.0 On-link 127.0.0.1 331 224.0.0.0 240.0.0.0 On-link 192.168.1.46 311 224.0.0.0 240.0.0.0 On-link 192.168.125.135 311 255.255.255.255 255.255.255.255 On-link 127.0.0.1 331 255.255.255.255 255.255.255.255 On-link 192.168.1.46 311 255.255.255.255 255.255.255.255 On-link 192.168.125.135 311
(所有这些重复路线从哪里来?)
底线:我得到一个正确范围的IP地址,但是当我尝试ping办公室或托pipenetworking上的主机时:
C:\WINDOWS\system32>ping 192.168.1.2 Pinging 192.168.1.2 with 32 bytes of data: Reply from 192.168.1.46: Destination host unreachable. Reply from 66.75.161.48: TTL expired in transit. Reply from 66.75.161.48: TTL expired in transit. Reply from 66.75.161.48: TTL expired in transit. C:\WINDOWS\system32>ping 172.23.4.39 Pinging 172.23.4.39 with 32 bytes of data: Reply from 192.168.125.135: Destination host unreachable. Request timed out. Request timed out. Request timed out.
我也打开从TAP切换到TUN; 当我尝试的时候,我能ping通局域网上的主机,但无法弄清楚如何通过IPSec VPN进行路由 – 这就是为什么我在TAP /桥接版本1.x中定位的原因。 我确定我错过了一些明显的事情,但是…
编辑:当然我忘了提防火墙规则; 在所有接口上,我都有“允许所有”的OpenVPNstream量规则。