Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

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.

share|improve this answer
    
Thank for your clear answer, unfortunately, I can't vote up for you. Appreciate your kind help. –  Tar_Tw45 May 8 '13 at 6:42
add comment

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.

share|improve this answer
    
Thank for your clear answer, unfortunately, I can't vote up for you. Appreciate your kind help. –  Tar_Tw45 May 8 '13 at 6:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.