setting up ftp access for clients

Discussion in 'Installation/Configuration' started by Jrdgames, Feb 23, 2006.

  1. Jrdgames

    Jrdgames New Member

    im having trouble setting up ftp access , I can login to webftp via ispconfig but i cant login to ftp with smartftp or internet explorer, I know Im typing the password right because I dont get a password error I just get a message saying "The target machine refused the connection" also I can't see anything at my address: runecore.no-ip.org when I manually put it into the folder /var/www/runecore.no-ip.org/web

    Here is the content of my vhosts_ispconfig.conf file
    HTML:
    ###################################
    #
    # ISPConfig vHost Configuration File
    #         Version 1.0
    #
    ###################################
    #
    NameVirtualHost 192.168.1.103:80
    <VirtualHost 192.168.1.103:80>
      ServerName localhost
      ServerAdmin root@localhost
      DocumentRoot /var/www/sharedip
    </VirtualHost>
    #
    #
    ######################################
    # Vhost: runecore.no-ip.org:80
    ######################################
    #
    #
    <VirtualHost 192.168.1.103:80>
    ServerName runecore.no-ip.org:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web1/web
    ServerAlias runecore.no-ip.org
    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
    ScriptAlias  /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/
    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/error_403.html
    ErrorDocument 404 /error/error_404.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>
    #
    #
    #
    also my site address is at no-ip.com since i cant yet afford a domain also my isp blocks port 80 so at no-ip i have it redirected to port 82 and ports 82-80,21-21,25-25,53-53,110-110,81-81 directed by my router to my server
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Please post the output of
    Code:
    netstat -tap
    and
    Code:
    iptables -L
    If you want your site to listen on port 82, then you must replace 80 with 82 in Vhosts_ispconfig.conf and restart Apache. And you better change that in the function make_vhost() in /root/ispconfig/scripts/lib/config.inc.php, too, otherwise ISPConfig will always write 80 instead of 82 in Vhosts_ispconfig.conf.
     
  3. Jrdgames

    Jrdgames New Member

    netstat -tap
    Code:
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State PID/Program name
    tcp        0      0 localhost.localdo:32771 *:*                     LISTEN     2 6357/hpiod
    tcp        0      0 localhost.localdo:32772 *:*                     LISTEN     2 6360/python
    tcp        0      0 *:3784                  *:*                     LISTEN     2 6173/ventrilo_srv
    tcp        0      0 localhost.localdo:mysql *:*                     LISTEN     1 8706/mysqld
    tcp        0      0 *:81                    *:*                     LISTEN     2 4095/ispconfig_htt
    tcp        0      0 *:ftp                   *:*                     LISTEN     3 0137/proftpd: (acc
    tcp        0      0 192.168.1.103:domain    *:*                     LISTEN     2 1828/named
    tcp        0      0 localhost.locald:domain *:*                     LISTEN     2 1828/named
    tcp        0      0 localhost.localdoma:ipp *:*                     LISTEN     9 391/cupsd
    tcp        0      0 *:smtp                  *:*                     LISTEN     3 0192/master
    tcp        0      0 localhost.localdoma:953 *:*                     LISTEN     2 1828/named
    tcp        0      0 localhost.localdo:38904 localhost.localdoma:ipp ESTABLISHED8 934/gnome-cups-ico
    tcp        0      0 192.168.1.103:38429     perm244-231.ij.net:www  ESTABLISHED8 990/firefox-bin
    tcp        0      0 localhost.localdo:32771 localhost.localdo:59399 ESTABLISHED2 6357/hpiod
    tcp        0      0 localhost.localdo:59399 localhost.localdo:32771 ESTABLISHED2 6360/python
    tcp        0      0 192.168.1.103:43743     perm244-232.ij.net:www  ESTABLISHED8 990/firefox-bin
    tcp        0      0 localhost.localdoma:ipp localhost.localdo:38904 ESTABLISHED9 391/cupsd
    tcp        0      0 192.168.1.103:34893     perm244-230.ij.net:www  ESTABLISHED8 990/firefox-bin
    tcp6       0      0 *:imaps                 *:*                     LISTEN     1 3349/couriertcpd
    tcp6       0      0 *:pop3s                 *:*                     LISTEN     1 3241/couriertcpd
    tcp6       0      0 *:pop3                  *:*                     LISTEN     1 3170/couriertcpd
    tcp6       0      0 *:imap2                 *:*                     LISTEN     1 3286/couriertcpd
    tcp6       0      0 *:www                   *:*                     LISTEN     2 3393/apache2
    tcp6       0      0 *:ssh                   *:*                     LISTEN     8 745/sshd
    tcp6       0      0 ip6-localhost:953       *:*                     LISTEN     2 1828/named
    tcp6       0      0 *:https                 *:*                     LISTEN     2 3393/apache2
    iptables -L
    I cant find make_vhost() in /root/ispconfig/scripts/lib/config.inc.php

    also how would i restart apache?

    thankyou for your help
     
  4. falko

    falko Super Moderator ISPConfig Developer

    This looks ok...
    Sorry, I meant /root/ispconfig/scripts/lib/config.lib.php.

    Depends on your distribution. On most systems it's either
    Code:
    /etc/init.d/apache restart
    or
    Code:
    /etc/init.d/apache2 restart
    or
    Code:
    /etc/init.d/httpd restart
    You can also use ISPConfig to restart Apache.
     
  5. Jrdgames

    Jrdgames New Member

    is this the line?

    Code:
    function make_vhost($server_id) {
      global $mod,$go_info;
    where do i insert the port i want it to listen on?


    for the restart it was:

    /etc/init.d/apache2 restart

    im running on ubuntu
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    A few line below you will find these lienes:

    Code:
      if($apache_version == 2){
        $fp_resource_config = "";
        $fp_access_config = "";
        $web_port = ":80";
        $ssl_port = ":443";
      }
    
    Just replace the number 80 with your port number.
     
  7. Jrdgames

    Jrdgames New Member

    ok thankyou it was:
    Code:
      $apache_version = $this->apache_version();
      if($apache_version == 1){
        $fp_resource_config = "ResourceConfig /dev/null";
        $fp_access_config = "AccessConfig /dev/null";
        $web_port = "";
        $ssl_port = "";
      }
    now it is:
    Code:
      $apache_version = $this->apache_version();
      if($apache_version == 1){
        $fp_resource_config = "ResourceConfig /dev/null";
        $fp_access_config = "AccessConfig /dev/null";
        $web_port = "82";
        $ssl_port = "";
      }
    it looks like the ssl port should be set to something
     
  8. falko

    falko Super Moderator ISPConfig Developer

    If it isn't set, then the default value (443) is used.
     
  9. Jrdgames

    Jrdgames New Member

    ok

    the ftp is working now but im still getting ispconfig's shared ip page, in the site setup i have hostname as runecore and domain as no-ip.org since im going through the redirect so my servers ip cant easily be seen and because its easier to remember.

    maybe i should setup another ip address for the site?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you use the internal IP in ISPConfig for the website, the IP where you forwarded your ports to?
     
  11. Jrdgames

    Jrdgames New Member

    yes, my server only has one ip right now, i just double checked and the ip the ports are being redirected to is the same as when i do ifconfig on my server
     
  12. falko

    falko Super Moderator ISPConfig Developer

    Can you check with
    Code:
    dig runecore.no-ip.org
    that it actually points to the right IP address (your router's public one)? Maybe it doesn't get updated when your public IP address changes.
     
  13. Jrdgames

    Jrdgames New Member

    ok here it is
    when i go to ipchicken.com it says my router is 209.216.71.252 but i dont see that ip anywhere on the output
     
  14. falko

    falko Super Moderator ISPConfig Developer

    This means runecore.no-ip.org's IP address doesn't get updated when your router's IP address changes. That's why you can't see your site.
     
  15. Jrdgames

    Jrdgames New Member

    but my router has a static ip and when i check runecore.no-ip.org in my no-ip control panel it says it goes to what my routers ip is, also would i be able to see the ispconfig sharedip page if it was wrong? even though it seems to be wrong
     
  16. falko

    falko Super Moderator ISPConfig Developer

    Ok, I see the Shared-IP page now, too. But at the bottom you see a message about some kind of redirecting from No-IP.com. I think what happens is this: When you type runecore.no-ip.org in your browser, it goes to a No-IP.com server; from there it loads the frameset with the redirect message at the bottom. And in the main frame it loads your web page - it seems as if it tries to load your web page using your public IP address instead of a FQDN (your FQDN runecore.no-ip.org is pointing to a NO-IP.com server).
    You should contact NO-IP.com and ask if they have a solution for it; otherwise use another service like DynDNS.org where you can point your FQDN directly to your IP address instead of using redirects.
     
  17. Jrdgames

    Jrdgames New Member

    ok ive taken your advice and asked the staff at no-ip about it and ive also setup an account with dyndns and setup a second site on my server with hostname: runecore and domain: webhop.net my redirect on dyndns goes to http://209.216.71.252:82 I dont think its working right either unless im doing something wrong
     
  18. falko

    falko Super Moderator ISPConfig Developer

    Why do you use redirects? Point your domains directly to your public IP address!
     
  19. Jrdgames

    Jrdgames New Member

    I cant afford a real domain, but im going to try freedomain.co.nr and see if there service will work the way i need
     
  20. falko

    falko Super Moderator ISPConfig Developer

    At DynDNS.org you can point your domain to your public IP address instead of using redirects. I guess something like that is possible at No-IP.com, too.
     

Share This Page