OpenVPN and Clients and Windows: Difference between revisions

Created page with "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;<syntaxhighlight lang="text">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 17..."
 
mNo edit summary
 
Line 30: Line 30:
-WeakHostSend Disabled  
-WeakHostSend Disabled  
</syntaxhighlight>
</syntaxhighlight>
=== More Commands That Work (Experimental) ===
powershell.exe -NoProfile -Command "Start-Process powershell.exe -Verb RunAs -Wait -ArgumentList '-NoProfile -Command `"Set-NetIPInterface -InterfaceAlias <nowiki>''</nowiki>LAN_NIC<nowiki>''</nowiki> -AddressFamily IPv4 -WeakHostReceive Disabled -WeakHostSend Disabled`"'"
powershell.exe -NoProfile -Command "Start-Process powershell.exe -Verb RunAs -Wait -ArgumentList '-NoProfile -Command `"Set-NetIPInterface -InterfaceAlias <nowiki>''</nowiki>OpenVPN_NIC<nowiki>''</nowiki> -AddressFamily IPv4 -WeakHostReceive Disabled -WeakHostSend Disabled`"'"
powershell.exe -NoProfile -Command "Start-Process powershell.exe -Verb RunAs -Wait -ArgumentList '-NoProfile -Command `"Set-NetIPInterface -InterfaceAlias <nowiki>''</nowiki>LAN_NIC<nowiki>''</nowiki> -AddressFamily IPv4 -WeakHostReceive Enable -WeakHostSend Enable`"'"
powershell.exe -NoProfile -Command "Start-Process powershell.exe -Verb RunAs -Wait -ArgumentList '-NoProfile -Command `"Set-NetIPInterface -InterfaceAlias <nowiki>''</nowiki>OpenVPN_NIC<nowiki>''</nowiki> -AddressFamily IPv4 -WeakHostReceive Enable -WeakHostSend Enable`"'"
powershell.exe -NoProfile -Command "Start-Process powershell.exe -Verb RunAs -Wait -ArgumentList '-NoProfile -Command `"Set-NetIPInterface -InterfaceAlias <nowiki>''</nowiki>LAN_NIC<nowiki>''</nowiki>,<nowiki>''</nowiki>OpenVPN_NIC<nowiki>''</nowiki> -AddressFamily IPv4 -WeakHostReceive Disabled -WeakHostSend Disabled`"'"
powershell.exe -NoProfile -Command "Start-Process powershell.exe -Verb RunAs -Wait -ArgumentList '-NoProfile -Command `"Set-NetIPInterface -InterfaceAlias <nowiki>''</nowiki>LAN_NIC<nowiki>''</nowiki>,<nowiki>''</nowiki>OpenVPN_NIC<nowiki>''</nowiki> -AddressFamily IPv4 -WeakHostReceive Enabled -WeakHostSend Enabled`"'"
Set-NetIPInterface -InterfaceA 'LAN_NIC','OpenVPN_NIC' -Add IPv4 -WeakHostR Disabled -WeakHostS Disabled
Set-NetIPInterface -InterfaceA 'LAN_NIC','OpenVPN_NIC' -Add IPv4 -WeakHostR Enabled -WeakHostS Enabled
powershell.exe -NoP -C "Start-Process powershell.exe -Verb RunAs -Wai -A '-NoP -C `"Set-NetIPInterface -InterfaceA <nowiki>''</nowiki>LAN_NIC<nowiki>''</nowiki>,<nowiki>''</nowiki>OpenVPN_NIC<nowiki>''</nowiki> -Add IPv4 -WeakHostR Enabled -WeakHostS Enabled`"'"
powershell.exe -NoP -C "Start-Process powershell.exe -Verb RunAs -Wai -A '-NoP -C `"Set-NetIPInterface -InterfaceA <nowiki>''</nowiki>LAN_NIC<nowiki>''</nowiki>,<nowiki>''</nowiki>OpenVPN_NIC<nowiki>''</nowiki> -Add IPv4 -WeakHostR Disabled -WeakHostS Disabled`"'"