USB Tethering with Verizon /w TTL bypass for mobile hotspot

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Advanced Networking
Author Message
imgray123
DD-WRT Novice


Joined: 26 Sep 2019
Posts: 3

PostPosted: Thu Sep 26, 2019 1:50    Post subject: USB Tethering with Verizon /w TTL bypass for mobile hotspot Reply with quote
router: NETGEAR R6400v2
firmware: 41113

I've been looking around a lot on this forum looking for an answer on how to do this and now I'm typing this to hopefully help any others on figuring this out.

Firstly, this post helped me a lot and I'm going to be using a part of it, since you don't need mostly the rest mentioned after the last bits of commands.

Before we begin,
in Setup > Basic Setup
    •Set WAN Connection type to DHCP in basic then below

    •Under Network Setup change the Local IP address so it does not match your USB device (192.168.0.1 should be fine)

in Services > USB
    •Turn on USB Core Support and USB Storage support


DD-WRT GUI METHOD VIA COMMANDS
You should be able to do the rest via Commands in Administration > Commands BUT if you prefer telnet within Windows through Command Prompt you can do that also below
    •enter these commands and hit "Run commands" at the bottom of the page then plug your phone/jetpack in and turn on USB Tethering
    insmod usbnet
    insmod cdc_ether
    insmod rndis_host

    •go to Status > Syslog and go to the last page and if you see anything under the lines of "rndis_host 1-1:1.0" there should be a WAN device listed afterwards, such as "eth3", as mine lists that (yours could be usb0) here(IMAGE LINK) and new high-speed USB device that means your router has successfully recognized your device

    •go back to Administration > Commands and run these commands
    ifconfig usb0 up CHANGE USB0 IF YOURS SAID ETH3 OR ANYTHING ELSE
    udhcpc -i usb0


After that you should hopefully have internet. If you don't try using the telnet method below, as it will inform you if udhcpc has obtained a lease or not.

If it worked you can take all those commands above and make them run on startup by pasting them back into the command box and clicking "Save Startup" instead. It could be different with you, but after a reboot mine does run the commands successfully and I get internet.


TELNET METHOD
    •Open control panel on your PC and go to Programs then "Turn Windows features on or off" and enable "Telnet Client"

    •Open CMD and type telnet (IP of your router: 192.168.xxx.xxx) the username is root and the password is what you made your router password when you login to the GUI

    •Use the following commands (these should be already installed in the latest versions of DDWRT, I'm using 41113)
    insmod usbnet
    insmod cdc_ether
    insmod rndis_host

At this point you can plug your phone into your router

    •type dmesg, if you see anything under the lines of "rndis_host 1-1:1.0" there should be a WAN device listed afterwards, such as "eth3", as mine lists that (yours could be usb0) here(IMAGE LINK) and new high-speed USB device that means your router has successfully recognized your device

    •type
    ifconfig usb0 up CHANGE USB0 IF YOURS SAID ETH3 OR ANYTHING ELSE
    udhcpc -i usb



After setting this all up and have successfully managed to obtain a WAN IP, you should have internet access on your PC. Cool


TTL bypass for Verizon (not sure if it works with other wireless ISPs)

I've dabbled around the wiki and found that you can change TTL, which is important because Verizon uses TTL 63 to track your mobile hotspot usage. If you're on a unlimited plan, changing this to 65 will make it seem like you're just using regular data on your phone. Changing TTL on DD-WRT is simple.

First, make sure your firewall is enabled as we need it for firewall commands.
Security > Firewall
    •SPI Firewall > ENABLED

Next go to,
Administration > Commands
    •Put in the commands below and Save Firewall and then run the command

    iptables -t mangle -I POSTROUTING -o `get_wanface` -j TTL --ttl-set 65
    iptables -t mangle -I PREROUTING -i `get_wanface` -j TTL --ttl-set 65




ISSUES I'VE NOTICED SO FAR

pages take forever to load

I believe this is a DNS cache issue, but I could be wrong. I don't know much about this at all. I have disabled DNSMasq for DNS and it fixed the issue.

DHCP lease expires and I have to repeat the udhcpc process

This has becoming an issue for me recently and I'm not sure why it doesn't auto-assign it the correct IP. I've fixed it by making the WAN a static IP in basic setup. (In my case 192.168.1.4) then using the udhcpc command again.

udhcpc keeps sending out the same repeated text

If you've set this up before and restarted your router you will need to go to Basic > Networking and set the WAN Port Assignment to disabled, the router will automatically set it back to vlan2, repeat the process and set it to eth3 again. DO NOT CLOSE CMD WHILE THIS IS HAPPENING. If it works properly you will be prompted that it has been received and you should have a WAN IP.

If this is your first time, replugging your USB device and repeating the process should help, or using the DHCP renew trick will make it assign an IP.


In the web GUI my WAN IP says 0.0.0.0, but I have internet access on my PC

I've noticed the WAN IP says 0.0.0.0 but there's actually an assigned IP, I'm not sure what causes it. Pressing the DHCP renew button will make it appear though.


I'm having loading issues within games, web browsing and other sorts of things

I haven't exactly pinpointed what is causing this, I have gotten around it by using a different USB port on my router. It seems to come up randomly, if it does rebooting and restarting the process will fix it. You can try enabling UPNP as that also helped me.



If you're having any issues setting this up, I'm glad to help as much as I can. I'm limited to my knowledge of DD-WRT and how it works, I just know that there hasn't been updated version of this in along time.

If you have any knowledge on this and are just scrolling by, any help would be appreciated. Smile

EDITS: overhauled entire post, new DNS issue. personally i've just plugged my jetpack back into my pc directly at this point and changed ttl via command prompt. should work with your phone as well. if you can USB tether and run Wi-Fi at the same time I suggest bridging your hotspot wi-fi to your router, the ttl change on the router itself will still work fine.


Last edited by imgray123 on Tue Feb 18, 2020 22:14; edited 2 times in total
Sponsor
CasualUnknowingness
DD-WRT Novice


Joined: 20 Dec 2019
Posts: 1

PostPosted: Fri Dec 20, 2019 23:47    Post subject: Thank you for this, in the end i have a reliable usb tether! Reply with quote
I can confirm this is working for me and i have next to no knowledge about flashing routers and whatnot but when i discovered tethering my 4G metropcs phone data plan to my router and all devices connected to it was possible I simply had to try this after an entire year of using the netgear r6400v2 stock firmware and on a terrible 65$ plan in my rural area for a satellite connection that's "supposed" to be 2mbps up and 12dmbps down but in reality it's more like 900kbps both ways and even still throttled to 300 kbps during the hours when they assume im either at work or asleep (they being my isp) I was just so fed up with believing that just because i live in a small town with a miniscule amount of people that i deserve this god awful slow internet and I knew it was possible for it to be faster without me having to spend some outrageous price that somebody else in lets say central LA would pay 50 bucks for for me to get even 1/4th that same speed needless to say I found this site and stumbled upon your tread and the one you linked that said helped you the most I believe these are the two that did it for my router So let me start at the beginning if this information on how to tether your phone to your r6400v2 is helpful for anyone else out there than im glad and on a side note i'm sorry if this has already been posted somewhere else i just want to share the exact method that works for me after shutting off the router and restarting it no matter what so far it seems to work flawlessly I reverted from stock netgear r6400v2 firmware to [12-10-2019-r41r4168] and then back to vDD-WRT v3.0-r41113 std (09/23/19) as i had not realized that's the version you had stated in your post was successful in performing this tether after about an hour with fiddling with all that along with learning how to telnet over lan cable via my laptop i followed all of your instructions thoroughly however i came to a hiccup even though i followed word for word rdnis_host was NOT assigned to eth0,eth1,eth2,eth3 or vlan2 i tried that udhcpc on just about every interface i almost gave up entirely mine didn't say any of those interfaces it said Usb0 i don't understand any of it but here's what i do understand can get my phone sending up to 35mbps down and 8mbps up to my router and then into a wireless signal for all my devices to use i can even ethernet my ps4 to any one of the 4 ethernet ports on the router and it gets my phones connection too! Now i did notice that if i dont turn on nordvpn and just use my raw data IT DOES GET DETECTED AS HOTSPOT USAGE BY METROPCS so make sure if anyone out there your thinking of doing this turn on the nordvpn android tunnel and in android 9 settings under vpn select allow hotspot clients to use vpn or whichever vpn app you use i just happen to have 2 years left on my nord account so it works perfectly for this anyway make sure you followed this guide above in the original post turned on usb core and usb storage installed all those modules and everything And so if the stars align for you perfectly like they did for me this command should get you tethered in 3 copy pastes

[You don't have to use telnet you can run these from the run command in dd wrt settings]

You would after turning on usb tethering and plugging in your phone to the blue 3.0 usb hub in front of the router (in my case motorola e5 plus rooted w 15 gigs of hotspot and unlimited data for the phone apps/browsers only) ~ run command (copy/paste this 6 lines exactly these 6 lines first then run the other 8 lines i post down below in a separate telnet and or dd wrt web gui instance)

cd /lib/modules/4.4.194
insmod usbnet.ko
insmod cdc_ether.ko
insmod rndis_host.ko
ifconfig usb0 up
udhcpc -i usb0

After running these six No need to wait immediately after the web gui refreshes or instantly in telnet (but remember it won't work if you run all 14 at once and the router also wont boot right if you try to add these to a nvram set startup sequence Just run these 2 scripts separately and manually via telnet or web gui anytime your phone is plugged into the router with its usb hotspot turner on and this should work) now copy and paste these 8 and run them


cd /lib/modules/4.4.194 # this dir may be different
insmod usbnet.ko # this module should already be loaded
insmod cdc_ether.ko
insmod rndis_host.ko
ifconfig usb0 up
udhcpc -i usb0
iptables --table nat --append POSTROUTING --out-interface usb0 -j MASQUERADE
iptables --append FORWARD --in-interface br0 -j ACCEPT

And at this stage you should be tethered
You should now be tethering your phones internet connection to your router and the router sharing that connection to any device connected to it
Should you bump the wire or purposely disconnect the phone for any reason just plug it back in run the two scripts separately again and the wifis back up every single time, at least in my case So thank you OP if you had never posted this i would have never discovered this was possible I always knew my phone had a crazy fast speed while everything else in my house took forever to load and it never made any sense Well now thanks to you that wont be the case anymore this sucker is fast and i mean it at least for someone who lives in a rural area never going under 8mbps download is a godsend Thankyou. Below is the exact telnet guide you can even run that telnet on the free android app 'mobile telnet' and as long as your phone that's being used to tether is plugged into the usb port (with usb tether turned on in android settings of course) it will bring the internet right up

*where I entered 1 below 1 is my password to my router you would enter your password in place of 1

telnet 192.168.0.1

[Enter]

root

[Enter]

1

[Enter]

cd /lib/modules/4.4.194
insmod usbnet.ko
insmod cdc_ether.ko
insmod rndis_host.ko
ifconfig usb0 up
udhcpc -i usb0

[Enter]

cd /lib/modules/4.4.194 # this dir may be different
insmod usbnet.ko # this module should already be loaded
insmod cdc_ether.ko
insmod rndis_host.ko
ifconfig usb0 up
udhcpc -i usb0
iptables --table nat --append POSTROUTING --out-interface usb0 -j MASQUERADE
iptables --append FORWARD --in-interface br0 -j ACCEPT

[Enter]


P.S. this part of these scripts
cd /lib/modules/4.4.194 the 194 i think corresponds to some setting in your router so you may need to change it to 4.4.89 but only if its not working for you i'm pretty sure i had to change that number to correspond to a number I saw in my nvram while attempting this anyways gl to anyone who tries this
imgray123
DD-WRT Novice


Joined: 26 Sep 2019
Posts: 3

PostPosted: Mon Dec 30, 2019 11:19    Post subject: Re: Thank you for this, in the end i have a reliable usb tet Reply with quote
CasualUnknowingness wrote:
Now i did notice that if i dont turn on nordvpn and just use my raw data IT DOES GET DETECTED AS HOTSPOT USAGE BY METROPCS


I mentioned there's a way to get around mobile hotspot usage by using the TTL commands in GUI. It will hide MOBILE HOTSPOT USAGE but it will not hide DATA USAGE. These two things are very different from one another and it should be obvious what both mean. Some carriers advertise they have "unlimited data" but there's probably a mention how you only have 25GB on your plan/bill. That means you get to have 25GB for that month until your speeds become too slow for usage. If you have true unlimited then the TTL command will work for you.

CasualUnknowingness wrote:
[You don't have to use telnet you can run these from the run command in dd wrt settings]


I for some reason had to use telnet to use these commands as I could not get them to work. After going back and trying again they work if I do not add the ".ko" at the end.

Quote:
cd /lib/modules/4.4.194


You possibly won't have to use this cd, in my instance I did not need to. .194 should be the correct for a lot, if not you can always go to the Status > Router page and find "Kernel Version" down the list, you'll find it after "Linux" example: Linux 4.4.194

Quote:
udhcpc -i usb0

Some people seem to be lucky and have "usb0" as their interface. If you don't and have eth3 such as I do then most of these guides may not work for you. Check your dmesg or sysinfo if you have no WAN after doing udhcpc.



Thanks for providing extra help for people.
suprnova74
DD-WRT Novice


Joined: 09 Feb 2012
Posts: 13

PostPosted: Wed Jul 01, 2020 14:44    Post subject: Re: USB Tethering with Verizon /w TTL bypass for mobile hots Reply with quote
imgray123 wrote:

•go to Status > Syslog and go to the last page and if you see anything under the lines of "rndis_host 1-1:1.0" there should be a WAN device listed afterwards, such as "eth3", as mine lists that (yours could be usb0) here(IMAGE LINK) and new high-speed USB device that means your router has successfully recognized your device

•go back to Administration > Commands and run these commands
ifconfig usb0 up CHANGE USB0 IF YOURS SAID ETH3 OR ANYTHING ELSE
udhcpc -i usb0



I was on a time-crunch to get some type of tethering working so after trying to follow the wiki, I finally opted for using wifi sharing instead of USB (family is traveling this weekend). I found this post when searching for the command to use for the TTL modification. After reading through your post, I wanted to say that the step on how to find which device the usb was bound to is a crucial step that the main wiki documentation is missing as my device seems to also not use the "usb0" device by default.

For now, wifi Client/AP combo is working well (so far) and added the TTL config so hopefully won't get throttled Very Happy

Thank you for all of the follow-up documentation on issues and workarounds you've used. When I have more time, I will be trying this method. Any Wiki mods, I would recommend updating the article USB Modem as Wan Connection with the steps on finding the usb device.
hoot_spoot
DD-WRT User


Joined: 07 Dec 2009
Posts: 110
Location: Earth.

PostPosted: Wed Jul 01, 2020 15:26    Post subject: Re: USB Tethering with Verizon /w TTL bypass for mobile hots Reply with quote
suprnova74 wrote:
Any Wiki mods, I would recommend updating the article USB Modem as Wan Connection with the steps on finding the usb device.


sure.

_________________
various hw
hotgravy
DD-WRT Novice


Joined: 29 Jul 2020
Posts: 1

PostPosted: Wed Jul 29, 2020 16:50    Post subject: iPhone USB tethering option: Missing rndis_host.ko Reply with quote
My dd-wrt BIG build for Asus RT-n66u (7/22 v24-43904_NEWD-2_k3.x-big-RT-N66U.trx) that I flashed to already has an option to use "iphone USB tethering" which must be new since this post above came out. (I have verizon and pay for unlimited mobile hotspot (grandfathered).

However, when I try it, my iphone connects and is trying to share the connection with the router. However, I can't access the internet through the router itself, either via WAN or LAN.

So I found this post, and tried to follow the instructions. Using either Big or Mega (broadcom 7/23 build for RT-N66U) files, I discoverd it does not contain the required rndis_host.ko to insert. So, I can't proceed as the post instructs above.

I have looked around and it seems like I would have to build rndis_host.ko from scratch, which I'm not sure how to do.

Does anyone have some insight or expertise into what I can do?

Or is there any option here to get my router to share the usb hotspot properly?

I feel I'm pretty close; when I plug in the usb cable to my iphone, the phone's screen shows it is sharing my mobile hotspot with my Asus router, but when I connect to the router using my pc/mac, there is no internet access.

Thank you in advance
audia3
DD-WRT Novice


Joined: 10 Mar 2018
Posts: 41

PostPosted: Sat Aug 01, 2020 14:04    Post subject: Reply with quote
For what it's worth, I'm running DD-WRT v3.0-r43904 big (07/23/20) on an Asus RT-N66U and iPhone tethering works without any extra modifications. I use 'iPhone Tethering' as my WAN connection type and I have Core USB Support and USB Storage Support turned on. My provider is T-Mobile.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14221
Location: Texas, USA

PostPosted: Sat Aug 01, 2020 14:34    Post subject: Reply with quote
iPhone tethering is not Android tethering. I really wish all smartphone tethering requirements were the same, would make life simple. P.S. I think both may be covered in a wiki somewhere, and this whole thread is yet another incarnation of an already discussed topic, but while we're here... Laughing
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
imgray123
DD-WRT Novice


Joined: 26 Sep 2019
Posts: 3

PostPosted: Thu Oct 01, 2020 9:21    Post subject: Reply with quote
It's exciting to see a lot of big names roll around here. I don't mean to necro this post, but as of a recent discovery, it may be possible newer devices will no longer support this method. I have recently purchased a new MiFi 8800L and rndis_host does not seem to recognize it when set to tethering mode. I do hope this will spread some light on these new issues.

Mod note 04.14.24: Android Tethering is supported in 55779 and newer releases natively on routers that support it.
Display posts from previous:    Page 1 of 1
Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum