I know there are various documents available on web giving the steps to do this but I am not able to fix the problem -- I have an angularjs project which is running on localhost (and os is ubuntu 14.04), I want to access it via external ip.
Here is a snippet from the project's config file -
options: {
port: 9000,
// Change this to '0.0.0.0' to access the server from outside.
//hostname: 'localhost'
...
...
}
I have changed localhost
to 0.0.0.0
This is now allowing me to access the application by internal ip -
192.168.X.X:9000
The problem is that I can't access the same with external ip. I have a router and I have setup port forwarding in router configuration which I was hoping could solve the problem but it didn't.
I also tried adding the following line in /etc/hosts -
<my external ip> localhost
<my external ip> 127.0.0.1
This makes no difference. I am not sure what is wrong and cant figure out even after spending few days searching for solution.
update --
This seems to be a restriction with the internet connection which is not allowing such port forwarding. Though I can successfully do a ssh port forwarding.
I tried the same on a different network and was able to access localhost by external ip.
sudo netstat -pant | grep 9000
on the server?