Server unavailable from outside and a few other questions

Discussion in 'Installation/Configuration' started by mmcclure79, Feb 20, 2008.

  1. mmcclure79

    mmcclure79 New Member

    I have a server that I had running for a few years without a problem. It had ftp and http forwarded in my router and all was fine and working. After I installed ISPConfig only ssl and ftp is available from the internet. I'm able to access it from within the network using the public ip and even the domain name which is pointed in DNS hosted by freedns to the public ip. Could anyone shed some light on where to begin looking for the problem?
    I have the latest stable build of ISPConfig and Ubuntu Gutsy.
    My Domain is mytuath.com
    Also port scanners say that port 80 and 25 are closed yet I have them forwarded in my router. I have already called my ISP to ensure that they are not blocking these ports all of a sudden as they never did before.

    My other issue is the mail server side of the install. I installed sendmail and yet it does not work. I get emails sent from the system to the domain but am unable to send emails to users on the domain.

    Any light you guys can shed on this would just be awesome as I really like this app and the possibility for extra money and fun with it.

    I ran the port scanner and this is the results of the ports I have forwarded on my router:
    66.173.148.183 is responding on port 21 (ftp).
    66.173.148.183 is responding on port 22 (ssh).
    66.173.148.183 isn't responding on port 25 (smtp).
    66.173.148.183 is responding on port 53 (domain).
    66.173.148.183 isn't responding on port 80 (http).
    66.173.148.183 is responding on port 81 (hosts2-ns).

    The port scanner in ISPConfig has this to say for these ports:
    Port 21 (tcp) is open (ftp)!
    Port 22 (tcp) is open (ssh)!
    Port 25 (tcp) is open (smtp)!
    Port 53 (tcp) is open (domain)!
    Port 80 (tcp) is open (www)!
    Port 81 (tcp) is open (ISPConfig)!

    For some reason pop3 isn't open on the se rver even though I installed Uebimiau.
    I also can't seem to get to any other site but the main one either from inside or external. I had created a second site sharinkur.mytuath.com and it just doesn't seem to want to come up, no response at all from the server.
     
    Last edited: Feb 20, 2008
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    netstat -tap

    and

    iptables -L
     
  3. mmcclure79

    mmcclure79 New Member

    netstat:
    (Not all processes could be identified, non-owned process info
    will not be shown, you would have to be root to see it all.)
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 *:mysql *:* LISTEN -
    tcp 0 0 localhost:submission *:* LISTEN -
    tcp 0 0 *:netbios-ssn *:* LISTEN -
    tcp 0 0 *:webcache *:* LISTEN -
    tcp 0 0 *:www *:* LISTEN -
    tcp 0 0 *:81 *:* LISTEN -
    tcp 0 0 *:ftp *:* LISTEN -
    tcp 0 0 localhost:ipp *:* LISTEN -
    tcp 0 0 localhost: postgresql *:* LISTEN -
    tcp 0 0 localhost:smtp *:* LISTEN -
    tcp 0 0 *:https *:* LISTEN -
    tcp 0 0 *:microsoft-ds *:* LISTEN -
    tcp 0 0 Gutsy.local:44207 a204-2-177-26.deplo:www ESTABLISHED9814/firefox-bin
    tcp 0 0 Gutsy.local:34876 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34964 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34872 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34887 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:37833 newslb308.telhc.bbc:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34948 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:46712 209.62.187.42:www ESTABLISHED9814/firefox-bin
    tcp 0 0 Gutsy.local:34913 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34955 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34854 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34927 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:51503 a204-2-177-35.deplo:www ESTABLISHED9814/firefox-bin
    tcp 0 0 Gutsy.local:34928 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:48946 a204-2-177-40.deplo:www ESTABLISHED9814/firefox-bin
    tcp 0 0 Gutsy.local:34873 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34937 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34875 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34951 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34882 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34903 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:54624 65.121.214.33:www ESTABLISHED9814/firefox-bin
    tcp 0 0 Gutsy.local:34932 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34947 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34967 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34888 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34942 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34909 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34895 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34978 www.howtoforge.com:www TIME_WAIT -
    tcp 0 0 Gutsy.local:34953 www.howtoforge.com:www TIME_WAIT -
    tcp6 0 0 *:ssh *:* LISTEN

    iptables:
    Chain INPUT (policy ACCEPT)
    target prot opt source destination

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Your POP3 server isn't running, and Postfix is listening only on localhost.
     
  5. mmcclure79

    mmcclure79 New Member

    Ok, so I pulled out another box and tried this set up again. Followed your guide falko.

    Code:
     PID/Program name
    tcp        0      0 *:mysql                 *:*                     LISTEN     -                    
    tcp        0      0 *:www                   *:*                     LISTEN     -                    
    tcp        0      0 *:81                    *:*                     LISTEN     -                    
    tcp        0      0 *:ftp                   *:*                     LISTEN     -                    
    tcp        0      0 gutsyweb1.mytuat:domain *:*                     LISTEN     -                    
    tcp        0      0 localhost.locald:domain *:*                     LISTEN     -                    
    tcp        0      0 localhost.localdoma:953 *:*                     LISTEN     -                    
    tcp        0      0 *:smtp                  *:*                     LISTEN     -                    
    tcp        0      0 *:https                 *:*                     LISTEN     -                    
    tcp        0      0 localhost.localdoma:ftp localhost.localdo:56788 TIME_WAIT  -                    
    tcp        0      0 localhost.localdo:35420 localhost.localdoma:www TIME_WAIT  -                    
    tcp6       0      0 *:imaps                 *:*                     LISTEN     -                    
    tcp6       0      0 *:pop3s                 *:*                     LISTEN     -                    
    tcp6       0      0 *:pop3                  *:*                     LISTEN     -                    
    tcp6       0      0 *:imap2                 *:*                     LISTEN     -                    
    tcp6       0      0 *:domain                *:*                     LISTEN     -                    
    tcp6       0      0 *:ssh                   *:*                     LISTEN     -                    
    tcp6       0      0 ip6-localhost:953       *:*                     LISTEN     -                    
    tcp6       0      0 *:smtp                  *:*                     LISTEN     - 
    Seems I got everything listening. Iptables had the same output as before. Only I think I mistyped my domain somewhere, it's supposed to mytuath.com and if you lookunder ftp it's missing the 'h'. How can I figure out what that is so I can fix it?

    Also my server is still not responding outside the network. I try accessing it on 81 and even though portscans show it responding nothing is coming up. I can only assume as I don't know anybetter that the server is listening for port 80 traffic from the above outpout, however it's not responding on the portscans.

    I can get to the SSL on it and the ftp part of it, no problems. I was going to try to create a site and a user and install the webmail and all that stuff and just test the email server for it working, but couldn't do it. I will check these things when I get later today and see if it's responding inside the network. thanks for the help so far.

    I'm hoping that it's just the 'h' being missing up there and all will be right with the world.
     
    Last edited: Feb 23, 2008
  6. mmcclure79

    mmcclure79 New Member

    ok, so I checked it all when I got home. From within the network not a problem accessing via domain name. The domain name is pointed to my public IP and so it's obviously being forwarded properly. I would think I mean my router is set to work that way inside traffic directed to the public ip can be redirected back into the network.
     
  7. mmcclure79

    mmcclure79 New Member

    well, after disabling ipv6 system wide and checking the maildir box in ispconfig, I can now login to the webmail and send/receive emails. That much is just beautiful! however externally speaking you can't get to any website and internally just takes you to the apache root...
     
  8. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ifconfig
    , and what's in Vhosts_ispconfig.conf?
    Also, make sure that your ISP doesn't block port 80.
     
  9. mmcclure79

    mmcclure79 New Member

    ifconfig:
    Code:
    eth0      Link encap:Ethernet  HWaddr 00:0E:A6:D1:13:B0
              inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:37349 errors:0 dropped:0 overruns:0 frame:0
              TX packets:38453 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:5101064 (4.8 MB)  TX bytes:7081416 (6.7 MB)
              Interrupt:19 Base address:0x9800
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:4563 errors:0 dropped:0 overruns:0 frame:0
              TX packets:4563 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:546530 (533.7 KB)  TX bytes:546530 (533.7 KB)
    
    There is nothing in Vhosts_ispconfig.conf, however the next one:Vhosts_ispconfig.conf_23-02-08_13-02-40 has the following:
    Code:
    ###################################
    #
    # ISPConfig vHost Configuration File
    #         Version 1.0
    #
    ###################################
    #
    NameVirtualHost 192.168.1.3:80
    <VirtualHost 192.168.1.3:80>
      ServerName localhost
      ServerAdmin root@localhost
      DocumentRoot /var/www/sharedip
    </VirtualHost>
    #
    #
    ######################################
    # Vhost: www.mytuath.com:80
    ######################################
    #
    #
    <VirtualHost 192.168.1.3:80>
    ServerName www.mytuath.com:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web1/web
    ServerAlias mytuath.com
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
    Alias  /cgi-bin/ /var/www/web1/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web1/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    <Files *.php>
    
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php3>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php4>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php5>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    php_admin_flag safe_mode On
    php_admin_value open_basedir /var/www/web1/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web1/phptmp/
    php_admin_value session.save_path /var/www/web1/phptmp/
    <IfModule mod_ruby.c>
      <Directory /var/www/web1/web>
        Options +ExecCGI
      </Directory>
      RubyRequire apache/ruby-run
      #RubySafeLevel 0
      <Files *.rb>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      </Files>
      <Files *.rbx>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      </Files>
    </IfModule>
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    Alias /error/ "/var/www/web1/web/error/"
    ErrorDocument 400 /error/invalidSyntax.html
    ErrorDocument 401 /error/authorizationRequired.html
    ErrorDocument 403 /error/forbidden.html
    ErrorDocument 404 /error/fileNotFound.html
    ErrorDocument 405 /error/methodNotAllowed.html
    ErrorDocument 500 /error/internalServerError.html
    ErrorDocument 503 /error/overloaded.html
    AliasMatch ^/~([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    So what are we looking for that may be wrong? Port 80 is not blocked by the ISP either.
     
    Last edited: Feb 26, 2008
  10. mmcclure79

    mmcclure79 New Member

    Looking through the site looking for a fis for this I looked in the httpd.conf file and there is nothing there. Shouldn't there be something there?
     
  11. falko

    falko Super Moderator Howtoforge Staff

  12. mmcclure79

    mmcclure79 New Member

    Code:
    Syntax error on line 48 of /etc/apache2/vhosts/Vhosts_ispconfig.conf:
    Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configuration
    
    That's what I get. Perhaps I should change the 'flag' there to 'value' like everything else?
    This is the only spot this command is:
    Code:
    <Files *.php5>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    php_admin_flag safe_mode On
    php_admin_value open_basedir /var/www/web1/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web1/phptmp/
    php_admin_value session.save_path /var/www/web1/phptmp/
    
     
    Last edited: Feb 27, 2008
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    No, tahst all fine.

    Please install the pacakge for mod_php from your linux distribution. For detailed instructions, please have a look at the perfect setup guide for the linux version that you use.
     
  14. mmcclure79

    mmcclure79 New Member

    ok, now this is getting wierd.

    I installed as you said Till, backed up the Vhosts_ispconfig.conf file and ran httpd -t
    Syntax OK

    Good, no errors all should be good right? No. I try my site via FQDN (www.mytuath.com) and even by IP to get the thought that maybe DNS could be messing with it out of my head. I mean FTP works by domain name, but I digress.

    So I put in my domain or the IP and I get yahoo's search results after a few seconds, at least from the outside. I'm at work and so I can't see how it does from within the network, wether the root of apache pops or the page.

    I did have a similiar problem before with my old routerand I replaced it with a router of the same model. It was this, it just stopped forwarding ports for some reason. So, I'll check it when I get home. It may be a case t hat this router is doing the same thing my other one was.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to rename a version of the file Vhost_ispconfig.conf with a date appended before you run httpd -t in case there are these copies. Otherwise httpd -t will not give you an error even if there are errors.
     
  16. mmcclure79

    mmcclure79 New Member

    Thanks alotTill and Falko. I'll do that and rerun httpd -t, though the good news is it's working correctly on the inside. Now I just have to figure out the forwarding issue on port 80.

    You guys are awesome. This is the main reason I love Linux, the people are just awesome and always willing to help.
     

Share This Page