OpenVPN and Clients and Windows

Nothing ever works like one wants it to. Take for instance a client connecting into an OpenVPN server. Communication back to the client? Nah! Who needs that. In the case of Windows, it isn't OpenVPN's fault.

If you can't ping from a VPN Server to a Windows Client, try this script on Windows;

pktmon stop 2>$null
pktmon filter remove

pktmon filter add "Physical-IP-Ping" -t ICMP -i 192.168.2.51
pktmon filter add "VPN-IP-Ping" -t ICMP -i 172.16.20.100

pktmon start --capture --comp all --pkt-size 0 --log-mode real-time

See? OpenVPN is trying. But alas, Windows just isn't responding.

09:09:02.687395600 PktGroupId 1407374883553307, PktNumber 1, Appearance 1, Direction Rx , Type IP , Component 247, Edge 1, Filter 1, OriginalSize 84, LoggedSize 84
        ip: SourceIP > DestinationIP: ICMP echo request, id 3491, seq 9, length 64
09:09:02.687411300 PktGroupId 1407374883553307, PktNumber 1, Appearance 2, Direction Rx , Type IP , Component 248, Edge 1, Filter 1, OriginalSize 84, LoggedSize 84
        ip: SourceIP  > DestinationIP: ICMP echo request, id 3491, seq 9, length 64
09:09:03.685967700 PktGroupId 1407374883553308, PktNumber 1, Appearance 1, Direction Rx , Type IP , Component 247, Edge 1, Filter 1, OriginalSize 84, LoggedSize 84
        ip: SourceIP  > DestinationIP: ICMP echo request, id 3491, seq 10, length 64

Change the setting needed for it to reply;

Set-NetIPInterface `
-InterfaceAlias "WhatEverAdapterName" `
-AddressFamily IPv4 `
-WeakHostReceive Enabled `
-WeakHostSend Enabled

Check on the status;

Get-NetIPInterface `
-InterfaceAlias "WhatEverAdapterName" `
-AddressFamily IPv4 |
Format-Table InterfaceAlias,InterfaceIndex,WeakHostReceive,WeakHostSend

OK, put it back the way it was, if desired;

Set-NetIPInterface `
-InterfaceAlias "WhatEverAdapterName" `
-AddressFamily IPv4 `
-WeakHostReceive Disabled `
-WeakHostSend Disabled