On Thu, May 23, 2002 at 07:54:45PM +0700, Adrian Soetanto wrote:
> 1.
> Apakah bisa menjalankan 2 service pd port yg sama, ip beda & root dir beda, 
> tetapi service yg satu jalan di ip alias ?

bisa. ini di komputer saya di rumah:

root:/jail> ps ax|grep ftp
  474 ?        S      0:00 tcpserver -DRHl0 192.168.0.1 21 vsftpd
 1286 vc/2     S      0:00 tcpserver -DHRl0 192.168.0.2 21 vsftpd
 1323 vc/3     S      0:00 grep ftp
root:/jail> ls -l /proc/474|grep 'root ->'
lrwxrwxrwx    1 root     root            0 May 23 21:34 root -> /
root:/jail> ls -l /proc/1286|grep 'root ->'
lrwxrwxrwx    1 root     root            0 May 23 21:35 root -> /jail
root:/jail> netstat -tnlp|grep ':21'
tcp        0      0 192.168.0.2:21          0.0.0.0:*               LISTEN
1286/tcpserver
tcp        0      0 192.168.0.1:21          0.0.0.0:*               LISTEN
474/tcpserver
root:/jail> ftp 192.168.0.1
Connected to 192.168.0.1.
220 Welcome to home network.
Name (192.168.0.1:root): anonymous
331 Please specify the password.
Password:
230 Login successful. Have fun.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> dir
# panjang .. dipotong
226 Directory send OK.
ftp> quit
221 Goodbye.
# sekarang ftp ke service yang chrooted
root:/jail> ftp 192.168.0.2
Connected to 192.168.0.2.
220 Welcome to home network.
Name (192.168.0.2:root): anonymous
331 Please specify the password.
Password:
230 Login successful. Have fun.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> dir
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
-rw-r--r--    1 0        0               0 May 23 14:12 ini_di_chroot_jail
226 Directory send OK.
ftp> quit
221 Goodbye.
root:/jail> ls -l /jail/ftp
total 0
-rw-r--r--    1 root     root            0 May 23 21:12 ini_di_chroot_jail

> jadi singkatnya begini:
> service1: port 21, eth0,   root dir: /
> service2: port 21, eth0:0, root dir: /var/chroot

saya pakai dummy interface, alias via netlink (iproute2), sama saja.

> Karena waktu saya coba tidak bisa...

nah .. ini .. nggak bisanya kenapa. note saya waktu excercise di
rumah juga tidak langsung berhasil lho. yang di atas itu saya buat
sekalian membuat reply mail ini. sayangnya saya tidak bisa menampilkan
semua screen capture di mail ini, kecuali merelakan diri diprotes
anggota milis linux admin he..he.. hint masih sama, gunakan strace.
paling-paling kurang libs, kurang conf, salah passwd dll. pikirkan
saja hal-hal yang paling sederhana, sebenarnya setup chroot ini
tidak terlalu sulit.

untuk ftp daemon saya pakai vsftpd. terus terang saya kesulitan
setup non-anonymous ftp (login_enable) di vsftpd berhubung vsftpd
internally melakukan chroot lagi, call capset() -> core dump ;-)
untuk keperluan ini PAM support vsftpd saya matikan biar praktis.

> "Susah" karena tdk standar itu gimana maksudnya ?
> Karena waktu saya coba bisa jalan dengan baik  :)

waduh .. sekarang bisa jalan dengan baik :-))) maksud saya,
kalau mesti jalan di port selain 21 kan 'susah'. mesti kasih
tahu ke calon client, di port mana ftp daemon kita listen.

Salam,

P.Y. Adi Prasaja


-- 
Utk berhenti langganan, kirim email ke [EMAIL PROTECTED]
Informasi arsip di http://www.linux.or.id/milis.php3

Kirim email ke