Fixing Windows "connection unsuccessful"

Posted by skilo 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Fixing Windows "connection unsuccessful"
September 14, 2013 05:11PM
So i was just wondering if there is a way to fix the windows error message "connection unsuccessful" Windows always displays this message when it detect the AP has no internet connectivity?

I was thinking maybe windows must try to ping microsoft.com upon connecting to an AP to determine internet connectivity, If this is the case then maybe we can enter in a dnsmaq rule to tell the windows client that microsoft.com is at 192.168.1.1

If so this would eliminate that error message for windows clients and make the process of connecting to the AP more seamless.

I think this is important for most users because people that are less tech savvy will just assume that the connect failed and will not bother trying to go to a website and thus never be redirected to the piratebox page.

Is there a way to fix this?

EDIT*
This explains it a bit more: [blog.superuser.com]



Edited 1 time(s). Last edit at 09/14/2013 05:31PM by skilo.
Re: Fixing Windows "connection unsuccessful"
September 15, 2013 06:20AM
Hello!

Yes I talked with MaStr a good while ago about this.

If I remember correctly, if you make the IP of [www.msftncsi.com] resolve to localhost on the PB and then create the ncsi.txt file with the single line in it (I think in the www directory of the Pcool smiley then Windows is tricked into thinking that the PirateBox AP has internet. Hence it will not display any error messages on the tray etc.

I have already tested this on my box and it works.
Re: Fixing Windows "connection unsuccessful"
September 15, 2013 01:41PM
Which file do i need to edit? /etc/hosts/ or dnsmaq.config ?
Re: Fixing Windows "connection unsuccessful"
September 15, 2013 04:15PM
Well so far i edited /etc/hosts and added

127.0.0.1 msftncsi.com localhost .
192.168.1.1 msftncsi.com

It seems to be working somewhat, I have varying results with it, Sometimes i connect and it doesn't give the error message and sometimes it does, I think this is because windows does 2 verification methods to detect the WAN IP, The first is look for the ncsi.txt file and the other is a dns lookup of dns.msftncsi.com which must resolve to the correct IP it has on file or it throws an error.

It seems to alternate between the 2 methods sort of randomly.

This is of course explained in the link i posted.



Edited 1 time(s). Last edit at 09/15/2013 04:17PM by skilo.
Re: Fixing Windows "connection unsuccessful"
September 16, 2013 04:34PM
Sorry I'm abroad and not checking the forums too often.

I don't remember the 2 factor internet access verification process. I think after I made the changes, my windows machine just said it is connected to the internet.

I think we had either a topic on this or there was something in the modification list on http://piratebox.aod-rpg.de. I can't seem to find it though...I'll let you know when I have it.

There is some talk on the same issue in this thread.

Check out MaStr's Github as wlel on Piratebox_webserver. This is the commit for tricking Windows.
Re: Fixing Windows "connection unsuccessful"
September 16, 2013 06:52PM
Well, theoretically it shoudl work like the box delivers it.
The original post about that was with delivering the correct ip, which -obviously- won't work without internet. ..

So I'm clueless what the exact problem is. Can somebody do some useful packet-traces and analytics about that?