most-c
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Setting FTP Server dengan ProFTPD di Linux Slackware

Go down

Setting FTP Server dengan ProFTPD di Linux Slackware Empty Setting FTP Server dengan ProFTPD di Linux Slackware

Post by sukma Tue 19 May 2009, 16:50

ProFTPD adalah free FTP daemon yang didistribusikan di bawah lisensi GNU Public. ProFTPD merupakan aplikasi FTP server yang terkenal akan kehandalannya. ProFTPD adalah ftp server yang dibuat untuk Unix dan keluarga unix, seperti Linux, OpenBSD, FreeBSD, atau yang lainnya, dan tidak mendukung sistem operasi Win****.

ProFTPD FTP daemon yang bisa sedikit diandalkan keamanannya dan highly configurable. ProFTPD sanggup untuk melayani arsip file yang sangat besar di jaringan.

Q : kenapa ? gak belajar bikin server FTP di Win**** aja?,

Yah, ini sih tergantung selera, terserah anda, biar tau rasa bagaimana jengkelnya jika anda belajar dengan sistem operasi yang mahal itu, zzZZzz, server di dunia ini dikuasai oleh keluarga Unix, bukan Win****. tanya kennnapa???

Fitur-fitur yang ada pada Proftp ;

* Kita bisa membuat file per-izinan per direktori ftp ?.ftpaccess? yang mirip dengan konfigurasi web server apache ?.htaccess?.

* Mudah dalam mengkonfigurasi untuk multiple virtual FTP server dan anyonymous FTP services.

* Didesain untuk dijalankan secara stand-alone atau servis yang dipanggil melalui inetd/xinetd, tergantung sistem anda.

* Anonymous FTP root direktori tidak memerlukan struktur direktori secara spesifik , system binaries atau system files lainnya.

* No SITE EXEC command. di lingkungan Internet sekarang, beberapa jurus serangan cracking menjadi momok menakutkan para Administrator. ProFTPD tidak mengeksekusi program external pada saat yang bersamaan, tanpa izin Admin, hal ini meningkatkan kekuatan security ftp server.

* Direktori dan file yang berartribut Hidden, mengadopsi Unix-style permissions atau pemilik (user/group) .

* Konfigurasi Berjalan dengan non-privilegeduser dalam mode stand-alone , hal ini bertujuan untuk mengurangi kemungkinan serangan exploit dengan privelege “root”.

* Logging dan dukungan utmp/wtmp . Logging tersebut kompatibel dengan standar wu-ftpd.

* Dukungan Shadow password, juga dukungan untuk masa berlaku akun.

* Modular design, memperbolehkan server dikonfigurasi dengan modul. Modul ditulis untuk SQL databases, LDAP servers, SSL/TLS encryption, RADIUS support, dll.

* Dukungan terhadap IPv6.

Artikel ini saya membahas konfigurasi dasar dari ProFTPD, dilain waktu saya akan coba jelaskan dengan konfigurasi user database dengan MySQL, dan dicoba pada mesin Linux Slackware 12.1 dan untuk mesin yang lainya hanya tinggal menyesuaikan.

Langkah-langkah;

1. Pertama-tama download paket ProFTPD di ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.2rc4.tar.gz atau dengan versi yang terbaru, pake dengkul juga boleh. Pada saat instalasi Linux Slackware dengan Full Installation, paket ProFTPD sudah terinstall di mesin anda, anda bisa langsung loncat ke langkah 5 untuk konfigurasi.
2. Lakukan ekstraksi, dengan perintah

unamed@slacker:~proftp# tar xvzf proftpd-1.3.2rc4.tar.gz

3. Lakukan konfigurasi, kompilasi, dan letak instalasi (prefix), contoh seperti di bawah ini,

unamed@slacker:~proftp# ./configure –prefix=/usr –sysconfdir=/etc –localstatedir=/var/run && make

4. Jika tidak ada error, “Mari Kita Install,, LANJUTKAN !!!” (kaya kampanye sby Razz )

unamed@slacker:~proftp# make install

5. Membuat Account untuk ProFTPD, ikuti langkah-langkah di bawah ini,

root@slacker:~/proftp# groupadd -g 46 proftpd

root@slacker:~/proftp# useradd -c proftpd -d /srv/ftpd -g proftpd -s /usr/bin/proftpdshell -u 46 proftpd

root@slacker:~/proftp# usermod -c proftpd -d /srv/ftpd -g proftpd -s /usr/bin/proftpdshell -u 46 proftpd

root@slacker:~/proftp# install -v -d -m775 -o proftpd -g proftpd /home/ftp

root@slacker:~/proftp# ln -v -s /bin/false /usr/bin/proftpdshell
`/usr/bin/proftpdshell’ -> `/bin/false’

root@slacker:~/proftp# echo /usr/bin/proftpdshell >> /etc/shells

6. Lalu tahap konfigurasi, buka konfigurasi /etc/proftpd.conf edit dengan teks editor kesayangan anda,

unamed@slacker:~proftp# vi /etc/proftpd.conf

Lalu isi konfigurasi seperti di bawah ini,

# This is a basic ProFTPD configuration file.
# It establishes a single server and a single anonymous login.
# It assumes that you have a user/group “nobody” and “ftp”
# for normal/anonymous operation.

ServerName “ProFTPD Server”
ServerType standalone
DefaultServer on

# Port 21 is the standard FTP port.
Port 21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022

# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30

# Set the user and group that the server normally runs at.
User proftpd
Group proftpd

# This next option is required for NIS or NIS+ to work properly:
#PersistentPasswd off

SystemLog /var/log/proftpd.log
TransferLog /var/log/xferlog

# Normally, we want files to be overwriteable.

AllowOverwrite on


# A basic anonymous FTP server configuration.
# To enable this, remove the user ftp from /etc/ftpusers.

RequireValidShell off
User ftp
Group ftp
# We want clients to be able to login with “anonymous” as well as “ftp”
UserAlias anonymous ftp

# Limit the maximum number of anonymous logins
MaxClients 10

# We want ‘welcome.msg’ displayed at login, and ‘.message’ displayed
# in each newly chdired directory.
DisplayLogin welcome.msg
# DisplayFirstChdir .message

# Limit WRITE everywhere in the anonymous chroot

DenyAll



7. Buka file /etc/ftpusers, dan beri tanda # pada baris ftp

8. Buat file rc.proftpd dan disimpan dalam direktori /etc/rc.d atau /etc/init.d untuk ProFTPD dijalankan secara otomatis setiap komputer dihidupkan, berikut scriptnya,

#!/bin/sh
# ProFTPD files
FTPD_BIN=/usr/sbin/proftpd
FTPD_CONF=/etc/proftpd.conf
PIDFILE=/var/run/run/proftpd.pid
# If PIDFILE exists, does it point to a proftpd process?
if [ -f $PIDFILE ]; then
pid=`cat $PIDFILE`
fi
if [ ! -x $FTPD_BIN ]; then
echo “$0: $FTPD_BIN: cannot execute”
exit 1
fi
case $1 in
start)
if [ -n "$pid" ]; then
echo “$0: proftpd [PID $pid] already running”
exit
fi
if [ -r $FTPD_CONF ]; then
echo “Starting proftpd…”
$FTPD_BIN -c $FTPD_CONF
else
echo “$0: cannot start proftpd — $FTPD_CONF missing”
fi
;;
stop)
if [ -n "$pid" ]; then
echo “Stopping proftpd…”
kill -TERM $pid
else
echo “$0: proftpd not running”
exit 1
fi
;;
restart)
if [ -n "$pid" ]; then
echo “Rehashing proftpd configuration”
kill -HUP $pid
else
echo “$0: proftpd not running”
exit 1
fi
;;
*)
echo “usage: $0 {start|stop|restart}”
exit 1
;;
esac
exit 0

Lalu ketik perintah,

root@slacker:~/proftp# chmod +x /etc/rc.d/rc.proftpd

8. Aktifkan ProFTPD,

root@slacker:~/proftp# proftpd -c /etc/proftpd.conf

test dengan akun proftpd yang dibuat sebelumnya,

root@slacker:~# ftp localhost
Connected to localhost.
220 ProFTPD 1.3.1 Server (FTP Server on slackware.org) [::ffff:127.0.0.1]
Name (localhost:root): proftpd
331 Password required for proftpd
Password:
proftpd access granted, restrictions apply
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

sampai di atas, anda berhasil dengan akun user yang anda buat sendiri, lalu coba dengan akun anyonymous,

root@slacker:~# ftp localhost
Connected to localhost.
220 ProFTPD 1.3.1 Server (FTP Server on slackware.org) [::ffff:127.0.0.1]
Name (localhost:root): anonymous
331 Anonymous login ok, send your complete email address as your password
Password:
230 Anonymous access granted, restrictions apply
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

sukses,,,,HOREEE,,,^_^

Reference :

- www.castaglia.org/proftpd/doc/contrib/ProFTPD-mini-HOWTO-ConfigFile.html
- www.proftpd.org/docs/example-conf.html
- http://logsmylife.wordpress.com/2009/05/02/setting-proftpd-di-linux-slackware/
Suber : http://www.mentorupnvj.co.cc/news.php?readmore=66
sukma
sukma
Moderator
Moderator

Jumlah posting : 123
Age : 36
Lokasi : Magelang
Registration date : 23.05.08

http://www.masihbelajar.co.nr

Kembali Ke Atas Go down

Kembali Ke Atas

- Similar topics

 
Permissions in this forum:
Anda tidak dapat menjawab topik