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 have a Netbeans project running on localhost with Tomcat and MySQL, all is well.

I now want to show my progress to someone in another part of the country.

How do I let him access my website outside of my network?

share|improve this question
    
Do you have a router in front of you? You could forward a specific portion of traffic down to your localhost:8080... –  Aaron McIver Jan 4 '11 at 14:52
    
I do have access to the router, yes. Tried forwarding the 8084 port with no luck –  Meke Jan 4 '11 at 14:59

3 Answers 3

up vote 6 down vote accepted

You need to check the following, in roughly this order:

Local Computer:

  • Firewall: Allow incoming connections on the required port.

  • Server: I've not used Tomcat, but you should ensure it is configured to allow connections from other IP addresses, it may be configured to only work locally.

At this point, it is worth testing that you've got this right by connecting to the LAN IP of this computer from another machine on the same LAN. Otherwise you risk spending a lot of effort messing around in the later steps to find this is blocking the entire process

Local Router:

  • Port Forwarding: Forward all inbound connections to the required port on to the IP of the local computer with the same port*. This is easier if the local computer has a fixed IP, but will work if it is DHCP but requires a little more caution (you just might have to check the configuration each time).
    *This isn't strictly necessary, you could have external port 80 forwarded to the relevant port, allowing the third party to use just the IP address, and not have to use the port in the URL.

Internet Connection

  • Port Blocking: Some ISPs block inbound ports to prevent home users from using a (cheaper) home connection for business purposes. You could try a non-standard port number to see if this helps.

Third Party:

  • Connection: You need to give them your WAN IP address, your router should be able to tell you what this is. Otherwise, try something like http://whatismyip.com/ to find out what you IP is.
    They then need to visit http://<IPAddress>:<port>/
share|improve this answer
    
Well, let's try this then. Starting from top. Access from other device. Check. Portforwarding... I'll check, seems there's going to be a fight with the router... –  Meke Jan 4 '11 at 15:20
1  
While I'm confident this answer is correct, I found out my parents(visiting) have an ingenius setup of 2 routers, serial connected... Marking as answered, beginning to swear. –  Meke Jan 4 '11 at 16:04
    
@Meke, I'm not sure how you mean serial connected...? But can you setup one router to port forward to the other which port forwards to your local machine (assuming each router forms its own network, and the second isn't just working as a switch)? –  DMA57361 Jan 4 '11 at 16:08
    
Well it's WALL -cable> ADSL router -cable> wireless router -wifi> computer... The ADSL Router forms 192.168.0.1, wireless 192.168.1.1, the ADSL router is set to bridging –  Meke Jan 4 '11 at 16:09
    
@Meke Wireless router or access point? And if the ADSL router is connected to the internet and bridging then it's not handling your internet connection (or, what is it bridging?)? Is anything else connected to the ADSL router or just the wireless? –  DMA57361 Jan 4 '11 at 16:13

I'll assume that the website isnt live, because otherwise, well we wont get into that. Easiest way to show him your project is to have netbeans compile the latest working model, find the folder all the info is stored in, zip that puppy up, upload it to any one of a plethora of file hosting sites, and give him the link, if you want him to be able to fully test the site. when he gets the file, have him open up Websitename.htm(l) and he can literally browse it like its live.

if you just want him to be able to look at what you're doing, take a few screenshots and email them to him.

share|improve this answer
    
I'd like him to just connect to my ip and look at it in the same way I do via localhost:8084 ? –  Meke Jan 4 '11 at 14:34
    
okay, well i dont know much about servers and macs, so my solution will require you to be there when he does that. look up a program called teamviewer, have both him and you install it, it is i believe available for every os,trade info and he can actually view whats on your screen. –  Jasen Jan 4 '11 at 14:36
    
Appreciate the attempt to help, but the only option here is to let him access via browser. –  Meke Jan 4 '11 at 14:38
    
okay well ill flag this up so someone who knows more will look at it. –  Jasen Jan 4 '11 at 14:39

You need to do a number of things:

  1. Ensure that you can reach the site from another computer on the LAN
  2. Configure the computer running Tomcat to have a fixed IP address on your LAN
  3. Forward the required port(s) from your router to the fixed IP of the Tomcat server
  4. Optionally use DynDNS's Dynamic DNS service to allow this person to find you when your WAN IP changes

If you go down the DynDNS route they have their own SE site where we can give you lots of help in getting things working.


To avoid re-writing the entire thing, I'll direct you to this guide on the DynDNS community site.

The first part should be simple enough. Can you connect to the LAN IP of the Tomcat server, using a web browser?

share|improve this answer
    
If you could clarify these steps a bit, im sure it wouldn't be regretted. Because honestly i wouldnt know where to start. But once thats done, im sure this is the answer. –  Jasen Jan 4 '11 at 19:27

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.