Originally posted by M Jay:
Hi,
I have an application that is deployed on Tomcat on my local machine. My local machine is sitting behind a broadband router. I think this is disabling me from accessing my application/tomcat from outside the network. Is there a possible way for me to configure the network (router or local machine) to enable direct access from the internet to my local machine/ tomcat?
I am not very experienced in networking, so detailed instructions will be very appreciated.
Many Thanks
Unfortunately, "detailed instructions" are specific to the exact router that you have, so you need to google the instructions for your router. Actually, regardless, the instructions may be considered complex for someone who has never did networking before. The best I can do is explain it, and hope that you have enough to google with... sorry...
Basically, you need to forward the ports from your router to your machine. From the outside, no one can see your network. All they see is one machine -- your router.
Let's say, you have Tomcat configured for port 80, sitting on your machine with a particular IP address. This address is an internal address -- other computers connected to the router (in your network) can ping your address -- but no outside computer can see your internal network.
So you need to do 2 things...
First, you need to fix the IP address of your computer on the internal network. You can do it via logging into the router's DHCP configuration menu and force a fixed address based on your machines' MAC address. Another option is to not use DHCP. Instead, configure the IP address on your machine to an address that is not used by DHCP -- but using the same subnet.
Second, you need to forward the port. Let's say Tomcat is configured for port 80. You can do it via logging into the router's menus to forward port 80, for TCP, to the IP address that you assigned in part one. If you are using other ports that need to be reached from the outside, you need to forward them too.
From the outside, when the client program connects to port 80, on your router, it will be forwarded to port 80, on your computer. Basically, the outside computer will think that the router is your computer -- and Tomcat is running on it... neat huh?
And of course... other options are available (like uPnP) ... blah blah blah... security concerns... blah blah blah.
Henry