Pfsense 2.1 OpenVPN无法访问局域网上的服务器

我有一个这样设置的小networking:

在这里输入图像说明

我有一个Pfsense用于连接我的服务器到广域网,他们使用从局域网 – >广域网的NAT。

我有一个使用TAP的OpenVPN服务器,允许远程工作人员与服务器放在同一个LANnetworking上。

  • 他们通过WAN IP连接到OVPN接口。
  • 局域网接口也作为服务器获取互联网连接的服务器,IP地址为10.25.255.254
  • OVPN接口和LAN接口在BR0中桥接
  • 服务器A的IP为10.25.255.1,可以连接互联网
  • 客户端A通过VPN进行连接,并在其TAP接口10.25.24.1(为VPN客户端预留10.25.0.0/16内的a / 24)上分配IP地址,
  • 防火墙目前允许任何连接到局域网的OVPN,反之亦然

目前,当我连接,所有的路线在客户端看起来很好:

Destination Gateway Genmask Flags Metric Ref Use Iface 300.300.300.300 0.0.0.0 255.255.255.0 U 0 0 0 eth0 10.25.0.0 10.25.255.254 255.255.0.0 UG 0 0 0 tap0 10.25.0.0 0.0.0.0 255.255.0.0 U 0 0 0 tap0 0.0.0.0 300.300.300.300 0.0.0.0 UG 0 0 0 eth0 

我可以ping通LAN接口:

 root@server:# ping 10.25.255.254 PING 10.25.255.254 (10.25.255.254) 56(84) bytes of data. 64 bytes from 10.25.255.254: icmp_req=1 ttl=64 time=7.65 ms 64 bytes from 10.25.255.254: icmp_req=2 ttl=64 time=7.49 ms 64 bytes from 10.25.255.254: icmp_req=3 ttl=64 time=7.69 ms 64 bytes from 10.25.255.254: icmp_req=4 ttl=64 time=7.31 ms 64 bytes from 10.25.255.254: icmp_req=5 ttl=64 time=7.52 ms 64 bytes from 10.25.255.254: icmp_req=6 ttl=64 time=7.42 ms 

但是我无法ping通LAN接口:

 root@server:# ping 10.25.255.1 PING 10.25.255.1 (10.25.255.1) 56(84) bytes of data. From 10.25.255.254: icmp_seq=1 Redirect Host(New nexthop: 10.25.255.1) From 10.25.255.254: icmp_seq=2 Redirect Host(New nexthop: 10.25.255.1) 

我在我的em1接口上运行了一个tcpdump(IP地址为10.25.255.254的LAN接口)

 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on em1, link-type EN10MB (Ethernet), capture size 96 bytes 08:21:13.449222 IP 10.25.24.1 > 10.25.255.1: ICMP echo request, id 23623, seq 10, length 64 08:21:13.458211 ARP, Request who-has 10.25.255.1 tell 10.25.24.1, length 28 08:21:14.450541 IP 10.25.24.1 > 10.25.255.1: ICMP echo request, id 23623, seq 11, length 64 08:21:14.458431 ARP, Request who-has 10.25.255.1 tell 10.25.24.1, length 28 08:21:15.451794 IP 10.25.24.1 > 10.25.255.1: ICMP echo request, id 23623, seq 12, length 64 08:21:15.458530 ARP, Request who-has 10.25.255.1 tell 10.25.24.1, length 28 08:21:16.453203 IP 10.25.24.1 > 10.25.255.1: ICMP echo request, id 23623, seq 13, length 64 

所以stream量到达LAN接口,它也传递给主机,主机回复。 但是stream量不会放在LAN接口上。

问题不在于openvpn或pfsense设备,而在于VMWare vSwitch。 如果您在VMWare中运行pfsense,则应将与pfsensenetworking关联的vSwitch“混杂模式”从拒绝改为接受。 如果你不这样做,那么OpenVPN桥接客户端将看到的唯一主机就是pfsense服务器本身。

在防火墙上也有一个隐含的规则,在UI上看不到。 您需要仔细检查PF日志并手动禁用规则。