jumaris / sshtunnel

Automatically exported from code.google.com/p/sshtunnel
GNU General Public License v3.0
1 stars 0 forks source link

Global proxy works on wifi, but not on 3G #137

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
1. Set up working ssh tunnel with socks enabled global proxy
2. Test that it works on wifi by accessing a site like whatsmyip.org
3. Turn off ssh tunnel, turn off wifi. 
4. Turn on ssh tunnel (it connects fine)
5. Test access whatsmyip.org

When testing on wifi I see the IP address of my server in the phone's browser. 
When testing on the cell network i.e. 3G I see the IP address of the phone.

My phone is a rooted HTC One S with stock firmware 2.21.401.10 (global edition)

I have tested with Connectbot and I can establish an ssh session with my server 
over 3G fine. SSH Tunnel also seems to establish the ssh session fine - no 
errors occur. I assume this means the issue is with the global proxy part of 
SSH Tunnel.

Let me know if I can provide any other information.

Original issue reported on code.google.com by rsdoug...@gmail.com on 28 Aug 2012 at 2:39

GoogleCodeExporter commented 8 years ago
I have the same issue, I think it has to do with 3G provider using a proxy...
I also think it is not limited to the SOCKS (dynamic) proxy, but also for 
static local port forward..
In my case, I can replicate the steps you mentioned.. I also cannot even get a 
local port forward (ie: ssh -L 127.0.0.1:9999:192.168.1.1:80) to work over 3G.

Although everything works fine over WiFi.
I would be curious to test if it comes from the phone or the provider network.. 
namely, get my hands on another rooted phone from my carrier, connect my 
current phone using WifI tethering to that 3G phone and see if it works or not. 
(ie: if it's the phone that is confused about the proxy settings or whatnot.. 
or if it's the provider network that somehow screw things up... I'll let you 
know when I get the time to test this.
Can you confirm if you have static port forwards working over 3G ?
Thanks,

Original comment by PM.L...@gmail.com on 4 Sep 2012 at 2:29

GoogleCodeExporter commented 8 years ago
My situation is similar but slightly different:
1. Set up working ssh tunnel with socks enabled global proxy
2. Test that it works on wifi by accessing a site like whatsmyip.org
3. Turn off ssh tunnel, turn off wifi, connect to 3G.
4. Turn on ssh tunnel (it connects fine)
5. I get "A network error has occured" with any website

I also tried the following:
1. Set up working ssh tunnel with socks enabled global proxy on phone #1
2. Set up tethering on another phone (#2) from the same carrier
3. Connect phone #1 to phone #2 using WiFi
4. Turn on ssh tunnel (it connects fine) and proxy works as expected

I would think it is related to how the app actually catches the traffic to then 
send it through the tunnel (iptables ?)
I'm on CM9, Moto Droid 3

Note: I tried accessing a web server running on port 8077 at home, without 
success.
After switching the listening port to 80 on the server, it works.
I ran Wireshark on the web server and packets on ports other than 80 don't get 
sent through the tunnel.

Original comment by PM.L...@gmail.com on 5 Sep 2012 at 3:27

GoogleCodeExporter commented 8 years ago
Ok, so it turns out it was an operator / APN issue. My operator (Vodacom South 
Africa) has 2 APNs, "Internet" and "Vodacom LIVE". Vodacom LIVE was selected by 
default and appears to use a proxy, because I switched over to the standard 
Internet APN and SSH Tunnel is now working perfectly.

I'm not sure how it took me so long to pick this up :(

Original comment by rsdoug...@gmail.com on 9 Oct 2012 at 7:09

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I have a Galaxy S2 International rooted with a mainly stock app custom Rom.
I too can't get the program to work over HSPA or 3G.  It just hangs when I goto 
any of my web browsers, which is all I'm interested in.  I individually select 
Chrome, Dolphin and the stock browser.  If I'm on WiFi then no problems at all. 
 All browsers work perfectly and quite fast.

Network: Koodo (Telus Canada)
Phone:   Galaxy S2 i9100 (SIM International)
Rooted phone with Custom ROM: Thebyani
SSHTunnel Version: 1.5.6
SSH Server type: my Private Linux Mint 13 computer with openssh-server

Original comment by shanman...@gmail.com on 18 Feb 2013 at 5:30

GoogleCodeExporter commented 8 years ago
Shanman, I myself can't use the OP's solution to change APNs for one without 
carrier-side proxy.(asthey don't offer it)
There are, however, alternative solutions, such as using OpenVPN. ore 
complicated to setup but as easy to use.. but does work over 3g..

Original comment by PM.L...@gmail.com on 18 Feb 2013 at 11:53