Java Connect Over A Socket Using Public IP Address -


i'm trying connect other computer. works want once use "localhost" ip address. if try put in public ip, client cannot find server running although is. if switch "localhost" works again.

i'm using router or modem or how call these things split internet 4 people + wireless. have port forwarded, still can't work. problems might encountering? don't think problem code since works "localhost", unless need when switching public ip.

i tried disable firewall , still didn't work. when checked ip address said ip static, don't see difference.

any thoughts/ideas appreciated.

there 2 possible problems can think of:

  1. you didn't forward ports correctly, or there's other problem router configuration. in case, question better asked on superuser.
  2. your server listening on loopback interface. make sure in server code have set listen on 0.0.0.0, or whatever library/os equivalent is.

Comments