This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Tomcat working in local IP but not working in public IP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat working in local IP but not working in public IP" Watch "Tomcat working in local IP but not working in public IP" New topic
Author

Tomcat working in local IP but not working in public IP

Loojah Bajracharya
Greenhorn

Joined: Dec 30, 2010
Posts: 1
Hello,

I am new to linux. Resently I am configuring a linux (CentOS 5) with tomcat and mysql. The system has two network cards one with local ip "192.168.0.27" and another is public ip "202.51.93.42". The Tomcat configure is working fine with in the local network any computer in local network can browse the site hosted in the tomcat server but when i tried to browse same using my public ip it is not working. The status in the browser say connecting to 202.51.93.42 and at last it displays the timeout page with message "The server at 202.51.93.42 is taking too long to respond". what should i do to solve this problem is there any more configuration needed in the tomcat?

And one more thing my tomcat is running in port 80.

thank....

Loojah
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15951
    
  19

You need to ensure that your firewall (iptables) permits the tomcat port to be accessed via the NIC that presents the public IP address.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat working in local IP but not working in public IP
 
Similar Threads
Two network cards on linux
how to get IP address in linux
how to map www.test.com to http://localhost:8080/test/index.jsp on Tomcat server
Servlet running on Local host but throwing Exception on public server
browse in archiva