开发者

accessing app from public ip

I have one linux server which has one public ip. I have deployed one webapp which I can access using internal ip address like - http://[internal_IP]:8080/blackbox/Index.jsp which works. but when I try to access the same from public ip http://[public_IP]:8080/blackbox/Index.jsp, it does no开发者_JAVA技巧t work. Can you please suggest how can I make it work?


Make sure Tomcat is listening on your public interface by:

netstat -an

Listening on *:8080 is ok, but 127.0.0.1:8080 means it is only listening on the local loopback interface.

Also check your topology. There can be a local firewall software stopping incoming traffic. Also if you are behind a NAT, the port has to be forwarded to your macine.


If you're using a consumer grade router, it might be the problem. I've come across way too many cheap routers that got confused when you tried to connect from your LAN to your external IP... But it all works fine if you connect from outside your LAN.

So check that other networking services or such work if you connect using your external IP.


It can be your linux firewall, or your router is not portforwarded for this service.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜