3G and Wifi

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

3G and Wifi

Postby madkins » Wed Mar 04, 2009 3:06 pm

Hello.

This is an odd one. Atleast for me it is. I wrote an app that opens a socket to see if a port is responsive on a specific host. This works great in the emulator and on wifi, but when I run it on 3g it always shows the port is up and running. I put out some debug statements, it is true, it is connected to the specific host / port. Any ideas why this would occur?

Does 3g require extra permissions? Is the tmo firewall doing some sort of nat on it? STRANGE!!!!

Thanks.
madkins
madkins
Junior Developer
Junior Developer
 
Posts: 10
Joined: Fri Nov 21, 2008 1:09 pm

Top

Postby torpor » Wed Mar 04, 2009 3:30 pm

More than likely your 3G provider is running all traffic on its network through a proxy, and since they have no way to know for sure, the proxy is 'wide open' on all ports .. bad proxy! Its reporting open a port that isn't really open or serviced ..
torpor
Junior Developer
Junior Developer
 
Posts: 13
Joined: Tue Feb 24, 2009 12:23 pm

Postby madkins » Wed Mar 04, 2009 3:36 pm

I was just talking to a co-worker about it and he was saying the same thing. If that is it, how do you resolve it?

Any ideas?

madkins
madkins
Junior Developer
Junior Developer
 
Posts: 10
Joined: Fri Nov 21, 2008 1:09 pm

Postby torpor » Wed Mar 04, 2009 4:23 pm

No idea how to fix it ... but maybe some in the portscan communities do ...
torpor
Junior Developer
Junior Developer
 
Posts: 13
Joined: Tue Feb 24, 2009 12:23 pm

Postby madkins » Fri Mar 06, 2009 8:20 pm

This is just freaking odd.

I changed the code to print out a message, then wait for a reply. This works great for most of the ports but http (80), 80 always times out and there is nothing ever returned. Any ideas on how to trap http ports and keep them from timing out.

This is what I do.

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.                      try {
  2.  
  3.                                  out = new PrintWriter(new BufferedWriter( new OutputStreamWriter(socket.getOutputStream())),true);
  4.  
  5.                                  out.println("GET");
  6.  
  7.                                  out.println("quit");
  8.  
  9.  
  10.  
  11.                                  in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
  12.  
  13.                                  //I don't care what the data is, just give me something
  14.  
  15.                                  int myData = in.read();
  16.  
  17.  
  18.  
  19.                      } catch(Exception e) {
  20.  
  21.                                    socket.close();
  22.  
  23.                                    socket = null;
  24.  
  25.                                    out = null;
  26.  
  27.                                    return "Down";
  28.  
  29.                      }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4



Any other ideas on how to fix this?
madkins
Junior Developer
Junior Developer
 
Posts: 10
Joined: Fri Nov 21, 2008 1:09 pm

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 7 guests