Thursday 11 January 2018

windows 7 - How do I share my Internet connection over Wi-Fi from the command line?


What is the command line that starts sharing the internet connection from LAN over Wi-Fi? I think it allows to set a specific network name and a password.


I remember it from some techie talk on a podcast, but they gave no specifics, and my friends told me it exists, though they couldn't remember it on the spot.



Answer



Update


For some reason, this won't work in Windows 8:



The hosted network couldn't be started.
The group or resource is not in the correct state to perform the requested operation.



I have not found a solution to this problem. The answer remains valid for Windows 7, though.




This feature is called hosted networks. On a Wi-Fi enabled computer running Windows 7, use the following commands in an elevated command prompt:



  • netsh wlan set hostednetwork mode=MODE ssid=SSID key=KEY keyusage=KEYUSAGE
    Changes access point settings. mode can be allow or disallow, specifying whether the access point is enabled. ssid is the name of the network; key is the encryption key used for accessing the network. keyusage can be persistent or temporary, indicating whether the key is kept or discarded after one use (the default is persistent). Note that WPA2-AES is used.

  • netsh wlan start hostednetwork
    Starts the access point.

  • netsh wlan stop hostednetwork
    Stops the access point.

  • netsh wlan show hostednetwork
    Shows the status of the access point.


To allow Internet access through the access point, open the properties for the adapter that provides the Internet connection under Change adapter settings in the Network and Sharing Center, then enable Internet Connection Sharing to the Microsoft Virtual WiFi Miniport Adapter that is providing the wireless connection, usually Wireless Network Connection 2.


Note that the access point created using this procedure uses infrastructure mode. For more information and technical details about hosted networks, see http://msdn.microsoft.com/en-us/library/windows/desktop/dd815243%28v=vs.85%29.aspx.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...