I have a Linux Ubuntu instance running on AWS EC2. On this instance I have a service running on localhost:8889
, which means the service runs on port 8889 on the instance's localhost.
I want to access this localhost address from my Mac. I've already tried to access it using the following addresses but none has worked:
http://<public-dns>:8889
http://<public-ip>:8889
http://<private-ip>:8889
I've also tried to search for it in Google, but so far none if the methods worked for me, including associating an Elastic IP address to the instance and editing the Inbound and Outbound rules on the security group to allow the port to everyone.
I have read something about Port Forwarding but I'm not sure that I'm completely understanding it. I have understand the idea of it, but I didn't understand how to do it.
If you could please help me figure out how to access to the instance's localhost using port forwarding that would be great. I realized it has something to do with the terminal, but I didn't understand where I need to run the command (on the Mac or on the instance), and what are the parameters I need to use.