OpenVPN Experts - please help!
For the past week we have been trying to understand why OpenVPN packets terminating at pfSense 2.2.6 (or earlier) firewall's Site-to-Site or RA TUN interface are not routed to firewall's LAN interface.
Here is the server config:
dev ovpns2
verb 1
dev-type tun
dev-node /dev/tun2
writepid /var/run/openvpn_server2.pid
#user nobody
#group nobody
script-security 3
daemon
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
proto udp
cipher AES-128-CBC
auth SHA256
up /usr/local/sbin/ovpn-linkup
down /usr/local/sbin/ovpn-linkdown
local *.*.*.19
ifconfig 10.1.8.1 10.1.8.2
lport 1195
management /var/etc/openvpn/server2.sock unix
push "route 172.31.5.0 255.255.255.0"
route 192.168.0.0 255.255.0.0
route 10.0.0.0 255.0.0.0
route 172.16.0.0 255.240.0.0
secret /var/etc/openvpn/server2.secret
comp-lzo adaptive
push "route 10.131.0.0 255.255.0.0"
Here is the client config:
dev tun
persist-tun
persist-key
proto udp
cipher AES-128-CBC
auth SHA256
pull
resolv-retry infinite
remote *.*.*.19 1195
route 10.131.0.0 255.255.0.0
ifconfig 10.1.8.2 10.1.8.1
keepalive 10 60
ping-timer-rem
secret pfSense-udp-1195.secret
comp-lzo
The pfSense firewall's LAN interface is on a Community PVLAN provided by Cisco Nexus 1000V. All packets initiated from the PVLAN to the remote host go over the VPN tunnel to the host, which replies back, the pfSense sees the reply (recorded with packet capture) on its LAN interface coming from remote tunnel IP to the host on the PVLAN but the packets are never received at that host.
We have a ticket open with Cisco but they point to the pfSense being the culprit.
**Any IPSec tunnel to pfSense's WAN interface however works as expected and the hosts on the Community PVLAN are reachable over the tunnel.**
***The interesting part is that if the pfSense's LAN port is moved to regular VLAN the hosts on that VLAN are reachable over the OpenVPN tunnel.
So the issue occurs only when the FW's LAN and hosts are on Community PVLAN (e.g. community PVLAN=1102)... ***
Here are more details:
When PVLAN host with 10.131.102.17 IP pings a remote host with 192.168.1.182 IP over the VPN tunnel the reply packets are returned according to the pfSense FW's LAN port per the packet capture:
11:27:37.975400 IP 10.131.102.17 > 192.168.1.182: ICMP echo request, id 1, seq 1238, length 40
11:27:37.982019 IP 192.168.1.182 > 10.131.102.17: ICMP echo reply, id 1, seq 1238, length 40
11:27:42.546363 IP 10.131.102.17 > 192.168.1.182: ICMP echo request, id 1, seq 1239, length 40
11:27:42.557894 IP 192.168.1.182 > 10.131.102.17: ICMP echo reply, id 1, seq 1239, length 40
11:27:47.546806 IP 10.131.102.17 > 192.168.1.182: ICMP echo request, id 1, seq 1240, length 40
11:27:47.569788 IP 192.168.1.182 > 10.131.102.17: ICMP echo reply, id 1, seq 1240, length 40
11:27:52.547020 IP 10.131.102.17 > 192.168.1.182: ICMP echo request, id 1, seq 1241, length 40
11:27:52.570625 IP 192.168.1.182 > 10.131.102.17: ICMP echo reply, id 1, seq 1241, length 40
However on the Cisco Nexus 1000V switch ports only ICPM request packets are seen using the follows capture settings:
********************************
LTL : 49 (PVLAN host's port)
LTL : 53 (pfSense FW's LAN's port)
********************************
uswnex1# module vem 3 execute vempkt show capture info
Stage : Ingress
LTL : 53
VLAN : Unspecified
Filter : ip proto 1
Stage : Egress
LTL : 53
VLAN : Unspecified
Filter : ip proto 1
Stage : Drop
LTL : 53
VLAN : Unspecified
Filter : Unspecified
********************************
uswnex1# module vem 3 execute vempkt display detail all
********************** Entry 1 *************************
------Packet Entry Information------
Timestamp : Apr 06 11:52:10.231428
Packet Entry : 1
CPU : 7
Bytes Captured : 74
------Packet Length Information------
Packet Length : 74
Packet Buffer Length : 74
Packet Mapped Length : 74
------SF Packet Information------
Capture Stage : Egress
SF Packet Flags : Original
Source LTL : 49
Destination LTL : 53
HWBD : 19
Vlan/SegID : 1102
------Packet L3 Header Information------
Source IP Address : 10.131.102.17
Destination IP Address : 192.168.1.182
IP Protocol Type: 1
------Packet L2 Header Information------
Source MAC Address : *:*:*:b7:1e:7c
Destination MAC Address : *:*:*:b7:1e:20
Type : 2048
------Packet Platform Information------
NBL : 0xFFFFE00154E27AA0
Source : 2 - 0
Send Flags : 0x0
VMQ Queue ID : 0
NBL Type : 0
NBL Checksum Info : 0x220011
NBL 802.1Q Info : 0x0
Native Forwarding : 0x0
Virtual Subnet Id : 0x0
NBL Direction : Ingress
Dest Count : 1
Current Dest : 10 - 0
Dest Flags : 0
*********************************************************
********************** Entry 2 *************************
------Packet Entry Information------
Timestamp : Apr 06 11:52:14.841057
Packet Entry : 2
CPU : 7
Bytes Captured : 74
------Packet Length Information------
Packet Length : 74
Packet Buffer Length : 74
Packet Mapped Length : 74
------SF Packet Information------
Capture Stage : Egress
SF Packet Flags : Original
Source LTL : 49
Destination LTL : 53
HWBD : 19
Vlan/SegID : 1102
------Packet L3 Header Information------
Source IP Address : 10.131.102.17
Destination IP Address : 192.168.1.182
IP Protocol Type: 1
------Packet L2 Header Information------
Source MAC Address : *:*:*:b7:1e:7c
Destination MAC Address : *:*:*:b7:1e:20
Type : 2048
------Packet Platform Information------
NBL : 0xFFFFE00154E27AA0
Source : 2 - 0
Send Flags : 0x0
VMQ Queue ID : 0
NBL Type : 0
NBL Checksum Info : 0x220011
NBL 802.1Q Info : 0x0
Native Forwarding : 0x0
Virtual Subnet Id : 0x0
NBL Direction : Ingress
Dest Count : 1
Current Dest : 10 - 0
Dest Flags : 0
*********************************************************
********************** Entry 3 *************************
------Packet Entry Information------
Timestamp : Apr 06 11:52:19.841311
Packet Entry : 3
CPU : 0
Bytes Captured : 74
------Packet Length Information------
Packet Length : 74
Packet Buffer Length : 74
Packet Mapped Length : 74
------SF Packet Information------
Capture Stage : Egress
SF Packet Flags : Original
Source LTL : 49
Destination LTL : 53
HWBD : 19
Vlan/SegID : 1102
------Packet L3 Header Information------
Source IP Address : 10.131.102.17
Destination IP Address : 192.168.1.182
IP Protocol Type: 1
------Packet L2 Header Information------
Source MAC Address : *:*:*:b7:1e:7c
Destination MAC Address : *:*:*:b7:1e:20
Type : 2048
------Packet Platform Information------
NBL : 0xFFFFE0015AF52B60
Source : 2 - 0
Send Flags : 0x0
VMQ Queue ID : 0
NBL Type : 0
NBL Checksum Info : 0x220011
NBL 802.1Q Info : 0x0
Native Forwarding : 0x0
Virtual Subnet Id : 0x0
NBL Direction : Ingress
Dest Count : 1
Current Dest : 10 - 0
Dest Flags : 0
*********************************************************
********************** Entry 4 *************************
------Packet Entry Information------
Timestamp : Apr 06 11:52:24.841585
Packet Entry : 4
CPU : 7
Bytes Captured : 74
------Packet Length Information------
Packet Length : 74
Packet Buffer Length : 74
Packet Mapped Length : 74
------SF Packet Information------
Capture Stage : Egress
SF Packet Flags : Original
Source LTL : 49
Destination LTL : 53
HWBD : 19
Vlan/SegID : 1102
------Packet L3 Header Information------
Source IP Address : 10.131.102.17
Destination IP Address : 192.168.1.182
IP Protocol Type: 1
------Packet L2 Header Information------
Source MAC Address : *:*:*:b7:1e:7c
Destination MAC Address : *:*:*:b7:1e:20
Type : 2048
------Packet Platform Information------
NBL : 0xFFFFE00154E27AA0
Source : 2 - 0
Send Flags : 0x0
VMQ Queue ID : 0
NBL Type : 0
NBL Checksum Info : 0x220011
NBL 802.1Q Info : 0x0
Native Forwarding : 0x0
Virtual Subnet Id : 0x0
NBL Direction : Ingress
Dest Count : 1
Current Dest : 10 - 0
Dest Flags : 0
*********************************************************
uswnex1#