0

I'm making the android game and my own JAVA server. I want to run that server on my own computer. I don't really need to run it anywhere else, so I really don't need other solution (payed hosts, etc...). I need a static IP access to my computer. Currently im using no-ip.com to do that, but I'm having trouble accessing received data. On my server Im listening on a specific port using DatagramSocket.receive(), and on the other side Im sending data to :

InetAddress.getByName(HostName.no-ip.biz):port(the port my server is listening to)

I can see that im sending data to the right address ( same address DUC is showing me), but server doesnt catch that data.

If anyone has some experience in using no-ip.com to gain static IP please help.

P.S. Currently I have internet access via iPhone tethering, so no having real router could be the reason behind this. I have read that i don't need port forwarding on cell-phone because my ISP is doing NAT for me. Any workarounds?

Is it just installing DUC on my computer enough to work with no-ip?

Any easier (free) way to get static IP?

klo
  • 414
  • 2
  • 6
  • 14
  • Arent you able to set your own static IP address when you're connected to your iphone device? If you're using you iphone as an AP, and you're connected to it, you should be able to set your static IP address under (assuming you're using IPv4) your IPv4 settings for that connection. – Daniel Mac Aug 26 '13 at 12:36
  • I'm currently using iPhone because I am out of town. I will be back on classical router in couple of days... I really need a solution that will work in any place (so i can, if necessary, put a whole laptop in another place or install server on different comp and get same results) ... – klo Aug 26 '13 at 12:45

1 Answers1

0

This seems like a port forwarding problem to me.

No-IP resolves the external IP address of your iPhone for you, so your packets go there. The iPhone does not know how to handle them. You would need to forward them from your iPhone to your local PC's IP address, but I do not know if that is possible.

When using your router at home, port forwarding should be no problem at all.

  • Shouldn't all ports be open? – klo Aug 26 '13 at 13:39
  • The problem is, since you access the internet via your iPhone, your local IP address gets masqueraded, so that everyone in the Internet can only see the external IP address of your iPhone and all the requests go there. When your iPhone recieves the request from your game client it just drops it since it does not know that it should forward it to your server. – jwinkler Aug 27 '13 at 08:36