Showing posts with label FTP. Show all posts
Showing posts with label FTP. Show all posts

Tuesday, January 15, 2013

ProFTPD Version 1.3.4a + Slackware 12.0

Berikut setingan Proftpd di slackware, agak sedikit berbeda dengan yang ada di Centos, bila di Centos untuk pembuatan root direktorinya bisa di lakukan dengan pembuatan hard link, namun pada Slackware versi 12.0 hal tersebut tidak bisa dilakukan, sehingga cara satu-satunya adalah dengan membuat virtual direktori untuk masing-masing user.
root:# cat /etc/slackware-version
Slackware 12.0.0
root:# proftpd -v
ProFTPD Version 1.3.4a
root:# proftpd -l
Compiled-in modules:
  mod_core.c
  mod_xfer.c
  mod_auth_unix.c
  mod_auth_file.c
  mod_auth.c
  mod_ls.c
  mod_log.c
  mod_site.c
  mod_delay.c
  mod_facts.c
  mod_ident.c
  mod_readme.c
  mod_ratio.c
  mod_tls.c
  mod_wrap.c
  mod_ctrls_admin.c
  mod_cap.c
  mod_ctrls.c
ServerName                      "FTP Server"
ServerType                      standalone
DefaultServer                   on
DeleteAbortedStores             on
HiddenStores                    on
Port                            21
Umask                           022
MaxInstances                    10
MaxClients                      8
MaxClientsPerHost               8
MaxClientsPerUser               8
MaxHostsPerUser                 8
SystemLog                       /var/log/proftpd.log
TransferLog                     /var/log/xferlog
RequireValidShell               off
User                            nobody
Group                           nogroup
AllowOverwrite                  on


    User                        bel
    Group                       users
    AnonRequirePassword         on
        
            AllowAll
        



    User                        art
    Group                       users
    AnonRequirePassword         on
        
            AllowAll
        

Thursday, November 22, 2012

OpenWRT - Proftp Server

Install Proftp server
# opkg install proftpd
Edit /etc/proftpd.conf
# vi /etc/proftpd.conf
ServerName "ProFTPD Server" ServerIdent on "FTP Server ready." ServerType standalone DefaultServer on DefaultAddress 127.0.0.1 RequireValidShell off Port 21 UseIPv6 off Umask 022 MaxInstances 10 User nobody Group nogroup AuthUserFile /etc/passwd DefaultRoot /home AllowOverwrite on MaxClients 10 MaxClientsPerHost 10 MaxClientsPerUser 10 MaxHostsPerUser 10 DeleteAbortedStores on UserAlias anonymous ftp
Adding new user for ftp account by editing /etc/passwd, in my case i added user openwrt, copy paste configuration from user ftp, but change user ID number and group name.
# vi /etc/passwd-
root:$1$nvFplbd8$l05HR0mdTHcGprNaMg8QA1:0:0:root:/root:/bin/ash daemon:*:1:1:daemon:/var:/bin/false ftp:*:55:55:ftp:/home/ftp:/bin/false network:*:101:101:network:/var:/bin/false nobody:*:65534:65534:nobody:/var:/bin/false openwrt:*:65538:55:openwrt:/home:/bin/false
Adding password for user openwrt
# passwd openwrt
Enabling proftpd service upon start
# /etc/init.d/proftpd enable
To start proftpd service
# /etc/init.d/proftpd start
To stop proftpd service
# /etc/init.d/proftpd stop
Now start proftpd for debug and access it using ftp client and see if any errors
# proftpd -n -d 10
If everything ok, you should see something similar with this picture when accessing proftpd server


Done

Thursday, April 05, 2012

ProFTPD on CentOS 6.2 64Bit

Cara setting secara singkat ProFTPD di CentOS adalah sebagai berikut :

Buka dan edit /etc/proftpd.conf dan tambahkan baris berikut:
$ mcedit /etc/proftpd.conf
ServerName jupiter
ServerIdent                     on "FTP Server ready."
ServerAdmin                     root@jupiter.anekarupatera.lan
DefaultServer                   on
port                            21
UseIPv6                         on
Umask                           022 022
MaxInstances                    8
DefaultRoot                     ~
AllowOverwrite                  on
MaxClients                      8
MaxClientsPerHost               8
MaxClientsPerUser               8
MaxHostsPerUser                 8
DeleteAbortedStores             on
HiddenStores                    on
Untuk mengubah default root directory, lakukan perubahan pada proftpd.conf, lihat baris yang berwarna merah, namun terlebih dahulu buat symlink seperti baris dibawah ini
# Check present directory
$ pwd
/home
# Create symlink
$ ln -s /home/esko/ /var/tmp/
Edit /etc/proftpd.conf dan tambahkan baris berikut :
$ mcedit /etc/proftpd.conf
ServerName                      jupiter
ServerIdent                     on "FTP Server ready."
ServerAdmin                     root@jupiter.anekarupatera.lan
DefaultServer                   on
port                            21
UseIPv6                         on
Umask                           022 022
MaxInstances                    8
# DefaultRoot                   ~
DefaultRoot                     /var/tmp/diantokam  diantokam
AllowOverwrite                  on
MaxClients                      8
MaxClientsPerHost               8
MaxClientsPerUser               8
MaxHostsPerUser                 8
DeleteAbortedStores             on
HiddenStores                    on
Setelah selesai, jalankan program ProFTPD dengan perintah :
# To Start
$ /etc/init.d/proftpd start

# To Stop
$ /etc/init.d/proftpd stop

# To Restart
$ /etc/init.d/proftpd restart
Untuk melakukan blocking user agar tidak dapat mengakses ftp, adalah gampang sekali, anda tinggal memasukkan nama user kedalam ftpusers, termasuk root.
$ mcedit /etc/ftpusers