SOLVED!pureftpd will not accept any connections or run confused?

Discussion in 'Installation/Configuration' started by s2angel, Dec 16, 2015.

  1. s2angel

    s2angel Member

    I am confused why my pureftpd will not accept connections I am hoping someone here can see or tip me in the proper direction to fix this.

    from my ftp client
    Connection attempt failed with "ECONNREFUSED - Connection refused by server".

    /etc/pure-ftpd/conf# ftp localhost
    ftp: connect to address ::1: Connection refused
    Trying 127.0.0.1...
    ftp: connect: Connection refused
    ftp> exit


    netstat does not even show it running yet it seems to restart no errors. I tried added a
    echo "0.0.0.0,21" > /etc/pure-ftpd/conf/Bind

    how and most importantly where do I make this accept connections

    root@:/etc/pure-ftpd# /etc/init.d/pure-ftpd-mysql restart
    Restarting ftp server: Running: /usr/sbin/pure-ftpd-mysql-virtualchroot -l mysql:/etc/pure-ftpd/db/mysql.conf -l pam -u 1000 -S 0.0.0.0,21 -8 UTF-8 -A -B -Y 1 -H -4 -O clf:/var/log/pure-ftpd/transfer.log -b -E -D -B



    /etc/pure-ftpd# netstat -nptl
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 127.0.0.1:10024 0.0.0.0:* LISTEN 2858/amavisd-new (m
    tcp 0 0 127.0.0.1:10025 0.0.0.0:* LISTEN 3965/master
    tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 5888/mysqld
    tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN 3965/master
    tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN 3250/memcached
    tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 3790/dovecot
    tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 3790/dovecot
    tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1786/rpcbind
    tcp 0 0 0.0.0.0:464 0.0.0.0:* LISTEN 3965/master
    tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN 3965/master
    tcp 0 0 172.20.1.4:53 0.0.0.0:* LISTEN 2369/named
    tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 2369/named
    tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 3965/master
    tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 2369/named
    tcp 0 0 0.0.0.0:26 0.0.0.0:* LISTEN 3965/master
    tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 3790/dovecot
    tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 3790/dovecot
    tcp 0 0 0.0.0.0:37542 0.0.0.0:* LISTEN 1817/rpc.statd
    tcp6 0 0 :::905 :::* LISTEN 4157/sshd
    tcp6 0 0 :::587 :::* LISTEN 3965/master
    tcp6 0 0 :::110 :::* LISTEN 3790/dovecot
    tcp6 0 0 :::143 :::* LISTEN 3790/dovecot
    tcp6 0 0 :::111 :::* LISTEN 1786/rpcbind
    tcp6 0 0 :::464 :::* LISTEN 3965/master
    tcp6 0 0 :::80 :::* LISTEN 2906/apache2
    tcp6 0 0 :::465 :::* LISTEN 3965/master
    tcp6 0 0 :::8081 :::* LISTEN 2906/apache2
    tcp6 0 0 :::8180 :::* LISTEN 2906/apache2
    tcp6 0 0 :::53 :::* LISTEN 2369/named
    tcp6 0 0 :::25 :::* LISTEN 3965/master
    tcp6 0 0 ::1:953 :::* LISTEN 2369/named
    tcp6 0 0 :::26 :::* LISTEN 3965/master
    tcp6 0 0 :::443 :::* LISTEN 2906/apache2
    tcp6 0 0 :::56093 :::* LISTEN 1817/rpc.statd
    tcp6 0 0 :::993 :::* LISTEN 3790/dovecot
    tcp6 0 0 :::995 :::* LISTEN 3790/dovecot
     
  2. s2angel

    s2angel Member

    I freshly installed ispconfig3 and I clicked on the firewall option (from what I understand is the bastille-firewall) automatically it added a bunch of common ports .. this locked me out (i have different ssh and different ispconfig http port luckly my VPS i could get console and stop bastille-firewall) I changed my ssh back to standard 22 and rebooted then
    I could ssh in but since I rebooted I was unable to use https ispconfig so I just stopped the bastille again and I am able to access it. I created a account for ftp for the wordpress website I have running

    I also notice it shows Status of Services
    FTP-Server: Offline

    ps -aux shows nothing for pureftp

    so I have /var/log/syslog
    pure-ftpd: (?@?) [ERROR] Sorry, but that file doesn't exist: [/etc/ssl/private/pure-ftpd.pem]
     
  3. s2angel

    s2angel Member

    ok fixed it.. the error
    /var/log/syslog
    pure-ftpd: (?@?) [ERROR] Sorry, but that file doesn't exist: [/etc/ssl/private/pure-ftpd.pem]

    The error is not very descriptive because the file is clearly existing. From what i understand it needs to have a key that is combined?

    so i just re generated the key.

    # openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem

    then I gave it proper rights
    chmod 600 /etc/ssl/private/pure-ftpd.pem

    # netstat -anp
    tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 8557/pure-ftpd (SER
    now it show proper in the web interface
    Status of Services
    FTP-Server: Online

    i had my port human error miss entered in the firewall section for the ispconfig so all good now hope this helps people!
     

Share This Page