7

Since updating to Windows 10 1607 (the "Anniversary Update") my shared WiFi adapter isn't shared any more.

I share the WiFi connection with a Hyper-V switch so that my VMs have Internet access via the Surface Pro 2's WiFi connection. But since the update, this only works after manually disabling and re-enabling Internet Connection Sharing. Otherwise the internet sharing doesn't work even though the option is set in WiFi properties.

An ideas?

Internet Connection Sharing

6

This is a script that I use now and it works:

param(
    $sPublicAdapterName,
    $sPrivateAdapterName
)

if (!$sPrivateAdapterName) {
    Write-Host "EnableSharing.ps1 sPublicAdapterName sPrivateAdapterName"
    return
}#if

# Constants
$public = 0
$private = 1

Write-Host "Creating netshare object..."
$netshare = New-Object -ComObject HNetCfg.HNetShare

Write-Host "Getting public adapter..."
$publicadapter = $netshare.EnumEveryConnection | Where-Object {
    $netshare.NetConnectionProps($_).Name -eq $sPublicAdapterName
}#foreach

Write-Host "Getting private adapter..."
$privateadapter = $netshare.EnumEveryConnection | Where-Object {
    $netshare.NetConnectionProps($_).Name -eq $sPrivateAdapterName
}#foreach

Write-Host "Disabling and enabling public sharing for public adapter...."
$netshare.INetSharingConfigurationForINetConnection($publicadapter).DisableSharing()
$netshare.INetSharingConfigurationForINetConnection($publicadapter).EnableSharing($public)
$netshare.INetSharingConfigurationForINetConnection($publicadapter)

Write-Host "Disabling and enabling private sharing for private adapter...."
$netshare.INetSharingConfigurationForINetConnection($privateadapter).DisableSharing()
$netshare.INetSharingConfigurationForINetConnection($privateadapter).EnableSharing($private)
$netshare.INetSharingConfigurationForINetConnection($privateadapter)

# Clean up
Remove-Variable netshare
  • It's the script linked to by @Dmitriy Bykov above slightly modified. – Andrew J. Brehm Sep 9 '16 at 21:10
  • Question - what exactly are sPublicAdapterName and sPrivateAdapterName, how do I know the correct names? (by the way, I asked this question, but nothing works for me after the anniversary update) – Kobi Sep 24 '16 at 15:53
  • 1
    They are the adapter names as given by ipconfig.exe or the Network Connections control panel. sPublicAdapterName is the one connected to the outer network (ultimately the Internet), sPrivateAdapterName is the one you want to share the connection on. On my Surface Pro they are called Wifi and vEthernet since I am sharing the Internet connection of the Wifi network with the Hyper-V network inside the tablet. – Andrew J. Brehm Oct 1 '16 at 20:01
  • @AndrewJ.Brehm could you be more specific how to set this up? I am not Windows 8+ (super)user but I am the only one that can help my friend. Could you please make screenshot with ipconfig and circle whole name that should be put as parameter. What if my "private" network is always "Unidentified Network" - but ping between the machines work. host - 192.168.137.1, client - 192.168.137.x – Kyslik Oct 2 '16 at 18:04
  • From user Jzep: In which application do I have to run the code and where exactly do I have to enter my adapter names? Do I only need to replace sPublicAdapterName and sPrivateAdapterName? Do I only need to replace the part where "Name" stands? – fixer1234 Dec 2 '18 at 0:12
4

I have the same problem.

After reboot the "Internet Connection Sharing" doesn't start, its startup state set to Manual (Triggered). But even if I start it manually or set startup state to "Automatic", the service starts and keeps working, but there is no Internet access in my home network until I disable and re-enable ICS on my WAN interface.

I triple checked this behavior by clean installation of W10 build 1607, it acts always the same. I tried different driver versions for my network adapters - default from Windows Update, latest version from Intel website and latest drivers provided by my laptop manufacturer - the problem still exists.

I also made a clean installation of W10 build 1511 and the Internet Connection Sharing was working perfect, until I installed the Anniversary Update. After upgrade, ICS service startup state was set to "Automatic" and it was started on system startup, but the internet access in my home network didn't work until disabling/re-enabling the ICS on WAN interface.

Funny thing - Internet Connection Sharing definitely worked just fine on my old laptop with Windows 10 build 1607, but now I sold it and I there's no way to find a difference in configuration to figure out the problem. I faced this problem only after I bought my current laptop (Dell Precison M4800) a week ago. But since I tried clean Windows installation and different drivers I don't think its related only to my computer, especially because there are another people having this problem after Anniversary Update:

http://answers.microsoft.com/en-us/windows/forum/windows_10-networking/ics-internet-connection-sharing-dosent-work-in/a203c90f-1214-4e5e-ae90-9832ae5ceb55

http://answers.microsoft.com/en-us/windows/forum/windows_10-networking/internet-connection-sharing-no-longer-works-ver/1c8ffdff-84e8-4124-b1a5-379df6eb2959

So reverting to Win10 build 1511 seems to be the only solution at the moment.

UPD: Here is a workaround - you can schedule running a script each time the computer starts, which will disable and re-enable ICS on desired interfaces.

You can take a script from this thread: How to enable Internet Connection Sharing using command line?

2

I've had the same issue today. Its working again now, but I'm not sure exactly what fixed it.

I had compared the ICS settings with another computer which hadn't had the anniversary update (and ICS worked fine) and they were exactly the same.

The things which most likely sorted it were:

  1. Manually started the Internet Connection Sharing service

  2. Windows Defender had a definitions update via Windows Update

I also plugged a laptop into the computer where ICS wasn't working to test if it could be assigned an IP address and access the Internet. It started working straight away and since then, the original device (a VOIP phone) has also worked fine.

Sorry I can't be more specific, but hopefully this will be of some use!

  • Just thought I'd add, I share a WiFi connection to a VOIP phone plugged into my computer's Ethernet port. – playerone Aug 8 '16 at 16:16
0

The problem is in your firewall's advanced settings. Click on "Windows Firewall Properties", then for public profile, the inbound connections is set to "Block all connections" instead of "Block (default). Set it to "Block (default)". Verify your fix at the guest computer by running ping 192.168.137.1, or whatever ip that you have it manually set to.

  • 1
    How would changing settings in the firewall re-activate Internet Sharing when it is off? – Andrew J. Brehm Jan 3 '17 at 10:19
  • @AndrewJ.Brehm The firewall and ICS have some common components or are the same thing in Windows (and other OSes - NAT & firewall are both done by iptables for example). After setting up ICS, some special and unmodifiable rules show up in the firewall, and they are not firewall rules, they are NAT rules. – Tiberiu-Ionuț Stan Aug 31 '17 at 6:43
  • Did you see the working solution? Nothing to do with the Firewall. – Andrew J. Brehm Sep 1 '17 at 19:51

protected by Community Jan 18 '18 at 13:58

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.