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 my desktop computer. On this machine I also run Tomcat for my Java development so that I can visit my local address:

 http://192.168.1.1:8080/myapp

Now I go to whatsmyip.com and get my IP lets say it is: 119.56.1.78

Now what I want is that: I go to another PC (not on my LAN) or any PC around the world connected to Internet and type the following address:

http:// 119.56.1.78:8080/myapp

this should show me the same page that I can access locally from http:// 192.168.1.1:8080/myapp.

Is this possible?

share|improve this question

migrated from stackoverflow.com Jan 2 '13 at 3:14

This question came from our site for professional and enthusiast programmers.

2  
Yes it's possibile, did you tried it? –  Atropo Dec 28 '12 at 12:03

3 Answers 3

up vote 2 down vote accepted

Yes, it is possible. It is called "Port Forwarding".

119.56.1.78 - is your public IP address.
192.168.1.1 - is your private IP address on the LAN.

Very good articale with pictures is here:
How to Forward Ports on Your Router

share|improve this answer

Yes it is, even though this is not programming related and you should ask on superuser.

What you need to do is forward your 8080 port through your router. if you're IP changes (you have a dynamic IP or a static IP, this is determined by your ISP) you can get a host name from dyndns and set up your router to update dyndns with your new IP when it changes. this will allow you to access your application like so: hostname.dynsns.org/your_app.


Alternatively, you can rent a hosted server and a domain name.

share|improve this answer

Please look into the following article which expains you about the static and dynamic ips you need to have static ip or a domain name to host your app so that you can access it publicly. hope the link helps you

share|improve this answer

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.