Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Cannot access Tomcat on 8080 outside my lan

  1. #1
    Join Date
    May 2010
    Location
    Amsterdam
    Beans
    13
    Distro
    Ubuntu 10.04 Lucid Lynx

    Cannot access Tomcat on 8080 outside my lan

    On my Ubuntu 10.04 lucid lynx server edition machine I have an Apache http server listening on port 80 and today I installed the Funambol server which added an Apache Tomcat server listening on port 8080. From within my lan I can reach both servers, but from outside the lan I can only reach the http server on port 80 and not the Funambol server on port 8080. I get a time out message instead.

    In my router I have setup port forwarding, such that both ports 80 and 8080 get forwarded to my server machine. Must Tomcat be told to listen to external requests? Is my server listening on port 8080 only for requests inside the lan? Or is there some authorization that fails when I try to visit from outside my lan?

    Here is some netstat output, I don't know if the differences between the 80 line and the 8080 line are relevant:
    Code:
    remon@compaq:~$ sudo netstat -nlp | grep 80
    tcp        0      0 0.0.0.0:8009            0.0.0.0:*               LISTEN      1778/java
    tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      1778/java
    tcp        0      0 127.0.0.1:8005          0.0.0.0:*               LISTEN      1778/java
    tcp6       0      0 :::80                   :::*                    LISTEN      719/apache2
    udp        0      0 127.0.0.1:32800         0.0.0.0:*                           1762/java
    udp        0      0 0.0.0.0:68              0.0.0.0:*                           809/dhclient3

  2. #2
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: Cannot access Tomcat on 8080 outside my lan

    Your server which is listening on TCP 8080 is listening for connections on all interfaces. If a TCP connection cannot be established on that port, then either you configured iptables to filter it, or the traffic is not reaching your server. Perhaps your ISP filters port 8080.

  3. #3
    Join Date
    Jun 2007
    Beans
    1,941

    Re: Cannot access Tomcat on 8080 outside my lan

    Yea, looks like you have it setup correctly... Either your router isn't forwarding the information on correctly, or your ISP is blocking the traffic.

  4. #4
    Join Date
    May 2010
    Location
    Amsterdam
    Beans
    13
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Cannot access Tomcat on 8080 outside my lan

    When I do a port scan, for example on www.pcflank.com, then the report says both port 80 and port 8080 are open. Does this rule out an ISP filter on port 8080? If not, how would I check this? And how can I check if my iptables are configured the right or wrong way?

  5. #5
    Join Date
    Jun 2007
    Beans
    1,941

    Re: Cannot access Tomcat on 8080 outside my lan

    Hrm... I would think that would be sufficient.

    Have you tried this - turn off that other tomcat service, switch your apache or another service to 8080 (like SSH for example) and see if that works? That would rule out ISP, which it sounds like you have...

  6. #6
    Join Date
    May 2010
    Location
    Amsterdam
    Beans
    13
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Cannot access Tomcat on 8080 outside my lan

    Okay I hope tested it the right way: I shut down the Funambol/Tomcat server, then I edited apache2.conf and the sites-available/default.conf so that 80's are now 8080. Then I restarted the Apache http server. From within my lan, I now get the apache default page (saying "It works!") on port 8080 and from outside my lan, I still get the time out. Does this confirm that my ISP filters out 8080?

  7. #7
    Join Date
    Jun 2007
    Beans
    1,941

    Re: Cannot access Tomcat on 8080 outside my lan

    Well it confirms something is blocking it. Could be firewall on the Ubuntu box - do you use UFW or did you setup the firewall at all?

    Also, router - double, triple, whatever-check the port forward settings there. It sounds like you got port 80 working, compare with those settings.

    The last option would be the traffic is being blocked by your provider. I can't think of any other roadblocks at the time being, but if you're ISP isn't blocking port 80 they're almost certainly not blocking 8080...

  8. #8
    Join Date
    May 2010
    Location
    Amsterdam
    Beans
    13
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Cannot access Tomcat on 8080 outside my lan

    The status of ufw is "inactive", I did not set up any firewall on the ubuntu box.

    The port forwarding on my router is quite easy to set up, and in fact I copied the settings for the http server and changed the port numbers. To be sure I just quadriple checked.

  9. #9
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: Cannot access Tomcat on 8080 outside my lan

    If an external server says port 8080 is open, then you are accepting TCP connections on that port. You should not be getting connection timeouts. When you say you cannot establish a connection a port 8080 "from outside the lan", are you actually attempting to connect from outside your LAN, os simply connecting to your router's WAN IP from inside your LAN? There is a difference between the two.

  10. #10
    Join Date
    Jun 2008
    Location
    Texas
    Beans
    239

    Re: Cannot access Tomcat on 8080 outside my lan

    Have you tried changing Tomcat to use a different port that you know works as a test? To me, it's sounding like Tomcat is misconfigured, as Apache works on port 8080, but Tomcat does not.

    Also, I agree with cdenley, if you're on your LAN and attempting to connect using your public IP address, some routers/modems don't handle the traffic properly. Especially if it's an AT&T modem. For the most part, they won't loop back your traffic back through itself properly from my experiences.
    http://www.honorknightsofazeroth.com
    This is my WoW guild on the Scilla server for the Horde. Feel free to join us. We're an open Social/Family type guild.............. NM, the guild died.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •