Results 1 to 3 of 3
  1. #1
    Knetic is offline Member
    Join Date
    Feb 2011
    Posts
    2
    Rep Power
    0

    Default Serversocket for external IP

    I'm trying to create a client/server pairing that allows me to send basic remote commands to my computers from my Droid. I managed to get everything working locally, the protocol works great and the phone chugs like a champ on its own, however i've come onto a seemingly undocumented problem.

    My server (the computer being told what to do) will not accept internet connections through a ServerSocket. When my clients attempt to connect to its external IP (acquired through ipchicken or whatismyip), the server simply ignores it. It never sees the connection.

    LAN connections and localhost connections work like a charm.

    I've gone through and checked every possible adapter, i've only got two (localhost and LAN). I tried binding to 0.0.0.0 (which is what i thought would work best), that didn't work, so i bound to my lan ip (which acts precisely the same).

    My home network is dead simple, just a modem with router and two computers plugged to that. It's nothing crazy, it's totally standard stuff.

    I'm stumped. Is there something i need to do on a regular windows XP (or vista) machine to allow internet-accepting sockets to come through? Is there some constructor i need to use in java to make this work?

  2. #2
    toadaly is offline Senior Member
    Join Date
    Jan 2009
    Posts
    671
    Rep Power
    6

    Default

    I suspect you're running into a firewall issue on your router or antivirus. By default, routers are configured to deny incoming socket requests except for a few predefined ports related to things like mail, peer-to-peer chat, etc.

  3. #3
    Knetic is offline Member
    Join Date
    Feb 2011
    Posts
    2
    Rep Power
    0

    Default

    Oh, hah now i feel stupid. You were right, i had accidentally forwarded my port to the other computer in my LAN (xx.xx.xx.2 instead of xx.xx.xx.3), go me!

    Thanks :o

Similar Threads

  1. Having trouble with ServerSocket
    By providence in forum New To Java
    Replies: 1
    Last Post: 01-29-2011, 04:05 AM
  2. HTTP ServerSocket
    By Dennis in forum Advanced Java
    Replies: 0
    Last Post: 12-01-2010, 03:27 PM
  3. ServerSocket.accept() using 100%+ CPU
    By pagod in forum Networking
    Replies: 2
    Last Post: 05-28-2010, 10:42 AM
  4. serversocket listen connection
    By gisler in forum Networking
    Replies: 1
    Last Post: 12-17-2009, 03:57 AM
  5. problem with ServerSocket on Linux
    By gabriel in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 05:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •