How to setup firewall to allow internet connection sharing via Wifi USB stick?

Posted by hannanaha on Super User See other posts from Super User or by hannanaha
Published on 2012-11-17T22:16:19Z Indexed on 2012/11/17 23:07 UTC
Read the original article Hit count: 224

I have a Windows8 computer linked to the internet via an ethernet cable ("Ethernet" network connection). I have attached to it a DLink Wifi USB stick, and I'm trying to share the main PC's internet connection with my Android phone via a local wifi network. I am using the following batch file to set up this network:

netsh wlan set hostednetwork mode=allow ssid=MyWifiName key=password keyUsage=persistent
netsh wlan start hostednetwork 

After I run this script, I can see a new network connection appear in "Control Panel\Network and Internet\Network Connections" named "Local Area Connection *12", and I can see "MyWifiName" on the Android phone. The device name for this connection on the PC is "Microsoft Hosted Network Virtual Adapter". I also set up the "Ethernet" connection to share Internet with "Local Area Connection *12".

However, the Android phone usually doesn't manage to obtain an IP from the wireless network, and when it does, there still seems to be no connectivity to the internet. When I turn off the Windows Firewall completely, or even just for "Local Area Connection *12", the Android connection is perfect.

My questions are:

  1. How should I set up the Windows firewall to allow the phone to connect properly? Is there a specific rule I need to add to the Windows firewall advanced settings? [Note: the above method worked great in Windows 7, without any specific tinkering with the firewall].

  2. Is it safe to turn off the firewall specifically for the "Local Area Connection *12" (the wifi connection) if the main Ethernet connection is still protected by the firewall?

Thanks in advance.

© Super User or respective owner

Related posts about wireless-networking

Related posts about windows-8