Genymobile / gnirehtet

Gnirehtet provides reverse tethering for Android
Apache License 2.0
6.31k stars 578 forks source link

Unable to use gnirehtet on LG G5 H830 #52

Closed mfeingol closed 6 years ago

mfeingol commented 6 years ago

Phone: LG G5 H830 w/ latest software: Android 7.0, September security patch. PC: Windows 10 16299.19

I have installed LG drivers on my Windows 10 PC. A different reverse tethering app (ReverseTethering) works okay (although Google Play won't use the connection), so I think this should work.

Anyway, I run gnirehtet-run.cmd on my PC, I click OK when prompted by the gnirehtet app on my phone, I get a key in the notification tray... but none of the apps seem to want to connect and work. There's plenty of traffic, mostly to DNS, but not luck from there.

Console output:

2017-10-23 13:49:58.818 INFO Main: Checking gnirehtet client...
2017-10-23 13:50:03.078 INFO Main: Starting relay server...
2017-10-23 13:50:03.078 INFO Main: Starting client...
2017-10-23 13:50:03.080 INFO Relay: Relay server started
Broadcasting: Intent { act=com.genymobile.gnirehtet.START cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver }
Broadcast completed: result=0
2017-10-23 13:50:07.151 INFO TunnelServer: Client #0 connected
2017-10-23 13:50:07.297 INFO UdpConnection: 10.0.0.2:23143 -> 8.8.8.8:53 Open
2017-10-23 13:50:07.320 INFO UdpConnection: 10.0.0.2:10848 -> 8.8.8.8:53 Open
2017-10-23 13:50:07.373 INFO TcpConnection: 10.0.0.2:37100 -> 205.251.253.8:80 Open
2017-10-23 13:50:07.375 INFO TcpConnection: 10.0.0.2:57474 -> 104.154.126.15:443 Open
2017-10-23 13:50:07.388 INFO UdpConnection: 10.0.0.2:17572 -> 8.8.8.8:53 Open
2017-10-23 13:50:07.437 INFO UdpConnection: 10.0.0.2:18144 -> 8.8.8.8:53 Open
2017-10-23 13:50:07.470 INFO TcpConnection: 10.0.0.2:41177 -> 52.177.200.220:443 Open
2017-10-23 13:50:07.474 INFO TcpConnection: 10.0.0.2:40682 -> 157.240.18.32:443 Open
2017-10-23 13:50:07.507 INFO TcpConnection: 10.0.0.2:41179 -> 52.177.200.220:443 Open
2017-10-23 13:50:07.508 INFO TcpConnection: 10.0.0.2:41180 -> 52.177.200.220:443 Open
2017-10-23 13:50:07.623 INFO TcpConnection: 10.0.0.2:52354 -> 157.240.18.10:443 Open
2017-10-23 13:50:07.937 INFO TcpConnection: 10.0.0.2:58452 -> 10.0.0.105:32400 Open
2017-10-23 13:50:07.938 INFO TcpConnection: 10.0.0.2:43430 -> 10.0.0.234:32400 Open
2017-10-23 13:50:07.939 INFO UdpConnection: 10.0.0.2:25695 -> 8.8.8.8:53 Open
2017-10-23 13:50:07.940 INFO TcpConnection: 10.0.0.2:51425 -> 10.0.0.11:32400 Open
2017-10-23 13:50:08.089 INFO TcpConnection: 10.0.0.2:55481 -> 66.8.204.235:55555 Open
2017-10-23 13:50:08.139 INFO UdpConnection: 10.0.0.2:10650 -> 8.8.8.8:53 Open
2017-10-23 13:50:08.142 INFO UdpConnection: 10.0.0.2:12416 -> 8.8.8.8:53 Open
2017-10-23 13:50:08.169 INFO TcpConnection: 10.0.0.2:53533 -> 54.171.208.164:443 Open
2017-10-23 13:50:08.182 INFO TcpConnection: 10.0.0.2:42728 -> 50.34.193.107:16892 Open
2017-10-23 13:50:08.278 INFO TcpConnection: 10.0.0.2:53535 -> 54.171.208.164:443 Open
2017-10-23 13:50:08.443 INFO TcpConnection: 10.0.0.2:58462 -> 10.0.0.105:32400 Open
2017-10-23 13:50:08.444 INFO TcpConnection: 10.0.0.2:43438 -> 10.0.0.234:32400 Open
2017-10-23 13:50:08.497 INFO UdpConnection: 10.0.0.2:4613 -> 8.8.8.8:53 Open
2017-10-23 13:50:08.521 INFO TcpConnection: 10.0.0.2:55489 -> 66.8.204.235:55555 Open
2017-10-23 13:50:08.528 INFO TcpConnection: 10.0.0.2:34752 -> 104.154.127.47:443 Open
2017-10-23 13:50:08.533 INFO TcpConnection: 10.0.0.2:34753 -> 104.154.127.47:443 Open
2017-10-23 13:50:08.534 INFO TcpConnection: 10.0.0.2:34754 -> 104.154.127.47:443 Open
2017-10-23 13:50:08.534 INFO TcpConnection: 10.0.0.2:34755 -> 104.154.127.47:443 Open
2017-10-23 13:50:08.538 INFO TcpConnection: 10.0.0.2:34756 -> 104.154.127.47:443 Open
2017-10-23 13:50:08.564 INFO TcpConnection: 10.0.0.2:51440 -> 10.0.0.11:32400 Open
2017-10-23 13:50:08.764 INFO TcpConnection: 10.0.0.2:54463 -> 10.0.0.13:32433 Open
2017-10-23 13:50:08.798 INFO TcpConnection: 10.0.0.2:42741 -> 50.34.193.107:16892 Open
2017-10-23 13:50:08.809 INFO UdpConnection: 10.0.0.2:27656 -> 8.8.8.8:53 Open
2017-10-23 13:50:08.856 INFO TcpConnection: 10.0.0.2:54367 -> 23.49.13.219:443 Open
2017-10-23 13:50:08.859 INFO TcpConnection: 10.0.0.2:51444 -> 10.0.0.11:32400 Open
2017-10-23 13:50:09.258 INFO UdpConnection: 10.0.0.2:3982 -> 8.8.8.8:53 Open
2017-10-23 13:50:09.317 INFO UdpConnection: 10.0.0.2:59257 -> 198.50.238.156:123 Open
2017-10-23 13:50:10.006 INFO TcpConnection: 10.0.0.2:53533 -> 54.171.208.164:443 Close
2017-10-23 13:50:10.009 INFO TcpConnection: 10.0.0.2:53533 -> 54.171.208.164:443 Open
2017-10-23 13:50:10.009 WARN TcpConnection: 10.0.0.2:53533 -> 54.171.208.164:443 Unexpected first packet 0; acking 3548488368; flags=20
2017-10-23 13:50:10.009 INFO TcpConnection: 10.0.0.2:53533 -> 54.171.208.164:443 Close
2017-10-23 13:50:10.604 INFO UdpConnection: 10.0.0.2:23143 -> 8.8.8.8:53 Close
2017-10-23 13:50:10.604 INFO UdpConnection: 10.0.0.2:10848 -> 8.8.8.8:53 Close
2017-10-23 13:50:10.606 INFO TcpConnection: 10.0.0.2:37100 -> 205.251.253.8:80 Close
2017-10-23 13:50:10.606 INFO TcpConnection: 10.0.0.2:57474 -> 104.154.126.15:443 Close
2017-10-23 13:50:10.608 INFO UdpConnection: 10.0.0.2:17572 -> 8.8.8.8:53 Close
2017-10-23 13:50:10.609 INFO UdpConnection: 10.0.0.2:18144 -> 8.8.8.8:53 Close
2017-10-23 13:50:10.610 INFO TcpConnection: 10.0.0.2:41177 -> 52.177.200.220:443 Close
2017-10-23 13:50:10.612 INFO TcpConnection: 10.0.0.2:40682 -> 157.240.18.32:443 Close
2017-10-23 13:50:10.613 INFO TcpConnection: 10.0.0.2:41179 -> 52.177.200.220:443 Close
2017-10-23 13:50:10.619 INFO TcpConnection: 10.0.0.2:41180 -> 52.177.200.220:443 Close
2017-10-23 13:50:10.625 INFO TcpConnection: 10.0.0.2:52354 -> 157.240.18.10:443 Close
2017-10-23 13:50:10.634 INFO TcpConnection: 10.0.0.2:58452 -> 10.0.0.105:32400 Close
2017-10-23 13:50:10.638 INFO TcpConnection: 10.0.0.2:43430 -> 10.0.0.234:32400 Close
2017-10-23 13:50:10.644 INFO UdpConnection: 10.0.0.2:25695 -> 8.8.8.8:53 Close
2017-10-23 13:50:10.645 INFO TcpConnection: 10.0.0.2:51425 -> 10.0.0.11:32400 Close
2017-10-23 13:50:10.646 INFO TcpConnection: 10.0.0.2:55481 -> 66.8.204.235:55555 Close
2017-10-23 13:50:10.649 INFO UdpConnection: 10.0.0.2:10650 -> 8.8.8.8:53 Close
2017-10-23 13:50:10.651 INFO UdpConnection: 10.0.0.2:12416 -> 8.8.8.8:53 Close
2017-10-23 13:50:10.655 INFO UdpConnection: 10.0.0.2:59257 -> 198.50.238.156:123 Close
2017-10-23 13:50:10.659 INFO TcpConnection: 10.0.0.2:42728 -> 50.34.193.107:16892 Close
2017-10-23 13:50:10.660 INFO TcpConnection: 10.0.0.2:53535 -> 54.171.208.164:443 Close
2017-10-23 13:50:10.662 INFO TcpConnection: 10.0.0.2:58462 -> 10.0.0.105:32400 Close
2017-10-23 13:50:10.666 INFO TcpConnection: 10.0.0.2:43438 -> 10.0.0.234:32400 Close
2017-10-23 13:50:10.670 INFO UdpConnection: 10.0.0.2:4613 -> 8.8.8.8:53 Close
2017-10-23 13:50:10.672 INFO TcpConnection: 10.0.0.2:55489 -> 66.8.204.235:55555 Close
2017-10-23 13:50:10.674 INFO TcpConnection: 10.0.0.2:34752 -> 104.154.127.47:443 Close
2017-10-23 13:50:10.675 INFO TcpConnection: 10.0.0.2:34753 -> 104.154.127.47:443 Close
2017-10-23 13:50:10.677 INFO TcpConnection: 10.0.0.2:34754 -> 104.154.127.47:443 Close
2017-10-23 13:50:10.677 INFO TcpConnection: 10.0.0.2:34755 -> 104.154.127.47:443 Close
2017-10-23 13:50:10.678 INFO TcpConnection: 10.0.0.2:34756 -> 104.154.127.47:443 Close
2017-10-23 13:50:10.679 INFO TcpConnection: 10.0.0.2:51440 -> 10.0.0.11:32400 Close
2017-10-23 13:50:10.680 INFO TcpConnection: 10.0.0.2:54463 -> 10.0.0.13:32433 Close
2017-10-23 13:50:10.681 INFO TcpConnection: 10.0.0.2:42741 -> 50.34.193.107:16892 Close
2017-10-23 13:50:10.682 INFO UdpConnection: 10.0.0.2:27656 -> 8.8.8.8:53 Close
2017-10-23 13:50:10.683 INFO TcpConnection: 10.0.0.2:54367 -> 23.49.13.219:443 Close
2017-10-23 13:50:10.683 INFO TcpConnection: 10.0.0.2:51444 -> 10.0.0.11:32400 Close
2017-10-23 13:50:10.683 INFO UdpConnection: 10.0.0.2:3982 -> 8.8.8.8:53 Close
2017-10-23 13:50:10.684 INFO TunnelServer: Client #0 disconnected
rom1v commented 6 years ago

Do you need to configure a proxy on your computer for your internet access to work?

In other words, without configuring a proxy, do you have a direct access to all these ip addresses?

mfeingol commented 6 years ago

No proxy needed. Fairly standard LAN setup; a DSL modem/router with DHCP. I can ping 8.8.8.8 from the PC.

It occurs to me that one possibility is that the server side is selecting the wrong NIC on the PC. Here's my ipconfig /all:

O:\Build\Home>ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : Smoke
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : Home

Ethernet adapter vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch):

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2
   Physical Address. . . . . . . . . : 00-15-5D-AF-A7-52
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::9115:6415:ae41:749%6(Preferred)
   IPv4 Address. . . . . . . . . . . : 169.254.80.80(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 369104221
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1D-59-A7-CA-44-8A-5B-99-81-3C
   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter vEthernet (Default Switch):

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #4
   Physical Address. . . . . . . . . : 12-15-F4-B1-80-11
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::85f3:4df1:2377:1d83%11(Preferred)
   IPv4 Address. . . . . . . . . . . : 172.17.42.97(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.240
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 419435869
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1D-59-A7-CA-44-8A-5B-99-81-3C
   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Disabled

Ethernet adapter vEthernet (Internal Ethernet Port Microsoft Emulator NAT Switch):

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #3
   Physical Address. . . . . . . . . : 00-15-5D-AF-A7-53
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::fddd:3975:aad9:c53%3(Preferred)
   IPv4 Address. . . . . . . . . . . : 172.16.80.1(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 469767517
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1D-59-A7-CA-44-8A-5B-99-81-3C
   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter vEthernet (Internet):

   Connection-specific DNS Suffix  . : Home
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter
   Physical Address. . . . . . . . . : 44-8A-5B-99-81-3C
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::3555:9739:12fc:21e6%5(Preferred)
   IPv4 Address. . . . . . . . . . . : 10.0.0.10(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Monday, October 23, 2017 11:57:36 AM
   Lease Expires . . . . . . . . . . : Monday, October 23, 2017 5:57:38 PM
   Default Gateway . . . . . . . . . : 10.0.0.1
   DHCP Server . . . . . . . . . . . : 10.0.0.1
   DHCPv6 IAID . . . . . . . . . . . : 222595675
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1D-59-A7-CA-44-8A-5B-99-81-3C
   DNS Servers . . . . . . . . . . . : 8.8.8.8
                                       8.8.4.4
   NetBIOS over Tcpip. . . . . . . . : Enabled
Biswa96 commented 6 years ago

@mfeingol

mfeingol commented 6 years ago

Good point, I haven't explicitly unblocked the gnirehtet binary in the Firewall settings. I just assumed it would prompt me if there was an issue.

Also, Is there a way to specify which network interface gnirehtet should use?

Biswa96 commented 6 years ago

Its your choice which one to use. You may remove all those Hyper-V interfaces. Just one real NIC. Use Termux or Terminal emulator for Android from Google play store. Use ping, nslookup, traceroute command in both PC and Android to find each other and find any network issue.

mfeingol commented 6 years ago

I explicitly whitelisted the gnirehtet.exe server binary in the Firewall settings, disabled Hyper-V and rebooted. Uninstalled the VPN from the phone, re-ran the server executable, and still no luck. Neither Chrome nor Edge on the LG G5 are able to perform DNS resolution.

rom1v commented 6 years ago

What about the Java version?

Do you have the same problem with another device?

Do you see relevant messages in adb logcat?

To get more details, you can rebuild with a Debug log level (by changing this line).