I have created a web application in Eclipse, and a DB2 database server is running on my PC. I can access the web application through the address http://localhost:8080/LimsWeb

I used Team Viewer software to establish a remote desktop connection.

Can my friend somehow connect to my PC so that when he types the above URL in his browser he will be able to fetch the pages of the application?

I was able to do this by connecting with remote desktop mode. But in that case my friend was able to use the application which I created running on my PC only and in the window provided by Team Viewer. I want to configure it so that he can run the application on his own computer calling the given URL from his own browser.

  • This isn't really a remote desktop question--it's actually more of a general networking question.
    – rob
    Commented Jul 22, 2010 at 7:27
  • Just following up...have you had any luck getting it to work?
    – rob
    Commented Jul 26, 2010 at 21:56

3 Answers 3


Connecting from the same LAN

If your friend is on the same local network as you, it's very simple: make sure any software firewalls on your computer are configured to accept connections from remote computers on port 8080, then have your friend replace "localhost" in your URL with your IP address or hostname--for instance, (assuming that is your IP address) or http://lims-pc:8080/LimsWeb.

Connecting over the Internet

But suppose your friend is somewhere else, and the Internet lies between you and him...then you have to do a little extra. You'll have to configure your firewall software just as you did for the LAN instructions, but you'll also need to do some additional network configuration.

Option 1: VPN

If you only want your friend to be able to connect to the web service running on your PC, the easiest solution is probably to set up a VPN. Some wireless routers have VPN support built-in (and with some others, you can install a version of DD-WRT with VPN support), but you can also use something like Hamachi or OpenVPN.

Option 2: Port forwarding/DMZ

If you have administrative privileges on your router (or know someone who does), you can also configure port forwarding or (even scarier) DMZ to allow outside computers to connect directly to your PC. As alemjerus mentioned, you can also set up a dynamic DNS service or some other DNS provider (e.g., dyndns.org, no-ip.com) to point to your Internet IP, so your friend can connect more easily without having to remember your IP address. But personally, I wouldn't recommend going this route, especially not if you happen to be in a corporate environment.

Using the right hostname/IP address

But that's only half of it. As you might have already guessed, your friend won't be able to connect to your computer via the address http://localhost:8080/LimsWeb, because "localhost" is exactly that--the local computer. Once you settle on an appropriate mechanism to make your computer visible to his, he'll have to use your LAN IP address or hostname (if you used a VPN) or your public IP address or hostname on the Internet (if you used port forwarding or DMZ).


There are many methods to do this - the difference is security, easiness of the configuration and cost of the solution.

I will add one more option for this (port forwarding and VPN are described above)

Tunneling - this will allow to securely tunnel to your database and your web server (https:// enabled) whenever you want! For this you can use free tunneling services TunnelIn or Ngrok . The process of both services are very straight forward i.e. Register a User, Connect your machine/device to service, use Web interface to open/close secure tunnels to the machine in case of TunnelIn or run couple of commands for Ngrok.


It should not be complicated. First, you can install yourself something like no-ip.com service to tell your friend your current IP, then open all the firewall/router ports for outside access, and give your friend the address you've got, like http://yourHostName.dyndns.org/LimsWeb.

Another solution is to deploy your project on Web

  • how to deploy the project on web.the database server is on my pc only
    – robin agrahari
    Commented Jan 8, 2010 at 9:30
  • @robin: you would have to move the database to the hosted server, as well.
    – rob
    Commented Jul 22, 2010 at 7:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .