File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Connecting to Tomcat from another machine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Connecting to Tomcat from another machine" Watch "Connecting to Tomcat from another machine" New topic

Connecting to Tomcat from another machine

Dan Felbman

Joined: Oct 22, 2012
Posts: 2
Hello All,

I am relatively new to Apache Tomcat so please excuse my ignorance.

Ok here is the situation. I have two virtual machines (VMs) running on a single network. One machine is running Fedora 11 (F11) and the other is running BackTrack5 R2 (BT5). I have installed Apache Tomcat on F11, locally. I am able to access the Tomcat Manager from the F11 machine just fine by using the following URL:


However, when I try to access the Tomcat manager from the BT5 VM, I receive a "Unable to Connect: Problem Loading page" error in Firefox. I am trying to access the F11's tomcat manager through the following URL:


However, as stated above, this is not working. Do I need to enable some setting on my F11's Tomcat in order to access it from another machine? Or am I just an idiot and missing a crucial step?

Any advice is certainly appreciated.



EDIT: The version of Tomcat I am running is 5.5.27

Waldemar Macijewski
Ranch Hand

Joined: Jun 22, 2012
Posts: 32
I just asked the same question couple of days ago (, it all really depends on how you are connected to the internet. If you have a router, then check router settings and enable port forwarding to 8080. I had to add "service" on specific pc (with specific IP address, port, etc), but it all depends on what router vendor and software you are using. Otherwise, simply enable port forwarding to 8080 in your firewall settings, or use iptables (although, I'm not sure how to use that one).
Dan Felbman

Joined: Oct 22, 2012
Posts: 2
Hmm. Okay, well I am not sure how to enable port forwarding but it most likely is being done in iptables from what I have read.

I have added the following line in iptables:

Still not working though. Also, I am not sure if I can edit my router settings as this is in a pre-configured VLAB that I dont have access to the settings. I will double check with my administrator though. Is there any way that I can test to see if port forwarding is on? I have tried telnet on the VP but I don't receive a response.

Any ideas?

Thanks for your help
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

I think that your rule is too restrictive. Try:

I usually end up my IPTABLES with a -A INPUT -j LOG right before the final drop as a confirmation that things are (and aren't!) getting allowed through.

If there are filtering and/or forwarding options in the router, I can't help you. That's very product-dependent.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Connecting to Tomcat from another machine
jQuery in Action, 3rd edition