Credit goes to fish199902 for this one. Basically, you setup an SSH tunnel to the Pre, which supports running as a SOCKS proxy. You then configure your browser to point to this proxy and BAM, you’re tethering away.
First, you must have rooted your Pre and installed/enabled SSH.\
UPDATE 8/6/09: Easier method with GUI: MyTether App
Original thread, download, and guide here: http://forums.precentral.net/homebrew-apps/191213-my-tether-tether-over-wifi-usb-bt.html
This method uses a homebrew app called “MyTether” that essentially does all the hard work. There’s even an automated installation installer, so you don’t have to worry about rooting your Pre. However, it runs $10, but it’s free if you install the program through a rooted shell.
UPDATE 7/7/09: Newer method directly below. Allows USB tethering along with bluetooth.
Thanks zeropoint46 for this awesome post detailing an easier method to enable tethering. This method will allow you to tether over bluetooth or USB. If you want to tether over USB, make sure you have USBnet setup.
1. First, SSH to your Pre and su to root. Then, remount the root file system as read/write.
mount -o remount,rw /
2. Then, enter the /usr/bin directory, make a backup of PmConnectionManager, and stop the process
cd /usr/bin cp PmConnectionManager PmConnectionManager.orig stop PmConnectionManager
3. Using vi and only vi, edit the PmConnectionManager file. Find the line that says “Disabling IP Forwarding^@0^@^@^@” and change the o to a 1. In vi, type “/forward” to search for the string, hit the insert key to enter insert mode and edit the line, then hit esc and type “:wq” to save and exit. If you’re having trouble finding that string, it’s located in line 308.
vi PmConnectionManager
4. Save the file after you make the edit, then start the PmConnectionManager process back up.
start PmConnectionManager
Now /proc/sys/net/ipv4/ip_forward should contain a “1″ instead of “0″. Previously, the ip_forward setting would always read/reset itself to “0″, making tethering very disruptive. With this method, that value will stay at “1″.
5. Setup a NAT rule in iptables by running
/usr/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
6. Finally, add the command in step 5 to a start-up script in /etc/event.d. Using nano as the text editor, you would run
nano -w /etc/event.d/ipforward
Then copy/paste the lines below into the file
start on stopped finish
stop on runlevel[!2]
console none
pre-start script
/usr/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
end script
Save and exit the file and reboot your phone. Then, connect using bluetooth or via USB utilizing USBnet. Make sure your wifi is turned off so your traffic will route through the Pre’s EVDO connection. Everything should be good to go at this point. If you’re having trouble, make sure you have no firewalls running.
Old method posted 6/15/09:
Connect to your Pre’s NAP (network access point) via Bluetooth:
Ignore this error message on your Pre:
Using PuTTY, configure the following settings under Connection -> SSH -> Tunnels:
- Source port: 8080
- Destination: Dynamic and Auto radio buttons
- Click Add and you’ll see the port in the “Forwarded ports” box
Then, initiate the SSH connection to your Pre. Going through Bluetooth and using port 222, your connection window will look like this:
Once you’re at the login screen, configure your browser’s SOCKS proxy with:
- Address: localhost
- Port: 8080
Now you’re good to go! Enjoy the tethering capabilities of your Palm Pre. Here’s proof:






{ 66 trackbacks }
{ 66 comments… read them below or add one }
Baller. Saved in case it dies. Will mirror soon.
It’s neat, but not a ‘real’ solution for many due to the fact you need to reconfigure each application on the PC you want to run to go through the SOCKS proxy.
Don’t get me wrong, I’m very appreciative, and it’d definitely do in an emergency, but I’m hoping for something cleaner in the future.
Give it a little time and someone will make a quickie tethering app using this method…. and charge you thirty bucks for it.
Thanks for the post! Let me know if Palm contacts you about taking it down, I know they already sent an email to the dev team after they posted the wiki: Palm Pre Dev Wiki Warned About Tethering
There’s no way to keep the cat in the bag, or put it back in once it’s out. Palm and Sprint need to just accept that there’s a small but determined percentage of Pre owners who want to do this and will do what it takes to git ‘er done.
What’s the big deal? Sprint encourages me to tether with my blackberry and even provides the software to do it.
It’s ridiculous that they would try to stop this. Why not just allow it up to a point? Put a data cap on it and call it a day. I could live with 1GB per month.
Tether me baby!
Maybe I missed something, but Vista is not letting me connect to my Pre via bluetooth. When I try to pair via Join a Personal Area Network it complains that the Pre doesn’t support it.
Is there a Putty alternative for the Mac?
Oh I wasn’t saying it shouldn’t be allowed by any means, I’m a proponent of data tethering myself – what end user isn’t? I’m just saying that both Palm and Sprint are now very aware of the situation and seem to be keeping a keen watch on the blogosphere. I don’t want this to be taken down, but I also want Eric to be wary of the potential emails from some certain exec’s that won’t be all too thrilled that their data servers will be really put to the test soon enough. But let’s enjoy it while we can!
Can you point us Mac-users to a similar fix?
> Is there a Putty alternative for the Mac?
For the details, launch a terminal and type “man ssh”. To do on the command line what’s described here with putty:
ssh -D 8080 -p 222 root@10.0.1.10
> It’s neat, but not a ‘real’ solution for many due to the fact you need to
> reconfigure each application on the PC you want to run to go through
> the SOCKS proxy.
You don’t have to, just use a tool like Proxfier: http://www.proxifier.com/
Hey – do I have to run something on the pre to make this work? Everything is setup, device rooted, ssh session established through putty, but when I set the proxy in my browser to localhost port 8080, no go. Do I have to start a socks proxy on the pre first?
I don’t expect Palm or Sprint to be too thrilled. Haven’t gotten any emails from em yet. If I do get some complaints, them I’m pretty sure Precentral.net would as well because that’s where I got the info.
For the Mac users, all you need to do is open a terminal and run the proper SSH command:
Jason – Nothing needs to be ran on the Pre. If you’re using Firefox, try using IE7. I had problems trying to configure Firefox to work with the proxy, but IE7 works fine. Make sure to fill in only the SOCKS proxy setting or it may not work.
Okay okay! So what about USB? I don’t have Bluetooth on any of my laptops!
When setting user in “installed/enabled SSH” I messed up and didn’t change password. What is the default password? I’ve gone through the whole process and can’t log in through telnet on port 23 any longer. Please help
Anyone tried doing this via Wi-Fi yet?
Right now I’m doing the cheap version of Comcast internet for $24.95 which is giving me .96 Mb/s down and .35 Mb/s up. Yeah, times are tough… So, do you guys think I should lose the crap internet and tether my (forthcoming) Pre instead? I’m trying to justify the cost of a Pre so help me out here
Cooknn – No way. That’s a good way to get your account canceled. The fine print on the plan gives them the right to terminate your account for excessive use, which they quantify as 5GB/month. Tethering here and there is fine, but not for daily use.
For Mac users, after you enter the ssh command, what do you see in the terminal window to let you know it worked? I get only the symbol “>”.
No data coming from the phone through bluetooth (I have a good bluetooth connection to the phone). Also where do you find the exact user name if you forgot it on your Pre? Is it the name of the phone that shows up in the Bluetooth dialogue drop-down box in OS X?
I don’t get it I’m on a mac, I connect everything works fine I create the ssh tunnel no problem but I only get internet when the pre is on wifi, on EV only the browser just sits there waiting. The minute I turn on my wifi and my pre connects to my wireless network then everything works… what am I missing, why won’t it work with just the sprint network????
also when I enable proxy for that service safari says it can’t connect to the proxy server if I disable it then it will work as long as the pre is on a wifi at which point I don’t need the Pre
Go back in as root and get back to where you were when you typed in the wrong password and type
> passwd $MYUSER
(be sure you set the $MYUSER variable again)
and it will ask again for the password. If it says the password is too weak, either select a stronger one, or ignore the message and confirm the weaker password. There is little danger of having your Pre hacked because of a “weak” password.
On my laptop, I notice it only works if I have WiFi enabled and connected. If I disconnect the WiFi, I can no longer connect to the web. I can go into the Putty window (where I’m actually on the Pre) and do a
sudo ping google.com
and it works, and the Pre browser sees Google, but the browser on my laptop can’t see it. If WiFi is connected, I see Google until I get out of range of the WiFi, then it fails to connect. Any ideas on this one? It is as if only the WiFi socket and not the Sprint socket on the Pre is going out the NAP connection.
Sparta23, do what I did: get a cheap bluetooth adapter. The one I got sticks out abount an eighth of an inch from my laptop, so I basically never have to take it out.
http://www.isyougeekedup.com/palm-pre-how-to-guide-to-enable-tethering/#comment-4101
I think I failed to explain myself well in the comment above.
I rooted my Pre, set up the SSH and DropBear, and set up the Putty tunnel as shown above, but it only allows my laptop to connect through the Pre’s WiFi connection, not the Pre’s EVDO connection.
I can see that the EVDO device in the Pre is ppp0, and the WiFi is eth0, but the SSH tunnel only goes through the eth0 (WiFi). Using the SSH terminal on the Pre, if I do an “/sbin/ifconfig,” I see the eth0 device come and go as I enable and disable the Pre’s WiFi, and with it, the ability for my tethered laptop to see the Internet.
Although I’m a long term user of Linux, this problem is beyond my current knowledge. If I don’t get an answer from someone here, I’ll continue looking into it as I have time. Hopefully, someone knows more about this than me, and can find a solution faster.
I looked at DropBear for configuration instructions, but there’s no documentation, and the code is extremely complicated. However, I suspect that the solution is in changing the iptables in some way, but that’s just a guess on my part.
Anybody got any ideas about this?
Hey Mike. Having the same issue. Fully working with wifi. Nothing happening when i try and go in via EVDO. My mac can pull the internet from over bluetooth no problem as long as its coming from the PRE via wifi. I can’t seem to get EVDO to resolve however.
Any luck?
Mike and Tom – same here… another words its useless at this point cause if I have wifi then I don’t need the PRE. CAN ANYONE HELP US PLEASE!
Same problem. Does anybody actually have this thing working other than the orig poster (Eric) and are you sure you actually have the EVDO connection? I already “formatted” my pre and plan to try again.
Yes, this does work as confirmed by some commenters and myself. The connection went through the EVDO connection as seen by the SpeedTest.net result picture at the end of the post.
For those that cannot get this to work, I’m sorry, but I don’t know much about troubleshooting this particular problem. I tried the initial method (what this article goes over), but there are other methods which you could try.
Here’s the tethering thread from PreCentral with lots of helpful information and alternate tethering methods to try. It’s a long thread, but it probably would pay off to give it a read:
http://forums.precentral.net/web-os-development/185206-possible-tether-work-around.html
got it to work on my Mac please follow these steps:
- Connect with bluetooth PAN (ignore the auth error)
- Open terminal and type: ssh -D 8080 -p 222 preuser@10.1.1.10
Ps: I created a file and chmod 777 so that I don’t have to type all that every time.
- the missing part – on safari go to preferences then click on advanced then click on proxy settings and you need to check FTP, Web and Socks make sure you forward them to “localhost” server and the port number should be 8080 – you don’t have to undo this unlike windows you’re only changing it for the pan connection.
- speeds are 850-1050 kbps down – 60-120 kbps up
- Enjoy
now we need to learn how to use the USB cable that should be a lot faster… Anyone?
Try usbnet. This works!
I meant for connecting with a usb cable instead of bluetooth.
Venu – do I need a special cable? how does work? I figure I need to install something on my pre if so do you have links?
Thank you
In Vista (x64) when I pair my Pre, I only see 2 services (Audio/Video Service and Headset Audio Gateway) – neither is a NAP.
What am I missing?
Why can’t I see a NAP Icon?
I thought I followed the “rooted” and SSH directions with no problems…
Hi,
I just want to use the data tethering for emergency purposes only. I trade index futures and want a backup in case my cable modem every craps out while in a trade. The trading program does not run thru a website but thru an application on my cpu. Can I still use this technique to connect with this program? Also i’ve never used the linux but i’ve done some java programming in school. Can i mess up my phone beyond repair by making a simple mistake with mistyping while it is rooted?
Thanks
Mike – I’ve been able to connect to VPN and I also have used VNC no problem don’t think it’s blocking any ports so it’s worth a shot. As far as knowing java you might be able to develop some apps in the future for the pre (thats what I heard so far) but linux it self is all C and unix so if you don’t what you’re doing you could end up having a really expensive AND useless phone (palm backup does not backup the kernel of the OS). With that been said if you follow all the instructions (I would copy and paste instead of typing) its pretty easy and most people can do this.
Actually I just thought of something speed is your biggest enemy things will take a while to update so might not work for that reason
Got it! Thanks Marcio. I’ll try tethering on my commute this morning. If this works, I might just keep my phone instead of re-activating my sprint card.
I’m not seeing how to do step 6:
“Finally, add the command in step 5 to a start-up script in /etc/event.d You can add the line in your dropbear startup script in between the “pre-start script” and “end script”lines.”
When I go to the /etc/event.d directory, I have a “dropbear” file – is this what I want to edit? There is a “end script” line, but I don’t see a “pre-start script” line. Am I looking at the right file?
rgi – I updated that step to clarify some things. Instead of adding that command to an existing startup script, it now tells you how to create a new startup script file.
I had to use vi for step six – got a message that nano wasn’t installed. No biggie – I worked for an ISP where we had to vi to open/save email tickets (old school 1994) so I remembered SOME, found the rest here: http://www.lagmonster.org/docs/vi.html Works like a champ. Thanks for the step-by-step.
I’m trying to edit the file PmConnectionManager and when I type /forward it doesn’t find any string. Does anyone know what line the “Disabling IP..” is on? Thanks
It’s on line 308
First off I’m a total newb to Linux so forgive me in advance. I’ve done all steps for tethering successfully up to step 6:
<<<>>>
Do I need to load nano on the pre for this to work? Can anyone explain step 6 in detail, again sorry for the newbie-ness.
No, you can use vi if you want to. Nano is just a common text editor preferred by many instead of vi. If you want to install Nano, the easiest way would be to follow the ipkg guide here:
http://predev.wikidot.com/next-steps-after-rooting
Then run “ipkg-opt install nano”
Thanks, I used vi.
Thanks for your work and support on this zeropoint46. My PmConnectionManager kept reverting back to 0, turns out I never :wq after the save…..yes I’m a linux newb. Once I stopped the service, made the change and saved it works perfectly.
Thanks again.
Is the GPS script/setup messing up tethering for anyone else?
http://www.isyougeekedup.com/find-your-lost-pre-with-gps-tracking/
Once editing the file and restarting PmConnectionManager, I still have a 0 in the ip_forward file. Any help is appreciated.
I think it’s a great idea, and it works for me with usbnet just fine, BUT, with the ipforward and firewall rule my pre’s CPU is slammed, the temp gets HOT, and the battery goes from 100% to < 20% in less than 2.5 hrs when IDLE, with usb off, wifi off and unplugged. Temp finally cooled after reverting and rebooting.
In other words, the old approach, for me, seems to be the only viable option.
Hey, I was having problems with the filesystem not remounting as read-write and I was poking around on some sites about Unix and there should be a forward slash after the remount command. Should be:
mount -o remount,rw /
That worked for me and fixed all my problems.
Ah, thanks for pointing out Danny! Kind of a crucial thing I left out there
Worked great!
So, the next question is.. Does the new 1.1.0 update break this?
“So, the next question is.. Does the new 1.1.0 update break this?”
I’m afraid so. I just did the update, and my PmConnectionManager file was changed back… and now no ipforward file ??
I hope someone will come up with a solution!
Check that. It’s working again… I redid the edit to PmConnectionManager and restarted everythng and it works now.
After the 1.1 update I needed to re-edit the PmConnectionManager file as well. On my phone, the line to edit was 328 this time. After a phone reboot, works again.
I had to do some extra pushes to get my Vista x64 box to recognize the USBnet, but after that this still works with 1.1. I’m actually writing this while tethered! Whoop!
Hey anyone from the board that knows how to do this hack in the Chicago area?????
Hey guys a question here. I am able to tether via bluethooth, but I read here you can do it via usb. My question is do I have to install the palm sdk?
This works like a charm for me. Does anyone know how to use the phone while tethering?
Everytime I make/receive a call the internet access drops.
The pre does get HOT during tethering but then try runnng a few apps in parallel like email, messaging, pandora, and something else and see how hot it gets.
The vmstat shows the pre mostly idle while only tehtering:
procs ———–memory———- —swap– —–io—- -system– —-cpu—-
r b swpd free buff cache si so bi bo in cs us sy id wa
2 0 96 8704 17332 54384 0 0 12 12 318 430 7 2 87 3
0 0 96 8704 17332 54384 0 0 0 36 246 179 1 1 65 33
0 0 96 8704 17332 54384 0 0 0 0 228 181 8 0 92 0
0 0 96 8644 17332 54384 0 0 0 0 213 67 0 0 100 0
0 0 96 8644 17332 54384 0 0 0 0 185 63 0 1 99 0
So, tethering is not too stressful on the pre’s CPU.
Got it working ! (after cleaning the mess with doctor webos and start from scratch) my tether app is the best!!!