Page 1 of 9 123456 ... LastLast
Results 1 to 20 of 169
  1.    #1  
    hello all,

    I'm new here but I love the site. I posted this on the "possible tether work-around" thread but I wanted to make sure everybody got a chance to see it, and that thread is pretty long now. I used to have my 800w hacked for tethering and when I found the options of tethering available to the pre (so far) they just didn't quite cut it. I didn't want to have to ssh to my phone and use a socks proxy or run an app to shut down pmconnectionmanager every time I wanted to connect, so I modified the connectionmanager program to stop change ip_forward to 0. Here are the steps:

    Prerequisites:
    rooted pre
    ssh access (dropbear or openssh)
    ability to use VI or editor of your choice

    optional prereq:
    usbnet setup and dhcp setup

    1) ssh to the phone, sudo to root and go to /usr/bin

    2) cp PmConnectionManager PmConnectionManager.orig just in case you mess something up

    3) stop PmConnectionManager

    4) vi PmConnectionManager and do a find for "forward" (with vi you use / then the string you are looking for)

    5) the third "forward" you find should say "Disabling IP Forwarding^@0^@^@^@"

    6) change the 0 to a 1, save and quit

    7) start PmConnectionManager

    I did this and kept checking my /proc/sys/net/ipv4/ip_forward file and it is now staying at 1. with this and the correct IPtable rules I can just connect my phone via usb or bluetooth and get right on the net without ssh or anything else. I rebooted the phone many times and it has stuck also the iptable rull I'm using looks something like this:

    iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

    I added that iptable rule to my dropbear upstart script so it gets added on startup. If you wanted to make a separate upstart you could, but I was too lazy. I'm using webOS 1.0.4 and it's working great. Let me know if you have any questions. thanks.
  2. #2  
    very cool find. now when not tethering tell us if you run into any issues. i hope not
  3.    #3  
    been running like this for 3 days, no issues whatsoever.
  4. #4  
    Thanks!

    and Welcome to PreC
    Just call me Berd.
  5. buyrihn's Avatar
    Posts
    449 Posts
    Global Posts
    453 Global Posts
    #5  
    Although I'm quite adept at following instructions, programming and *nix are not my bailiwick. So... how do you stop the PmConnectionManager specifically? Conversely, how do you start it again? You mentioned that you can now just connect via Bluetooth- how, exactly? And the last question: How do you add the iptable rule to a dropbear upstart script (and what's an upstart script, anyway)?
  6.    #6  
    starting and stoping is quite easy, you litterally type stop PmConnectionManager and start PmConnectionManager at the command line. As far as adding the ip table rule you edit the file in /etc/event.d/optware-dropbear and you will see a few iptable lines near the end of the file. just add another line with the rule that I posted here. Here is what mine looks like:

    pre-start script
    # Add firewall rule to allow SSH access over WiFi on port 222
    # Remove the "-i eth0" on both of the following lines to enable SSH access
    # over the cellular data network (EVDO, etc).
    /usr/sbin/iptables -D INPUT -p tcp --dport 222 -j ACCEPT || /bin/true
    /usr/sbin/iptables -I INPUT -p tcp --dport 222 -j ACCEPT
    /usr/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
    end script
  7. buyrihn's Avatar
    Posts
    449 Posts
    Global Posts
    453 Global Posts
    #7  
    Quote Originally Posted by zeropoint46 View Post
    starting and stoping is quite easy, you litterally type stop PmConnectionManager and start PmConnectionManager at the command line. As far as adding the ip table rule you edit the file in /etc/event.d/optware-dropbear and you will see a few iptable lines near the end of the file. just add another line with the rule that I posted here. Here is what mine looks like:

    pre-start script
    # Add firewall rule to allow SSH access over WiFi on port 222
    # Remove the "-i eth0" on both of the following lines to enable SSH access
    # over the cellular data network (EVDO, etc).
    /usr/sbin/iptables -D INPUT -p tcp --dport 222 -j ACCEPT || /bin/true
    /usr/sbin/iptables -I INPUT -p tcp --dport 222 -j ACCEPT
    /usr/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
    end script
    The phrase, "a prince among men" comes to mind. Thank you kindly.
  8. buyrihn's Avatar
    Posts
    449 Posts
    Global Posts
    453 Global Posts
    #8  
    Update:

    This was absurdly simple in execution. After following the instructions and lastly modifying the iptables, I restarted the phone. It came back up, I made sure bluetooth was on, then added a new Bluetooth device on my Mac. The Pre was found, and a new PAN (Personal Area Network) was established. I turned off the WiFi on my laptop, and connected to the PAN (click the Bluetooth icon in your menu bar, then click the Pre). Flawless. I had the Pre connected to my wireless network, so I don't know how quick it'll be using EVDO, (and at the risk of offending some of the more Neanderthal among us) it's so simple a caveman could do it.

    Thanks again.

    Update (again): I tried using EvDo. It works, but it's molasses slow. I'm guessing part of this may be because I'm connecting via Bluetooth. How would I connect via USB instead?
  9.    #9  
    follow the instructions on enabling usbnet, I think you can find it on the predev wiki.
  10. #10  
    Wow, that was almost too easy! Thanks so much for keeping after it.

    I'm posting this from my newly tethered Pre. It's not super speedy, but good enough for the rare cases when I'll actually need it. Rock on!
  11. #11  
    Update: while the screen was refreshing I turned on Outlook. The Pre popped up a notice that it wanted to turn on WiFi because there was no network connection available. When I dismissed the notice, everything in Firefox stopped and I had to restart to get going again. So maybe we can only browse, but that's ok. I can still use web based email.
  12. mfive's Avatar
    Posts
    186 Posts
    Global Posts
    193 Global Posts
    #12  
    Quote Originally Posted by Prefect View Post
    Update: while the screen was refreshing I turned on Outlook. The Pre popped up a notice that it wanted to turn on WiFi because there was no network connection available. When I dismissed the notice, everything in Firefox stopped and I had to restart to get going again. So maybe we can only browse, but that's ok. I can still use web based email.
    An internet connection should be an internet connection, you shouldn't be limited to just browsing or checking email...
  13. eesucks's Avatar
    Posts
    62 Posts
    Global Posts
    66 Global Posts
    #13  
    Wow, this is completely awesome. I'm also posting from a tethered Pre.

    And you get to charge your phone at the same time (via USB)!
  14. #14  
    nice find! trying it as we speak. Hopefully this works would like to use laptop on Bus ride Commute
  15. #15  
    Quote Originally Posted by zeropoint46 View Post
    hello all,

    I'm new here but I love the site. I posted this on the "possible tether work-around" thread but I wanted to make sure everybody got a chance to see it, and that thread is pretty long now. I used to have my 800w hacked for tethering and when I found the options of tethering available to the pre (so far) they just didn't quite cut it. I didn't want to have to ssh to my phone and use a socks proxy or run an app to shut down pmconnectionmanager every time I wanted to connect, so I modified the connectionmanager program to stop change ip_forward to 0. Here are the steps:

    Prerequisites:
    rooted pre
    ssh access (dropbear or openssh)
    ability to use VI or editor of your choice

    optional prereq:
    usbnet setup and dhcp setup

    1) ssh to the phone, sudo to root and go to /usr/bin

    2) cp PmConnectionManager PmConnectionManager.orig just in case you mess something up

    3) stop PmConnectionManager

    4) vi PmConnectionManager and do a find for "forward" (with vi you use / then the string you are looking for)

    5) the third "forward" you find should say "Disabling IP Forwarding^@0^@^@^@"

    6) change the 0 to a 1, save and quit

    7) start PmConnectionManager

    I did this and kept checking my /proc/sys/net/ipv4/ip_forward file and it is now staying at 1. with this and the correct IPtable rules I can just connect my phone via usb or bluetooth and get right on the net without ssh or anything else. I rebooted the phone many times and it has stuck also the iptable rull I'm using looks something like this:

    iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

    I added that iptable rule to my dropbear upstart script so it gets added on startup. If you wanted to make a separate upstart you could, but I was too lazy. I'm using webOS 1.0.4 and it's working great. Let me know if you have any questions. thanks.
    Sorry to be so ignorant here, but I really want to do this and haven't fooled with this sorta thing before.. have only installed the SDK for USB installing homebrew apps. Anyway, you mention:

    "optional prereq:
    usbnet setup and dhcp setup"

    But I don't see any of that listed in your instructions, is that not necessary?
    Thanks,
  16.    #16  
    I did not list it because you can find it on predev wiki. I should have probably posted a link to it before because it's probably highly desirable with this mod. so here it is.

    pre dev wiki: USBnet networking setup


    make sure and do the optional dhcp setup as well. Let me know if you have any other questions.
  17. #17  
    Could you post your PmConnectionManager I cant edit mine in osx. Also if you could post your dropbear script I would be very grateful.
  18. #18  
    Ok, I have DHCP set up on usb0 via predev and I followed your instructions here but something is not right. When i plug the usb up I get a ip address of 192.168.0.12.
    My gateway is 192.168.0.202 as is my DNS.

    I have no connection to the internet. At least not with DNS. I haven't tried a IP but i need DNS of course. Am I missing something?

    What should the DNS be? Sprints DNS servers? or 192.168.0.12? I doubt it is 192.168.0.202 as that address is not on my usbnet or is it a virtual interface bridge to ppp0? If it is wrong, how do I change it on my pre?

    Thanks

    ok i figured out the ip was coming from the pres usb0, but i still have no connection to the internet :/


    edit2: nvm sorry must of been the firewall rule after reboot it worked fine getting about 75 KB/s average

    edit3: ok, it looks like I can only have one or the other. Whith the modified PmConnectionManager in place. the pre will not operate over its EVDO. It pops up a no network connection dialog.
    Last edited by fain; 07/07/2009 at 01:50 AM.
  19.    #19  
    as I post this message I'm am downloading and watching youtube on my phone. so there might be something wrong with your config. about posting the files I would be more than willing but I dont wanna violate any terms on this forum. PM me and I will help you.
  20. Zyphlin's Avatar
    Posts
    564 Posts
    Global Posts
    565 Global Posts
    #20  
    Quote Originally Posted by mfive View Post
    An internet connection should be an internet connection, you shouldn't be limited to just browsing or checking email...
    Well, when you're hacking your phone to do something your service plan isn't allowing for, IE stealing service, I wouldn't really complain that its not doing what an "internet connection" should be doing.

    Graet find here though. Seems the easiest of all the tether work arounds. I don't know much about a lot of the programming though so how hard would it be possibly in the future to write a program that essentially automatically goes in and switches that setting?
Page 1 of 9 123456 ... LastLast

Posting Permissions