WifiWizard2 icon indicating copy to clipboard operation
WifiWizard2 copied to clipboard

Getting rid of that 'no internet, do you you want to remain connected?' popup

Open simonkincaidkintronix opened this issue 5 years ago • 3 comments

@tripflex

This isn't an issue but I didn't know where to put it.

I think it's an important fix for IoT devices when the handheld connects to an access point with no internet access.

We tried the DNS spoofing on the IoT device and think this works to some extent.

My app does not regularly lose connection anymore, although is going in for more testing.

After a lot of research over time, I did find a very simple solution although it is really only relevant to enterprise situations where you can dictate the system to a small extent.

If/When you get the message 'no internet access' do you want to continue ... you can long press the notification and turn it to silent.

If you can include this step in the setup process for your enterprise shipping, then this annoying popup can be removed.

Sorry if this was already obvious, but wanted it to be stated somewhere.

Do with it as you wish :-)

simonkincaidkintronix avatar Jul 11 '19 09:07 simonkincaidkintronix

@simonkincaidkintronix Do you have more information on your DNS spoofing setup.

We have been tesing DNS spoofing but appear to be missing something.

nginx config:

server {
   listen 80;
   server_name clients1.google.com;
   server_name clients3.google.com;
   server_name connectivitycheck.android.com;
   server_name connectivitycheck.gstatic.com;
   server_name .google.com;
   server_name .googleapis.com;

   location / {
        add_header Content-Length 0;
        add_header Connection "";
        keepalive_timeout 0;
        return 204;
   }
}

You may also need to dnsmasq individual domains (we didnt need to):

address=/clients1.google.com/192.168.42.1
address=/clients3.google.com/192.168.42.1
address=/connectivitycheck.android.com/192.168.42.1
address=/connectivitycheck.gstatic.com/192.168.42.1

We can see the request come in, and gets a 204 response - but the phone still thinks it's not connected to the internet.

07:41:14.386994 IP 192.168.42.1.67 > 192.168.42.81.68: BOOTP/DHCP, Reply, length 300
E..H....@.....*...*Q.C.D.4X`....W.............*Q..*......c.?............................................................................................................................................................................................................c.Sc5..6...*.3.....:.....;....N..........*.....*.....*..........
07:41:14.399801 IP 192.168.42.1.67 > 192.168.42.81.68: BOOTP/DHCP, Reply, length 300
E..H....@.....*...*Q.C.D.4U`....W.............*Q..*......c.?............................................................................................................................................................................................................c.Sc5..6...*.3.....:.....;....N..........*.....*.....*..........
07:41:14.586942 ARP, Request who-has 192.168.42.1 tell 192.168.42.81, length 28
.........c.?....*Q........*.
07:41:14.587095 ARP, Reply 192.168.42.1 is-at cc:b8:a8:b7:84:3e, length 28
.............>..*..c.?....*Q
07:41:14.594884 IP 192.168.42.81.39360 > 192.168.42.1.53: 27781+ A? connectivitycheck.gstatic.com. (47)
E..KN.@[email protected]..*Q..*....5.7..l............connectivitycheck.gstatic.com.....
07:41:14.595661 IP 192.168.42.1.53 > 192.168.42.81.39360: 27781* 1/0/0 A 192.168.42.1 (63)
E..[..@[email protected](..*...*Q.5...G..l............connectivitycheck.gstatic.com...................*.
07:41:14.596376 IP 192.168.42.81.43804 > 192.168.42.1.53: 22200+ A? www.google.com. (32)
E..<N.@[email protected]..*Q..*....5.(.IV............www.google.com.....
07:41:14.597787 IP 192.168.42.1.53 > 192.168.42.81.43804: 22200* 1/0/0 A 192.168.42.1 (48)
E..L..@[email protected]..*...*Q.5...8i.V............www.google.com...................*.
07:41:14.612604 IP 192.168.42.81.38935 > 192.168.42.1.80: Flags [S], seq 4050031165, win 65535, options [mss 1460,sackOK,TS val 7700560 ecr 0,nop,wscale 9], length 0
E..<.m@[email protected]...*Q..*....P.f.=...................
.u.P.......
07:41:14.613045 IP 192.168.42.1.80 > 192.168.42.81.38935: Flags [S.], seq 571526286, ack 4050031166, win 7584, options [mss 960,sackOK,TS val 4100065988 ecr 7700560,nop,wscale 3], length 0
E..<..@[email protected]...*...*Q.P.."....f.>...............
.b
..u.P....
07:41:14.614116 IP 192.168.42.81.49956 > 192.168.42.1.443: Flags [S], seq 3394029236, win 65535, options [mss 1460,sackOK,TS val 7700560 ecr 0,nop,wscale 9], length 0
E..<F.@[email protected]..*Q..*..$...L.....................
.u.P.......
07:41:14.614410 IP 192.168.42.1.443 > 192.168.42.81.49956: Flags [R.], seq 0, ack 3394029237, win 0, length 0
E..(..@[email protected]..*...*Q...$.....L..P....K..
07:41:14.624712 IP 192.168.42.81.38935 > 192.168.42.1.80: Flags [.], ack 1, win 172, options [nop,nop,TS val 7700563 ecr 4100065988], length 0
E..4.n@[email protected]...*Q..*....P.f.>"..............
.u.S.b
.
07:41:14.639535 IP 192.168.42.81.38935 > 192.168.42.1.80: Flags [P.], seq 1:233, ack 1, win 172, options [nop,nop,TS val 7700564 ecr 4100065988], length 232: HTTP: GET /generate_204 HTTP/1.1
E....o@[email protected]...*Q..*....P.f.>"..............
.u.T.b
.GET /generate_204 HTTP/1.1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.32 Safari/537.36
Host: connectivitycheck.gstatic.com
Connection: Keep-Alive
Accept-Encoding: gzip


07:41:14.639896 IP 192.168.42.1.80 > 192.168.42.81.38935: Flags [.], ack 233, win 1082, options [nop,nop,TS val 4100066015 ecr 7700564], length 0
E..4..@.@..(..*...*Q.P.."....f.&...:.@.....
.b
..u.T
07:41:14.640460 IP 192.168.42.1.80 > 192.168.42.81.38935: Flags [P.], seq 1:122, ack 233, win 1082, options [nop,nop,TS val 4100066016 ecr 7700564], length 121: HTTP: HTTP/1.1 204 No Content
E.....@.@.....*...*Q.P.."....f.&...:Hl.....
.b
..u.THTTP/1.1 204 No Content
Server: openresty
Date: Mon, 30 Sep 2019 07:41:14 GMT
Connection: close
Content-Length: 0


07:41:14.640511 IP 192.168.42.81.39202 > 192.168.42.1.53: 11717+ A? mtalk.google.com. (34)
E..>N.@[email protected]..*Q..*..".5.*h.-............mtalk.google.com.....
07:41:14.640912 IP 192.168.42.1.80 > 192.168.42.81.38935: Flags [F.], seq 122, ack 233, win 1082, options [nop,nop,TS val 4100066016 ecr 7700564], length 0
E..4..@.@..&..*...*Q.P.."....f.&...:.......
.b
..u.T
07:41:14.641436 IP 192.168.42.1.53 > 192.168.42.81.39202: 11717* 1/0/0 A 192.168.42.1 (50)
E..N..@[email protected]..*...*Q.5.".:9.-............mtalk.google.com...................*.
07:41:14.645839 IP 192.168.42.81.38935 > 192.168.42.1.80: Flags [.], ack 122, win 172, options [nop,nop,TS val 7700569 ecr 4100066016], length 0
E..4.p@[email protected]...*Q..*....P.f.&"........O.....
.u.Y.b
.
07:41:14.646650 IP 192.168.42.81.38935 > 192.168.42.1.80: Flags [F.], seq 233, ack 123, win 172, options [nop,nop,TS val 7700569 ecr 4100066016], length 0
E..4.q@[email protected]...*Q..*....P.f.&".. .....M.....
.u.Y.b
.
07:41:14.646950 IP 192.168.42.1.80 > 192.168.42.81.38935: Flags [.], ack 234, win 1082, options [nop,nop,TS val 4100066022 ecr 7700569], length 0
E..4..@.@..%..*...*Q.P.."..     .f.'...:.......
.b
..u.Y
07:41:14.648943 IP 192.168.42.81.37149 > 192.168.42.1.5228: Flags [S], seq 3662476699, win 65535, options [mss 1460,sackOK,TS val 7700571 ecr 0,nop,wscale 9], length 0
E..<u.@[email protected]..*Q..*....l.L..........|..........
.u.[.......
07:41:14.649230 IP 192.168.42.1.5228 > 192.168.42.81.37149: Flags [R.], seq 0, ack 3662476700, win 0, length 0
E..(..@[email protected]..*...*Q.l.......L..P...d...
07:41:14.651381 IP 192.168.42.81.38938 > 192.168.42.1.80: Flags [S], seq 3089591617, win 65535, options [mss 1460,sackOK,TS val 7700571 ecr 0,nop,wscale 9], length 0
E..<..@[email protected]...*Q..*....P.'mA........3..........
.u.[.......
07:41:14.651695 IP 192.168.42.1.80 > 192.168.42.81.38938: Flags [S.], seq 2523874808, ack 3089591618, win 7584, options [mss 960,sackOK,TS val 4100066027 ecr 7700571,nop,wscale 3], length 0
E..<..@[email protected]...*...*Q.P...oE..'mB....<J.........
.b
..u.[....
07:41:14.654217 IP 192.168.42.81.38938 > 192.168.42.1.80: Flags [.], ack 1, win 172, options [nop,nop,TS val 7700572 ecr 4100066027], length 0
E..4..@[email protected]...*Q..*....P.'mB.oE............
.u.\.b
.
07:41:14.656373 IP 192.168.42.81.38938 > 192.168.42.1.80: Flags [P.], seq 1:213, ack 1, win 172, options [nop,nop,TS val 7700572 ecr 4100066027], length 212: HTTP: GET /gen_204 HTTP/1.1
E.....@[email protected]..*Q..*....P.'mB.oE.....<n.....
.u.\.b
.GET /gen_204 HTTP/1.1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.32 Safari/537.36
Host: www.google.com
Connection: Keep-Alive
Accept-Encoding: gzip


07:41:14.656629 IP 192.168.42.1.80 > 192.168.42.81.38938: Flags [.], ack 213, win 1082, options [nop,nop,TS val 4100066032 ecr 7700572], length 0
E..4..@[email protected]...*...*Q.P...oE..'n....:.......
.b
..u.\
07:41:14.657028 IP 192.168.42.1.80 > 192.168.42.81.38938: Flags [P.], seq 1:122, ack 213, win 1082, options [nop,nop,TS val 4100066032 ecr 7700572], length 121: HTTP: HTTP/1.1 204 No Content
E.....@[email protected]'..*...*Q.P...oE..'n....:.......
.b
..u.\HTTP/1.1 204 No Content
Server: openresty
Date: Mon, 30 Sep 2019 07:41:14 GMT
Connection: close
Content-Length: 0


07:41:14.657211 IP 192.168.42.1.80 > 192.168.42.81.38938: Flags [F.], seq 122, ack 213, win 1082, options [nop,nop,TS val 4100066033 ecr 7700572], length 0
E..4..@[email protected]...*...*Q.P...oFr.'n....:./.....
.b
..u.\
07:41:14.659575 IP 192.168.42.81.38133 > 192.168.42.1.53: 14626+ A? alt7-mtalk.google.com. (39)
E..CN.@[email protected]..*Q..*....5./..9"..........
alt7-mtalk.google.com.....
07:41:14.660184 IP 192.168.42.1.53 > 192.168.42.81.38133: 14626* 1/0/0 A 192.168.42.1 (55)
E..S..@[email protected]+..*...*Q.5...?y\9"..........
alt7-mtalk.google.com...................*.
07:41:14.660549 IP 192.168.42.81.38938 > 192.168.42.1.80: Flags [.], ack 122, win 172, options [nop,nop,TS val 7700574 ecr 4100066032], length 0
E..4..@[email protected]...*Q..*....P.'n..oFr...........
.u.^.b
.
07:41:14.661698 IP 192.168.42.81.38938 > 192.168.42.1.80: Flags [F.], seq 213, ack 123, win 172, options [nop,nop,TS val 7700574 ecr 4100066033], length 0
E..4..@[email protected]...*Q..*....P.'n..oFs...........
.u.^.b
.
07:41:14.662017 IP 192.168.42.1.80 > 192.168.42.81.38938: Flags [.], ack 214, win 1082, options [nop,nop,TS val 4100066037 ecr 7700574], length 0
E..4..@[email protected]...*...*Q.P...oFs.'n....:.(.....
.b
..u.^
07:41:14.684550 IP 192.168.42.81.37151 > 192.168.42.1.5228: Flags [S], seq 1723270465, win 65535, options [mss 1460,sackOK,TS val 7700578 ecr 0,nop,wscale 9], length 0
E..<.#@.@.....*Q..*....lf..A...................
.u.b.......
07:41:14.684969 IP 192.168.42.1.5228 > 192.168.42.81.37151: Flags [R.], seq 0, ack 1723270466, win 0, length 0
E..(..@[email protected]..*...*Q.l......f..BP.......
07:41:15.702114 IP 192.168.42.81.49960 > 192.168.42.1.443: Flags [S], seq 598281282, win 65535, options [mss 1460,sackOK,TS val 7700880 ecr 0,nop,wscale 9], length 0
E..<..@[email protected]..*Q..*..(..#..B...................
.u.........
07:41:15.702470 IP 192.168.42.1.443 > 192.168.42.81.49960: Flags [R.], seq 0, ack 598281283, win 0, length 0
E..(..@[email protected]..*...*Q...(....#..CP....]..
07:41:15.703316 IP 192.168.42.81.38940 > 192.168.42.1.80: Flags [S], seq 703574089, win 65535, options [mss 1460,sackOK,TS val 7700880 ecr 0,nop,wscale 9], length 0
E..<1.@[email protected]@..*Q..*....P)..I........}..........
.u.........
07:41:15.703675 IP 192.168.42.1.80 > 192.168.42.81.38940: Flags [S.], seq 2600646696, ack 703574090, win 7584, options [mss 960,sackOK,TS val 4100067079 ecr 7700880,nop,wscale 3], length 0
E..<..@[email protected]...*...*Q.P.....()..J.....d.........
.b...u......
07:41:15.709564 IP 192.168.42.81.38940 > 192.168.42.1.80: Flags [.], ack 1, win 172, options [nop,nop,TS val 7700889 ecr 4100067079], length 0
E..41.@[email protected]..*Q..*....P)..J...)....U#.....
.u...b..
07:41:15.711514 IP 192.168.42.81.38940 > 192.168.42.1.80: Flags [P.], seq 1:233, ack 1, win 172, options [nop,nop,TS val 7700889 ecr 4100067079], length 232: HTTP: GET /generate_204 HTTP/1.1
E...1.@[email protected]^..*Q..*....P)..J...).....7.....
.u...b..GET /generate_204 HTTP/1.1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.32 Safari/537.36
Host: connectivitycheck.gstatic.com
Connection: Keep-Alive
Accept-Encoding: gzip


07:41:15.711690 IP 192.168.42.1.80 > 192.168.42.81.38940: Flags [.], ack 233, win 1082, options [nop,nop,TS val 4100067087 ecr 7700889], length 0
E..4..@[email protected]..*...*Q.P.....))..2...:P......
.b...u..
07:41:15.712162 IP 192.168.42.1.80 > 192.168.42.81.38940: Flags [P.], seq 1:122, ack 233, win 1082, options [nop,nop,TS val 4100067088 ecr 7700889], length 121: HTTP: HTTP/1.1 204 No Content
E.....@.@.....*...*Q.P.....))..2...:.......
.b...u..HTTP/1.1 204 No Content
Server: openresty
Date: Mon, 30 Sep 2019 07:41:15 GMT
Connection: close
Content-Length: 0


07:41:15.712351 IP 192.168.42.1.80 > 192.168.42.81.38940: Flags [F.], seq 122, ack 233, win 1082, options [nop,nop,TS val 4100067088 ecr 7700889], length 0
E..4..@[email protected]..*...*Q.P......)..2...:P*.....
.b...u..
07:41:15.715286 IP 192.168.42.81.38940 > 192.168.42.1.80: Flags [.], ack 122, win 172, options [nop,nop,TS val 7700890 ecr 4100067088], length 0
E..41.@[email protected]..*Q..*....P)..2........S......
.u...b..
07:41:15.716579 IP 192.168.42.81.38940 > 192.168.42.1.80: Flags [F.], seq 233, ack 123, win 172, options [nop,nop,TS val 7700891 ecr 4100067088], length 0
E..41.@[email protected]..*Q..*....P)..2........S......
.u...b..
07:41:15.716768 IP 192.168.42.1.80 > 192.168.42.81.38940: Flags [.], ack 234, win 1082, options [nop,nop,TS val 4100067092 ecr 7700891], length 0
E..4..@[email protected]..*...*Q.P......)..3...:P#.....
.b...u..
07:41:15.722652 IP 192.168.42.81.38942 > 192.168.42.1.80: Flags [S], seq 1795174440, win 65535, options [mss 1460,sackOK,TS val 7700893 ecr 0,nop,wscale 9], length 0
E..<..@[email protected]..*Q..*....Pk.0(...................
.u.........
07:41:15.722898 IP 192.168.42.1.80 > 192.168.42.81.38942: Flags [S.], seq 3058527219, ack 1795174441, win 7584, options [mss 960,sackOK,TS val 4100067098 ecr 7700893,nop,wscale 3], length 0
E..<..@[email protected]...*...*Q.P...Mk.k.0)....{<.........
.b...u......
07:41:15.725911 IP 192.168.42.81.38942 > 192.168.42.1.80: Flags [.], ack 1, win 172, options [nop,nop,TS val 7700894 ecr 4100067098], length 0
E..4..@[email protected]..*Q..*....Pk.0).Mk............
.u...b..
07:41:15.727948 IP 192.168.42.81.38942 > 192.168.42.1.80: Flags [P.], seq 1:213, ack 1, win 172, options [nop,nop,TS val 7700894 ecr 4100067098], length 212: HTTP: GET /gen_204 HTTP/1.1
E.....@.@.....*Q..*....Pk.0).Mk.....{`.....
.u...b..GET /gen_204 HTTP/1.1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.32 Safari/537.36
Host: www.google.com
Connection: Keep-Alive
Accept-Encoding: gzip


07:41:15.728124 IP 192.168.42.1.80 > 192.168.42.81.38942: Flags [.], ack 213, win 1082, options [nop,nop,TS val 4100067104 ecr 7700894], length 0
E..47.@.@.....*...*Q.P...Mk.k.0....:.......
.b. .u..
07:41:15.728647 IP 192.168.42.1.80 > 192.168.42.81.38942: Flags [P.], seq 1:122, ack 213, win 1082, options [nop,nop,TS val 4100067104 ecr 7700894], length 121: HTTP: HTTP/1.1 204 No Content
E...7.@[email protected]...*...*Q.P...Mk.k.0....:.......
.b. .u..HTTP/1.1 204 No Content
Server: openresty
Date: Mon, 30 Sep 2019 07:41:15 GMT
Connection: close
Content-Length: 0


07:41:15.728841 IP 192.168.42.1.80 > 192.168.42.81.38942: Flags [F.], seq 122, ack 213, win 1082, options [nop,nop,TS val 4100067104 ecr 7700894], length 0
E..47.@.@.....*...*Q.P...Mlmk.0....:.!.....
.b. .u..
07:41:15.731380 IP 192.168.42.81.38942 > 192.168.42.1.80: Flags [.], ack 122, win 172, options [nop,nop,TS val 7700895 ecr 4100067104], length 0
E..4..@[email protected]..*Q..*....Pk.0..Mlm...........
.u...b.
07:41:15.732617 IP 192.168.42.81.38942 > 192.168.42.1.80: Flags [F.], seq 213, ack 123, win 172, options [nop,nop,TS val 7700896 ecr 4100067104], length 0

splitice avatar Sep 30 '19 07:09 splitice

@splitice I can check either later today or tomorrow with the person who wrote the DNS Masq'ing.

simonkincaidkintronix avatar Sep 30 '19 09:09 simonkincaidkintronix

Thanks, I'd be very interested to hear that you achieved success. It appears however that there is a SSL connection (which makes it impossible to spoof) to 5228 required for the Connection to be considered up. Unless I am missing something.

splitice avatar Oct 01 '19 02:10 splitice