Kloxo FTP On OpenVZ with CSF
jika ada yang pernah ngalamin mempunyai VPS Virtuozo based yang di install kloxo, trus di kasi CSF, ftp server tidak bisa diakses. (baik pure-ftp atau proftpd)
untuk solving tipnya :
cek di dokumentasi csf nya di bagian ini :
13. A note about FTP Connection Issues
######################################
It is important when using an SPI firewall to ensure FTP client applications
are configured to use Passive (PASV) mode connections to the server.
On servers running Monolithic kernels (e.g. VPS Virtuozzo/OpenVZ and custom
built kernels) ip_conntrack and ip_conntrack_ftp iptables kernel modules may
not be available or fully functional. If this happens, FTP passive mode (PASV)
won't work. In such circumstances you will have to open a hole in your firewall
and configure the FTP server to use that same hole.
For example, with pure-ftpd you could add the port range 30000:35000 to TCP_IN
and add the following line to /etc/pure-ftpd.conf and then restart pure-ftpd:
PassivePortRange 30000 35000
For example, with proftpd you could add the port range 30000:35000 to TCP_IN
and add the following line to /etc/proftpd.conf and then restart proftpd:
PassivePorts 30000 35000
FTP over SSL/TLS will usually fail when using an SPI firewall. This is because
of the way the FTP protocol established a connection between client and server.
iptables fails to establish a related connection when using FTP over SSL
because the FTP control connection is encrypted and so cannot track the
relationship between the connection and the allocation of an ephemeral port.
If you need to use FTP over SSL, you will have to open up a passive port block
in both csf and your FTP server configuration (see above).
Perversely, this makes your firewall less secure, while trying to make FTP
connections more secure.
kemudian caranya :
untuk pure-ftpd, edit file pure-ftpd.conf (letak file biasanya di etc/ ), kemudian aktifkan line ini :
PassivePortRange 30000 35000
untuk proftpd :
edit file proftpd.conf, dan tambahkan sintak berikut :
PassivePorts 30000 35000
kemudian aktifkan di csf firewallnya :
# Allow incoming TCP ports
TCP_IN = "20,21,22,25,53,80,110,30000:35000"
kemudian reboot
masalah saya seperti ini mas, jadi saya tidak bisa akses FTP Online / WebFTP dengan port 21. apa saya harus melakukan hal diatas?
pake VPS mas ?
kalo iya cek :
– cek service ftp udah jalan atau belum
– cek firewall, apakah trafik ke port ftp di allow/accept untuk keluar masuk
ia mas saya pakai vps, webnya sudah online tapi belum diapa2kan…
barusan saya cek
# service ftp
yang kelur
-bash: unrecognized service
sepertinya memanang belum aktif ya? bagaimana cara mengaktifkannya n cara cek firewallnya mas? saya pemula di vps terlagi linux..
ok mas.. kalo di vps
– pastikan dulu vps nya pake OS apa, kalo linux, linux distro apa, misal centos, debian, dll
– cek port yang open pake perintah
netstat -pln
cek ftp bisa disingkat dengan perintah
netstat -pln|grep 21
jika belum open/listen portnya, pastikan dulu paket ftp servernya udah di instal ato belum, jika sudah (tergantung OS) ccoba jalanin ftp servernya dgn perintah
/etc/init.d/nama-servisnya restart
jika belum terinstall paket ftp servernya, silahkan install :
-proftpd
-pureftpd
wah betul mas di list belum ada port 21.. di kloxo sudah ada pureftp apa yang harus saya lakukan mas?
saya juga bingung dengan comand ini “/etc/init.d/nama-servisnya restart” nama servicenya itu apa ya?
kalo install proftpd jalanin service nya bisa
service proftpd start
atau
/etc/init.d/proftpd start
kalo pure-ftp kayaknya
service pure-ftpd start
atau
/etc/init.d/pure-ftpd start
kedua command’a ga mau mas untuk start pure-ftpd.. apa ga apa2 ya kalu udah ada pureftp install proftpd juga?
OS nya distro linux apa mas ?
install pure-ftp nya lewat bawaan paket apa compile sendiri ?
installnya salah satu aja mas
kalo di install dua2 nya malah bentrok/konflik port nya secara default
saya pakai vps mas bukan di pc sendiri, OSnya Cent OS 5.6 Final 32-bit control panelnya Kloxo.. pureftp bawaan dari Kloxo mas..
oh…
udah lama gak pake kloxo…
tapi kalo gak isa ftp nya, coba jalanin perintah
service xinetd restart ato start
udah mas.. apa bener ya settingan ini /etc/xinetd.d/pureftp
# default: off
# description: pure-ftpd server, xinetd version. \
# Don’t run the standalone version if you run \
# this and remember do set “Daemonize” to “no” \
# in /etc/pure-ftpd/pure-ftpd.conf
service pureftp
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/pure-config.pl
server_args = /etc/pure-ftpd/pure-ftpd.conf
log_on_success += DURATION USERID
log_on_failure += USERID
nice = 10
}
dan tambah 2 line di /etc/services jadi kaya ini
ftp 21/tcp
ftp 21/udp fsp fspd
ftp 21/tcp
ftp 21/udp fsp fspd
betul mas..
cuman di /etc/service tidak perlu, secara default port ftp udah enable
dari /etc/xinetd.d/pureftp
disable = no
mestinya tinggal jalanin perintah
service xinetd restart
sudah bisa jalan ftp server nya
atau bisa di cek di kloxo webminya di bagian service
upz! maaf mas salah saya jadikan begini yang di services
pureftp 11717/tcp
pureftp 11717/udp fsp fspd
ftp 21/tcp
ftp 21/udp fsp fspd
betul salah mas?
wah mas, yg /etc/services gak perlu di ubah2 mas… tu udah standart port info
kalo mo ubah konfigurasi pure-ftpd di
/etc/pure-ftpd/pure-ftpd.conf
wah ia betul udh bisa sekarang mas… terimakasih.. 🙂
punya saya kok menunggu ucapan selamat datang trus ya mas…setelah itu koneksi time out, ada solution ?
nyang disini
/etc/xinetd.d/pureftp
disable sy ganti “no” (tanpa tanda petik)
yg lain masih utuh…dimana lagi yg perlu disetting mas ?
Masih aja Unrecognized service ketika saya jalanin service ftp
saya pake kloxo, pureftp nya udah include kan..???
otomatis sudah include mas…
cek di lokal dulu mas, pastikan port ftp terbuka
cek dengan ftp ke localhost
kalo semisal di cek dari ip luar error, kemungkinan ada di firewallnya