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

我有一个Pfsense用于连接我的服务器到广域网,他们使用从局域网 – >广域网的NAT。
我有一个使用TAP的OpenVPN服务器,允许远程工作人员与服务器放在同一个LANnetworking上。
目前,当我连接,所有的路线在客户端看起来很好:
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日志并手动禁用规则。