Windows: add netsh tethering #16

This commit is contained in:
Mikaela Suomalainen 2012-11-25 11:44:52 +02:00
parent fcb72e0a2b
commit 98a810b55a
2 changed files with 55 additions and 0 deletions

View File

@ -32,6 +32,24 @@ Interesting things to do with Windows
<p>If you cannot think any password for it, you can use same password as with your own account in emmergency like <a href="http://linuxmint.com/">Linux Mint</a> is doing. It uses the password of the user which was created in installation as root password. With <a href="http://ubuntu.com/">Ubuntu</a> root account is disabled by default and it can be enabled by running &quot;sudo passwd root&quot; and setting password.</p> <p>If you cannot think any password for it, you can use same password as with your own account in emmergency like <a href="http://linuxmint.com/">Linux Mint</a> is doing. It uses the password of the user which was created in installation as root password. With <a href="http://ubuntu.com/">Ubuntu</a> root account is disabled by default and it can be enabled by running &quot;sudo passwd root&quot; and setting password.</p>
<p><strong>You must set password for Administrator, because that account can do everything without User Access Control (UAC) prompts!</strong></p> <p><strong>You must set password for Administrator, because that account can do everything without User Access Control (UAC) prompts!</strong></p>
<p>Remember also to not use the Administrator account for general use.</p> <p>Remember also to not use the Administrator account for general use.</p>
<h2 id="tethering-connection-without-3rd-party-tools">Tethering connection without 3rd party tools</h2>
<p>This can be done with netsh, but the network doesn't have connection to internet at first.</p>
<p>First open cmd.exe as Administrator (activating administrator account). This requires normal user with administrator rights.</p>
<p>First allow tethering to be used and set SSID and password and start the network.</p>
<pre><code>netsh wlan set hostednetwork mode=allow ssid=mynetwork key=mypassword
netsh wlan start hostednetwork</code></pre>
<p>NOTE: If you get error about missing svchost service or something else, press Windows + R and run &quot;services&quot; and enable &quot;Wireless autoconfiguration&quot; or something like that.</p>
<p>NOTE2: If you get other error, disable the network card in adapter settings and enable it again. Then run &quot;netsh wlan start hostednetwork again&quot;.</p>
<p>NOTE3: If nothing helps, run &quot;netsh wlan show drivers&quot; and ensure that your network card supports hosted/virtual networks.</p>
<p>TODO: I must find out how to not have the network WPA2 secured. Leaving key=mypassword out doesn't seem to work.</p>
<iframe src="https://openwireless.org/widget/150x196/" width="150" height="196" frameborder="0"></iframe>
<h3 id="getting-internet-access-to-the-new-network.">Getting internet access to the new network.</h3>
<p>Right click the network icon on the taskbar and select &quot;open network and sharing center&quot;. Then select &quot;change adapter settings&quot; in the window which opens and right click the connection which you want to share. Click properties and then &quot;Sharing&quot;.</p>
<p>Share the connection using your new network which is something like &quot;Wireless Local Area Connection 2&quot; and uncheck &quot;let others manage this connection&quot;, but remember to keep &quot;let other users access the internet using this connection&quot; checked. Then click &quot;OK&quot; or &quot;apply&quot; and your tethered network has internet access.</p>
<p>To see devices which are currently connected to the network, run</p>
<pre><code>netsh wlan show hostednetwork</code></pre>
<p>The hosted network gets disabled on reboot, but you can enable it again by running &quot;netsh wlan start hostednetwork&quot; (as administrator). You don't need to do anything else, it remembers the shared network connection.</p>
<!-- vim : set ft=html --> <!-- vim : set ft=html -->
<hr/> <hr/>

View File

@ -61,6 +61,43 @@ If you cannot think any password for it, you can use same password as with your
Remember also to not use the Administrator account for general use. Remember also to not use the Administrator account for general use.
## Tethering connection without 3rd party tools
This can be done with netsh, but the network doesn't have connection to internet at first.
First open cmd.exe as Administrator (activating administrator account). This requires normal user with administrator rights.
First allow tethering to be used and set SSID and password and start the network.
```
netsh wlan set hostednetwork mode=allow ssid=mynetwork key=mypassword
netsh wlan start hostednetwork
```
NOTE: If you get error about missing svchost service or something else, press Windows + R and run "services" and enable "Wireless autoconfiguration" or something like that.
NOTE2: If you get other error, disable the network card in adapter settings and enable it again. Then run "netsh wlan start hostednetwork again".
NOTE3: If nothing helps, run "netsh wlan show drivers" and ensure that your network card supports hosted/virtual networks.
TODO: I must find out how to not have the network WPA2 secured. Leaving key=mypassword out doesn't seem to work.
<iframe src="https://openwireless.org/widget/150x196/" width="150" height="196" frameborder="0"></iframe>
### Getting internet access to the new network.
Right click the network icon on the taskbar and select "open network and sharing center". Then select "change adapter settings" in the window which opens and right click the connection which you want to share. Click properties and then "Sharing".
Share the connection using your new network which is something like "Wireless Local Area Connection 2" and uncheck "let others manage this connection", but remember to keep "let other users access the internet using this connection" checked. Then click "OK" or "apply" and your tethered network has internet access.
To see devices which are currently connected to the network, run
```
netsh wlan show hostednetwork
```
The hosted network gets disabled on reboot, but you can enable it again by running "netsh wlan start hostednetwork" (as administrator). You don't need to do anything else, it remembers the shared network connection.
<!-- vim : set ft=html --> <!-- vim : set ft=html -->
<hr/> <hr/>