2

I have a Samsung Galaxy S3 Mini running Android 4.1.2. I have a regular 3G voice & data plan with an Optus reseller in Australia. I often access the Internet from my laptop via bluetooth tethering on this phone and it works beautifully, except for one small problem.

I have several web servers that I access via SSH but I have configured the SSH servers to listen on non-standard port numbers. Although I have selected very large port numbers (ie. greater than 33,000), according to the TCP/IP standard they are valid numbers so they should work fine. Indeed, I have been happily SSH-ing to these servers for years on my wired connections at home and work, but have never been able to access them when tethering.

I have just spent several hours searching the web trying to find out if this is a carrier issue or an Android issue but found nothing useful.

[Additional Notes] The configuration is as follows: laptop is paired via Bluetooth to the phone. The phone has "Bluetooth tethering" enabled so that I can share the phone's Internet connection with the laptop. So the laptop connects to the phone, the phone connects to the Internet via 3G.

  • Can you please edit your question and include some details on the "when tethering" constellation? Where is the device you want to reach? WiFi or USB tethering? Normal or "reverse tethering"? – Izzy Feb 14 '14 at 8:47
  • Hopefully my additional notes have cleared this up. – JamesG Feb 16 '14 at 23:25
  • Connections are clear now, thanks! Can you also give an example of where you have been unable to connect: where is the server you try to connect, from where are you trying, and what would be the "path"? I guess you try to connect from your Android device to e.g. (behind) the tethered laptop? – Izzy Feb 16 '14 at 23:37
  • laptop -> bluetooth -> phone -> 3G -> Internet -> server – JamesG Feb 17 '14 at 23:25
  • 1
    For the record, I just had the opportunity to set up a new server so I left the ssh server listening on the standard port (22). I could connect OK when tethering. So the problem really does seem like either Android or my carrier is arbitrarily blocking a certain range of ports. – JamesG Feb 18 '14 at 4:45
1

The answer to this question is that no, neither Android nor my carrier are arbitrarily blocking traffic on high-numbered ports.

The problem is that I had forgotten how paranoid I am about security and that, in addition to making SSH listen on a non-standard port, I had also created an iptables rule to only allow connections to that port from my home IP address and my work IP address. Obviously I was using a different IP address when attempting to connect via my phone, hence the failure to connect. (And I probably didn't look hard enough when prompted by @Izzy to check server logs, because I'm sure there is a record of the blocked connection attempt in there somewhere). D'oh...

My apologies for wasting people's time, but in case anybody else thinks they have a problem with Android or their carrier arbitrarily blocking ports, hopefully this answer will prompt them to triple check everything about their connection, including their server firewall, before they go off logging tickets.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.