1

I'm working on a mobile phone application which has to send a TCP command to from external network (like a coffee shop or it's connecting to 3G) to a specific device in home network. Let's say

  • A router has real IP address of 123.123.123.123 and private IP address of 192.168.0.1
  • A device has private IP address of 192.168.0.101
  • A device is listening to incoming TCP command on port 1000 and 2000

My questions are:

  • In my mobile application, I need to send command to 123.123.123.123 right? If that's so, on which port?
  • What configuration do I have to do on the router so that it pass this command to the desire device.

I've no idea how to do this since I've never been working with network stuff since I graduated years ago.

2 Answers 2

1

which port? either port 1000 or 2000 So, it goes to 123.123.23.123:1000 or :2000

what configuration on your router? well, you'd be using NAT/PAT/port forwarding, so you set the NAT router to forward anything it receives on port 1000 or 2000, to the device 192.168.0.101:1000 or :2000.

1
  • Thank for your clear answer, unfortunately, I can't vote up for you. Appreciate your kind help.
    – Tar_Tw45
    May 8, 2013 at 6:42
1

You need to configure your router so that the router knows that if it receives a packet directed to address 123.123.123.123 and port 1000 (or 2000) the packet must be forwarded to 192.168.0.101 and port 1000 (or 2000).

This function is named differently by different manufacturers. Look for "virtual server", "port forwarding", "destination nat", "reverse nat", etc.

1
  • Thank for your clear answer, unfortunately, I can't vote up for you. Appreciate your kind help.
    – Tar_Tw45
    May 8, 2013 at 6:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .