How to create WIFI hotspot with second Wifi adapter - windows

I am currently developing an application for machines where we will need two wifi connections. The first one to be connected to a box (hardware data) and the other one for exchanging data between machines.
We have two wifi modules, the internal wifi card and an external USB wifi module (more powerful).
We would like to convert the strong external wifi to a Hotspot. The problem is, Windows creates by default the hotspot on the internal wifi adapter. Then the reception is weaker than if it was created on the external module.
I create the hospot with the following command lines:
netsh wlan set hostednetwork mode=allow
netsh wlan start hostednetwork
I even tried to disable the internal adapter but Windows still creates the hotspot on the internal adapter.
netsh interface set interface name="Internal Network" admin=disabled
netsh wlan set hostednetwork mode=allow
netsh wlan start hostednetwork
netsh interface set interface name="Internal Network" admin=enabled
I looked up everywhere and nobody seems to have an idea (or they just post back these very command lines without understanding the point).
Does anyone have an idea? Having the weak internal adapter signal is not an option.

After some verification it seems the driver the manufacturer gave me was the wrong version. "netsh wlan show drivers" gave me:
Hosted network supported: No
After communicating with them, they shipped the right driver version.

Related

netsh wlan start hostednetwork. The hosted network started. Stuck #Obtaining ip address

I can create hosted network via following commands:
netsh wlan set hostednetwork mode=allow
netsh wlan set hostednetwork ssid=lol key=cse093007 keyusage=persistent
netsh wlan start hostednetwork
But I m stuck # Obtaining ip address.
I can't turn on those following Two:
FIPS 140-2 mode supported : No
802.11w Management Frame Protection supported : No
Interface name: Wi-Fi
Driver : 802.11n/b/g 2cm Wireless LAN USB2.0 Adapter
Vendor : AboCom System, Inc.
Provider : Microsoft
Date : 30-Mar-13
Version : 1086.51.328.2013
INF file : net8192su64.inf
Type : Native Wi-Fi Driver
Radio types supported : 802.11n 802.11g 802.11b
FIPS 140-2 mode supported : No
802.11w Management Frame Protection supported : No
Hosted network supported : Yes
Authentication and cipher supported in infrastructure mode:
Open None
WPA2-Personal CCMP
Open WEP-40bit
Open WEP-104bit
Open WEP
WPA-Enterprise TKIP
WPA-Personal TKIP
WPA2-Enterprise TKIP
WPA2-Personal TKIP
WPA-Enterprise CCMP
WPA-Personal CCMP
WPA2-Enterprise CCMP
Vendor defined TKIP
Vendor defined CCMP
Authentication and cipher supported in ad-hoc mode:
Open None
Open WEP-40bit
Open WEP-104bit
Open WEP
WPA2-Personal CCMP
Wireless Display Supported: No (Graphics Driver: No, Wi-Fi Driver: No)
Sometimes DHCP on windows Ad-Hoc takes too long to assign IP address or sometimes it fails to do so.
So if DHCP is not working properly, use static IP on the client side.
Type ipconfig in command prompt and find the IP address of an interface named Microsoft Hosted Network Virtual Adapter.
Now, in the client system, use that IP as the default gateway and give the client IP address with first 3 fields same as the default gateway and giving a different number in the 4th field.
eg:
Default Gateway : 192.168.43.1
IP Address of client : 192.168.43.3
This fixed my issue. I forgot to share my wifi to hostednetwork.
To share you wifi with hostednetwork;-
go to network adapter settings
right-click on your default wifi adapter
click on properties
go to sharing tab
check on allow other user to connect to this computer
in drop down menu select your hostednetwork
You can try using a static IP address in Phone Wifi settings. Try the following settings.
IP Address: 192.168.137.2
Gateway: 192.168.137.1
DNS1: 8.8.8.8
DNS2: 8.8.4.4
The following procedure worked for me (windows 8.1)
1) Disable Internet Connection Sharing from your modem connection -> properties -> Sharing Tab
2) Enable it again.
3) Disconnect from the Internet.
4) Reconnect again
5) Restart ICS service from the "services.msc" window.
6) Stop the hostednetwork
7) Start the hostednetwork
8) Internet Sharing is now enabled and everything gets resolved.
Credit goes to Vekool
it also worked for me.
from here: https://superuser.com/questions/804227/how-to-get-assigned-ips-by-hostednetwork
I've also had this problem, and I solved it like this:
create a WiFi hotspot:
netsh wlan set hostednetwork mode=allow ssid=ProvaMi key=pippo123
netsh wlan start hostednetwork
Assign the hotspot a name in the "Network and sharing center > change adapter settings" (in my case: "TestWIFI")
Set a static IP address for the WiFi network:
netsh interface ip set address "TestWIFI" static 192.168.159.1 255.255.255.0 196.168.159.1
Now, using a program that provides a DHCP server on windows (http://www.dhcpserver.de/cms/), I configured the server to generate the
[SETTINGS]
IPPOOL_1=192.168.159.2-254
IPBIND_1=192.168.159.1
AssociateBindsToPools=1
Now, the DHCP server will update its own settings file (dhcpsrv.ini) with the IP address and the DNS name of any connected client.
Hope this helps.
Note: all the above (IP addresses, passwords, etc.) are examples for my test configuration. Of course you'd need to use your own settings.
Simply restarting the ICS service from the "services.msc" window will fix this. After which,
run:
netsh wlan stop host
netsh wlan start host

Hosted network not working windows 10

C:\WINDOWS\system32>netsh wlan show settings
Wireless LAN settings
Show blocked networks in visible network list: No
Only use GP profiles on GP-configured networks: No
Hosted network mode allowed in WLAN service: Yes
Allow shared user credentials for network authentication: Yes
Block period: Not Configured.
Auto configuration logic is enabled on interface "Wi-Fi"
MAC randomization disabled on interface Wi-Fi
From what I've read, this should mean I can then start the hosted network:
C:\WINDOWS\system32>netsh wlan set hostednetwork mode=allow ssid=AdHoc key=password
The hosted network mode has been set to allow.
The SSID of the hosted network has been successfully changed.
The user key passphrase of the hosted network has been successfully changed.
C:\WINDOWS\system32>netsh wlan start hostednetwork
The hosted network couldn't be started.
The group or resource is not in the correct state to perform the requested operation.
I have tried updating my network adapter driver "Intel dual Band wireless-AC 765", however it didn't fix it. From reading some of the other questions on this site, I noticed I don't have a driver called "Microsoft Hosted Network Virtual Adapter", could this be causing the issue? I'm not very competent at IT, so if I haven't explained myself clearly, just let me know so I can clarify.
For those who might encounter the same problem. This link helped me. Can't Start Hosted Network.
The following text is copied from the answer in the above link :
This happen after you disable via Control Panel -> network adapters ->
right click button on the virtual connection -> disable
To fix that go to Device Manager (Windows-key + x + m on windows 8),
then open the network adapters tree , right click button on Microsoft
Hosted Network Virtual Adapter and click on enable.
Try now with the command netsh wlan start hostednetwork with admin
privileges. It should work.
Note: If you don't see the network adapter with name 'Microsoft Hosted
Network Virtual Adapter' try on menu -> view -> show hidden devices in
the Device Manager window.
I had the same problem with that network card and I fixed it by installing the app Wifi Direct Access Point from the Microsoft Store. It looks like is a driver issue, HostedNetwork is not well supported by Windows 10 on some hardware.

how to redirect network traffic in windows 8 to burp suite?

I have googled for this days and days. I have tried a lot of things but unfortunately did not succeed with any of them.
I have burp suite on my laptop running and listening to port 8080 on 127.0.0.1 as localhost, in order to intercept request from my iPhone I created Adhoc network which has ip addresses like this 192.168.137.xx.
My iPhone did connect to the Internet via the Adhoc network but I could not intercept any HTTP request in burp suite, I don't know what to do with this, I am totally frustrated.
In my iPhone network settings I defined proxy server which has the IP of my laptop running the burp suite which is 10.0.0.3 and the port 8080 but nothing is intercepted by burp what do I miss here?
Firstly, we must make sure that we share the wifi on the windows computer correctly.
> netsh wlan set hostednetwork mode=allow ssid="<SSID>" key="<PASSWORD>"
> netsh wlan start hostednetwork
You can take a look at all the steps.
After sharing wifi, we need to connect with the phone and check that we have IP address.
if there is no problem we can go to burp suite settings.
In the Burp suite proxy options we have to select the proxy listeners setting all interfaces option.

Enable Ipv4 Autoconfiguration through Cmd

At school I've got a Wifi configured with Isa authentication. So everytime I have to connect my laptop with it, I have to configure the static ip address (Network adapter -> Ipv4 properties) and enable the proxy (internet settings -> Lan Settings -> Proxy) in order to get access to the internet. However the process is easy but it's kind of sticky. The whole thing takes up to around 1 to 2 minutes, and when I'm back home I have to disable all the settings in order to use my home Wifi.
So I decided to make 2 scripts in order to automatize enabling and disabling of the process explained above.
I'm using AutoIt for the purpose.
I've already done the script in order to enable the ipv4 settings using cmd's netsh command.
For the proxy stuff i've used a registry script in order to:
Enable, Modify, Disable
So for the proxy it's all easy.
My problem is disabling the static ipv4 configuration.
The reset command for netsh is not working cause that just removes the static settings butt does not turn on the automatic configuration.
Image describing problem:
What I want to achieve is somehow enable those 2 radio buttons through cmd script or any registry script.
And I repeat again the netsh reset command just removes all the static ip's but does not enable the automatic ip settings!
How can I achieve this?
Command netsh int ip reset is supposed to reset TCP/IP networking as a whole when normal configuration or even networking in general does not work anymore, and seem to require a reboot to work. This is not recommended for your purposes.
Instead you need your computer configured to obtain network configuration from DHCP-server, which is a program that probably runs on your wireless router.
IP-address
In examples below please substitute Wi-Fi with network adaptor name as specified in Network connections control panel window. Yours seems to be named Connettione nete wireless so replace Wi-Fi with that but keep double quotes. If you need to obtain that name automatically please refer to this question.
Following commands reset configuration to Obtain an IP address automatically and Obtain DNS server address automatically:
netsh interface ipv4 set address name="Wi-Fi" source=dhcp
netsh interface ipv4 set dnsservers name="Wi-Fi" source=dhcp
Following commands configure static IP address and DNS-servers:
netsh interface ipv4 set address name="Wi-Fi" static 192.168.1.2 255.255.255.0 192.168.1.1
netsh interface ipv4 set dns name="Wi-Fi" static 8.8.8.8
netsh interface ipv4 set dns name="Wi-Fi" static 8.8.4.4 index=2
The order of addresses in above example is the same as in the network configuration window.
For more information you may read these: DHCP, DNS, static IP
Proxy server
To enable proxy server (the global one in Internet properties)
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" ^
/v ProxyEnable /t REG_DWORD /d 1 /f
To disable proxy:
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" ^
/v ProxyEnable /t REG_DWORD /d 0 /f
If this does not work please try other solutions here.
Some programs may not use system-wide proxy settings and thus require additional configuration. For example this question deals with Firefox.
Enable/disable wireless
Following command is useful to enable the wireless adaptor if it was disabled beforehand (i.e. to conserve battery life):
netsh interface set interface name="Wi-Fi" admin=ENABLED
And this is how to disable it:
netsh interface set interface name="Wi-Fi" admin=DISABLED
netsh interface ip set address "Wi-Fi" dhcp
netsh interface ip set dns "Wi-Fi" dhcp
netsh interface set interface "Wi-Fi" enable

How to find advanced info about a network I am connected to?

I currently have a laptop connected to a WPA2 Enterprise wireless network, and I'm trying to connect a new device. There's no wireless set-up guide for the type of device I'm trying to connect, so I would like to manually enter in all the necessary settings. I need to know:
EAP Method (PEAP vs. TTLS)
Phase 2 Authentication if applicable (PAP vs. MSCHAPv2)
CA Certificate if applicable
Connection type (DHCP vs. Static)
If connection type is Static, I would need to know:
IP Address
Subnet Mask
Router
DNS
My assumption is that because I already have access to a laptop connected to / set up for the same network, there must be some way to retrieve that information about the network from my laptop while connected. Is there a way to do this? I'm using windows 8.
You can access to the wireless network configuration of the connected machine. For that you can navegate throught the gui or you can type in run (windows key+R) "ncpa.cpl". This command open directly the appropiate window. Double click the wireless connection and click on details, and you can see if this machine is connected using dhcp or static ip, ip address, mask, ... and in wireless properties button, security tab you can see the other details (EAP method, etc)
http://www.howto-connect.com/how-to-find-wifi-password-in-windows-8/

Resources