webOS Nation Forums
> webOS apps and software
> webOS development
>
Possible tether work-around
1 2 3 4
5 6 7 8 9 14
...
Last
Originally Posted by grindz145:
@fish what do you mean by this:
Then type in about:config, enter 'dns' in filter and double click network.proxy.socks_remote_dns
I setup the proxy and connection just fine but it dosn't want to pass traffic (likely because DNS is not setup properly) I feel like I should already know this but ... n00b.
Thanks.
If you use the FoxyProxy extension, you should not need this extra step.
Member:
kmehr
at: 04:55 PM 06/16/2009
looks like this is going to be a no go for me for now... maybe when I have more time I will see if I can access the root in Win 7. Thanks for all the help and advice
Member:
OpenBGP
at: 05:10 PM 06/16/2009
I haven't got my pre yet but I am anxious to try one of these methods. Does anyone know which one works better adhoc or bluetooth?
Originally Posted by grindz145:
@fish what do you mean by this:
Then type in about:config, enter 'dns' in filter and double click network.proxy.socks_remote_dns
I setup the proxy and connection just fine but it dosn't want to pass traffic (likely because DNS is not setup properly) I feel like I should already know this but ... n00b.
Thanks.
This tells Firefox to route DNS though the proxy as well as regular traffic. Type 'about
:config' into your URL bar and press enter. Firefox might give a warning, click 'I'll be carefull, I promise!'. Then at the top of the page there is a text box where you enter a filter. Type in 'dns'. You should see ~4 properties listed, double click the line that says 'network.proxy.socks_remote_dns', so that in the value column it says true.
Member:
kmehr
at: 06:22 PM 06/16/2009
ok I gave it another stab and finally rooted device and connected via putty, but after that I come to a road-block. I have the settings in Firefox set, but when I log in and type in my password I get (*************@castle:~$) in the putty consle. Also no net conectivity on PC.
Any help?
xcomputerman great suggestion! I finally got it to work right using foxyproxy.
Thanks for the explanation fish, I was a little too sleep deprived the first try:-d
Member:
dsackr
at: 05:27 AM 06/17/2009
you don't have to setup firefox or IE to use the socks proxy - here is what I did:
Root your phone (use the wiki linked in this thread several times)
Connect using Personal Area Network (PAN - bluetooth)
Most technical part:
using putty or ssh, connect to Pre (over ip 10.1.1.10)
log in as the user id you created when you root'ed your phone
type 'sudo su -'
type your password
First time only:
type 'vi tether.sh'
hit the letter i
paste this portion of fish199902's code:
#---------------- begin code --------------------------
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
while true; do
# This value resets iteself to 0 periodically, anyone know why?
echo 1 > /proc/sys/net/ipv4/ip_forward
sleep 10
done
#---------------- end code --------------------------
hit esc
type ':wq'
hit enter
this should have created a file called tether.sh with the code from above in it, and those steps are a one time only event.
type '. ./tether.sh' and hit enter
you should now be able to surf the web without setting up proxies on your laptop. In the future, you only need to connect to pan - putty/ssh to the phone and run tether.sh as root. - hope that helps
Member:
joshewah
at: 06:37 AM 06/17/2009
Explains why my attempts ad modifying the firewall rules failed, if it keeps turning off up forwarding that would disable it.
@dsacker you can also install a graphical shell using your web browser which then would allow you to execute the script without ssh at all.
pre dev wiki: Graphical Shell
Edit: on second thought, you may need to still SSH over BT. This would work with wifi rule but you would have to change the script a bit.
Member:
cwlong88
at: 12:25 PM 06/17/2009
Anybody having problems connecting to the NAP? I can pair with the Pre, and set up a hands-free connection, but I keep getting errors the device is busy when trying to connect with NAP. I know it works because I was successful yesterday but haven't been able to re-connect with it since. Reinstalled BT drivers a couple times, unpaired the device, rebooted the Pre, etc...all same thing.
Any ideas?
Pairing seems to work best for me right after the bluetooth configuration window is opened and turned on. I think it probably sends out a bunch of packets then so it's easier to pair.
Member:
wprater
at: 04:25 AM 06/18/2009
IP Forward trick works great! I did this on OS X with no issues. you need to make sure you turn off wifi on the pre though.
Member:
rmp459
at: 07:14 AM 06/18/2009
Originally Posted by kmehr:
Unfortunately I am running win 7 64-bit and it will not work for me 
I can second this...
Member:
rmp459
at: 07:32 AM 06/18/2009
Originally Posted by dsackr:
you don't have to setup firefox or IE to use the socks proxy - here is what I did:
Root your phone (use the wiki linked in this thread several times)
Connect using Personal Area Network (PAN - bluetooth)
Most technical part:
using putty or ssh, connect to Pre (over ip 10.1.1.10)
log in as the user id you created when you root'ed your phone
type 'sudo su -'
type your password
First time only:
type 'vi tether.sh'
hit the letter i
paste this portion of fish199902's code:
#---------------- begin code --------------------------
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
while true; do
# This value resets iteself to 0 periodically, anyone know why?
echo 1 > /proc/sys/net/ipv4/ip_forward
sleep 10
done
#---------------- end code --------------------------
hit esc
type ':wq'
hit enter
this should have created a file called tether.sh with the code from above in it, and those steps are a one time only event.
type '. ./tether.sh' and hit enter
you should now be able to surf the web without setting up proxies on your laptop. In the future, you only need to connect to pan - putty/ssh to the phone and run tether.sh as root. - hope that helps
When I try to execute this file I get permission denied... any ideas?
RMP, you have to run as root, try using the sudo or su command, or google these to do a bit more reading on how it works. you can also use a chmod command to make it executable by your main user.
Member:
mykael
at: 11:56 AM 06/18/2009
Originally Posted by wprater:
IP Forward trick works great! I did this on OS X with no issues. you need to make sure you turn off wifi on the pre though.
Hmm How do you get such good speeds. With 4 bars of Ev DO I only get .20/.20 down/up. Its really sluggish...
Member:
rmp459
at: 06:12 PM 06/18/2009
Originally Posted by grindz145:
RMP, you have to run as root, try using the sudo or su command, or google these to do a bit more reading on how it works. you can also use a chmod command to make it executable by your main user.
I am running as root... and I have used sudo ... lol ive tried to chmod as well to make it RW... but no luck.. I guess ill keep trying...
Somehow my root filesystem is read only...
Originally Posted by rmp459:
When I try to execute this file I get permission denied... any ideas?
chmod 755 ./tether.sh
./tether.sh
and it should run.
Note that the phone waking every 10 seconds to send that "1" to ip_forward will probably affect battery life. You might want to kill the tether.sh script when you're done.
ps aux |grep tether
(get the number)
kill 1234
-Z
Member:
rmp459
at: 06:45 PM 06/18/2009
Originally Posted by zorinlynx:
chmod 755 ./tether.sh
./tether.sh
and it should run.
Note that the phone waking every 10 seconds to send that "1" to ip_forward will probably affect battery life. You might want to kill the tether.sh script when you're done.
ps aux |grep tether
(get the number)
kill 1234

-Z
Thanks for the kill info... only problem is I can't even write the tether.sh file...
Ive tried even "sudo vi tether.sh" but when I try to write and quit it says "tether.sh Read-only file system"
Im guessing I have to remount the file system as rw somehow...
EDIT: okay i remounted my filesystem as rw and was able to write tether.sh.... is it okay to leave the filesystem as rw? or should I remount it back to ro?
Also, (lol god i suck) "./tether.sh: line 4: iptables: not found" when I try to run it
Member:
dsackr
at: 01:09 AM 06/19/2009
Originally Posted by rmp459:
Also, (lol god i suck) "./tether.sh: line 4: iptables: not found" when I try to run it
The issue is you don't have the path in your $PATH variable - I don't type sudo before each command - instead I type this:
sudo su -
You then become root and all subsequent comments are executed as root and does not need the sudo prefix...
1 2 3 4
5 6 7 8 9 14
...
Last
webOS Nation Forums
> webOS apps and software
> webOS development
>
Possible tether work-around