website reacheable on LAN, but unreacheable from everywhere else

Discussion in 'Installation/Configuration' started by brunus, Mar 1, 2008.

  1. brunus

    brunus New Member

    Hi,
    I had set up my joomla website on my Ubuntu 6.06.1 Server and it was working fine correctly pointing www.ecolefrancaise.bi to my server public IP from anywhere.
    I've installed ISPConfig, putting all my apache2 ols files away and starting from scratch following the fabulous tutorial on How to forge.
    Installation was successful, I moved my website files into /www/web7/web and I can now access the website, having added the www.ecolefrancaise.bi in the server hosts file, BUT only within the LAN. If I try to point to it from elsewhere I get a Error 404, meaning that the server has been reached but not the website.
    What's wrong?


    thanks you in advance,

    Paolo
     
    Last edited: Mar 1, 2008
  2. falko

    falko Super Moderator Howtoforge Staff

    Please check if the A record for www.ecolefrancaise.bi is pointing to your router's public IP address. You can check that like this:
    Code:
    dig www.ecolefrancaise.bi
    Also make sure that your router forwards port 80 to your ISPConfig server.
     
  3. brunus

    brunus New Member

    Hi Falko,
    thanks for your prompt answer! Let me get this chance to express my appreciation for the clever way you and your team have mastered a sustainable system offering the right mix of free and paid services for the common good. It is really the way to go.

    Back to us, here's the output of the dig command you suggested:
    ; <<>> DiG 9.4.1-P1 <<>> www.ecolefrancaise.bi
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31817
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;www.ecolefrancaise.bi. IN A

    ;; ANSWER SECTION:
    www.ecolefrancaise.bi. 3600 IN A 84.254.187.34

    ;; Query time: 1978 msec
    ;; SERVER: 193.219.193.190#53(193.219.193.190)
    ;; WHEN: Mon Mar 3 15:10:57 2008
    ;; MSG SIZE rcvd: 55

    It looks right to me, isn't it?

    Now, on port forwarding: I don't have a router with a nice web interface to easily set such a forward. The Ubuntu server where ISPConfig is installed is our LAN gateway, with 2 network cards, one internal and one external. I have a firewall installed (shorewall) and a proxy (squid running on 8080). From your message I imagine i should set some rule somewhere saying that what's coming in at 84.254.187.34:80 should be passed to 192.168.1.1:80, right? Shouldn't it be already so, since before installing ISPConfig I had my website running already?
    Since I'm not sure how to do that, I've RTFShorewallM and I added the following rule to shorewall:
    DNAT net fw:192.168.1.1:80 tcp 80 - 84.254.187.34
    and it's working! I can connect from outside the LAN. Is it ok? Any security issues there?
    BUT...
    now when I try to connect to webmail.ecolefrancaise.bi, which was working before in the lan as an alias domain redirecting to www.ecolefrancaise.bi:81/roundcubemail is not working any more. Why?

    thanks in advance.

    Paolo
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Any errors in the browser or in your logs?
     
  5. brunus

    brunus New Member

    Sorry Falko, I have to correct myself: www.ecolefrancaise.bi:81/roundcubemail is working, what is not working is the redirection webmail.ecolefrancaise.bi which is gives a host not found error.
    Meanwhile, I've checked the accessibility of the www.ecolefrancaise.bi domain from within the lan and I get a 404 error if I pass thru the proxy (on 8080, as the default configuration of all my clients PC) and host not found if I bypass squid. How come? Is there any apache directive I should add or something? Or is alwasy a matter of firewall?

    thanks,
    paolo
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Not sure about this one, but did you check your logs?
     
  7. brunus

    brunus New Member

    Sorry Falko,
    I might sound stupid, but could you please point me out which logs are relevant in order to troubleshoot this issue and where are them located on my ubuntu server?

    thanks

    Paolo
     
  8. falko

    falko Super Moderator Howtoforge Staff

    The logs are in the /var/log directory and its subdirectories. The Apache logs are in /var/log/apache2.
     

Share This Page