Trigger API on a Machine with private IP

0

I have an API server running on my local machine. I would like to trigger that API from an AWS instance. The machine's IP is assigned through NAT.

Is there any way to trigger the API from outside the local Network?

Pravesh Jain

Posted 2016-03-05T18:12:20.703

Reputation: 101

That's the whole point of a local network - to be local and not visible from other networks. If it was visible from the internet then it wouldn't have been a local network anymore. Of course you could configure your router to NAT some of your local machine ports to a publicly visible IP on the internet. Unfortunately configuring routers is off-topic for StackOverflow. You might have better luck with it on ServerFault. – Darin Dimitrov – 2016-03-05T18:17:03.300

Answers

1

There are a lot of ways the setup you describe could be implemented. I'm going to assume you have a personal or SOHO router that is providing your NAT service and supports port forwarding.

  • Setup port forwarding between the outside world and the computer providing the service.
  • Arrange for any firewalls to permit this incoming traffic.
  • Determine your public facing IP and use that from your AWS instance to access the service. (whatismyipaddress.com can help with this. This IP can change; you may need to use a dynamic DNS service to turn it into something you can reliably access.)

These are the basic steps. How to accomplish these steps is highly dependent on the hardware, software, and services you are using.

Ouroborus

Posted 2016-03-05T18:12:20.703

Reputation: 2 549