loxia01 / PSInternetConnectionSharing

This PowerShell Module provides simple functions to control Windows Internet Connection Sharing (ICS) from command line.
47 stars 8 forks source link

Set-Ics is not working with a VPN connection with a device manufacturer being "WireGuard LLC" #6

Open 333van opened 3 weeks ago

333van commented 3 weeks ago

I am trying to share a VPN connection with a device manufacturer being "WireGuard LLC" in my VM to my host computer, via a NIC with host-only network. The VPN is a close-souce one. The ICS can be done manually via ncpa.cpl, but not possible via, for example:

Install-Module -Name PSInternetConnectionSharing
Set-Ics -PublicConnectionName $VpnConn -PrivateConnectionName $HostOnlyConn
# these are the error messages Set-Ics gives me:
OperationStopped: An event was unable to invoke any of the subscribers (0x80040201)
OperationStopped: An event was unable to invoke any of the subscribers (0x80040201)

That host-only NIC is configured with an interface with a fixed IP, and the above commands clear its IP configuration as well.

Any help would be appreciated.

loxia01 commented 3 weeks ago

Thanks for reporting. Unfortunately I cannot test this setup. Have not experienced these error messages before. Tested to share a regular WireGuard tunnel connection and that worked fine on my Windows 10 system (no VM:s involved though).