ftp
TRANSCRIPT
1
2
What is FTP?
File Transfer Protocol is one of the oldest
members of the TCP/IP protocol stack, yet it is
still in common use today. As the name suggests, it is
optimized for transferring files.
3
FTP Server for Linux/Unix
vsFTPd - Very Secure FTP Daemon
WU-FTP - Washington University s (St. Louis)
Proftpd
4
How FTP works ?
WindowsClient
WindowsClient
FTPServerFTP
Server
LinuxClientLinuxClient
/var/ftp/pub/var/ftp/pub
A
User1
B
User2User1
BA
User2
192.168.0.253192.168.0.253
5
Requirements
Packages
vsftpd-2.0.1-5.i386.rpm
Port Numbers
20 Ftp Data Transfer
21 Ftp Control Connection
Configuration File
/etc/vsftpd/vsftpd.conf
Service
vsftpd
Daemon
vsftpd
6
FTP Server Configuration - Anonymous Access
WindowsClient
WindowsClient
FTPServerFTP
Server
LinuxClientLinuxClient
/var/ftp/pub/var/ftp/pub192.168.0.253192.168.0.253
7
Configuring FTP Server
Install the package by using one of the installation methods
[root@comp1 ~]# mount 192.168.0.250:/var/ftp/pub/RedHat/RPMS/ /mnt
[root@comp1 ~]# cd /mnt
[root@comp1 ~]# rpm -ivh vsftpd-2.0.1-5.i386.rpm --force --aid
Install the package by using one of the installation methods
[root@comp1 ~]# mount 192.168.0.250:/var/ftp/pub/RedHat/RPMS/ /mnt
[root@comp1 ~]# cd /mnt
[root@comp1 ~]# rpm -ivh vsftpd-2.0.1-5.i386.rpm --force --aid
Open configuration for editing
[root@comp1~]# vi /etc/vsftpd/vsftpd.conf
Open configuration for editing
[root@comp1~]# vi /etc/vsftpd/vsftpd.conf
8
/etc/vsftpd/vsftpd.conf
Change the below options
anonymous_enable=YES
local_enable=NO
anon_upload_enable=YES
dirmessage_enable=YES
ftpd_banner=Welcome to ZOOM FTP service.
Change the below options
anonymous_enable=YES
local_enable=NO
anon_upload_enable=YES
dirmessage_enable=YES
ftpd_banner=Welcome to ZOOM FTP service.
9
Configuring FTP Server
Creating upload directory
[root@comp1 ~]# mkdir /var/ftp/upload
Creating upload directory
[root@comp1 ~]# mkdir /var/ftp/upload
Giving Upload permissions
[root@comp1 ~]# chmod 777 /var/ftp/upload
Giving Upload permissions
[root@comp1 ~]# chmod 777 /var/ftp/upload
To restart the FTP services
[root@comp1 ~]# service vsftpd restart
To restart the FTP services
[root@comp1 ~]# service vsftpd restart
10
FTP Client Linux
Accessing FTP via Command Line Interface
[root@comp1 ~]#Connected to 192.168.0.253.220 (vsFTPd 2.0.1)530 Please login with USER and PASS.530 Please login with USER and PASS.KERBEROS_V4 rejected as an authentication typeName (192.168.0.253:root):331 Please specify the password.Password:230 Login successful.Remote system type is UNIX.Using binary mode to transfer files.ftp>227 Entering Passive Mode (192,168,0,12,80,246)150 Here comes the directory listing.drwxr-xr-x 2 0 0 4096 Mar 01 06:42 pubdrwxr-xrwx 2 0 0 4096 Mar 01 07:05 upload226 Directory send OK.ftp>221 Goodbye.[root@comp1 ~]#
Accessing FTP via Command Line Interface
[root@comp1 ~]#Connected to 192.168.0.253.220 (vsFTPd 2.0.1)530 Please login with USER and PASS.530 Please login with USER and PASS.KERBEROS_V4 rejected as an authentication typeName (192.168.0.253:root):331 Please specify the password.Password:230 Login successful.Remote system type is UNIX.Using binary mode to transfer files.ftp>227 Entering Passive Mode (192,168,0,12,80,246)150 Here comes the directory listing.drwxr-xr-x 2 0 0 4096 Mar 01 06:42 pubdrwxr-xrwx 2 0 0 4096 Mar 01 07:05 upload226 Directory send OK.ftp>221 Goodbye.[root@comp1 ~]#
ftp 192.168.0.253
ftp
ls
bye
.
11
FTP Client Linux
Accessing FTP via Graphical User Interface
[root@comp1 ~]# gftp 192.168.0.253
Accessing FTP via Graphical User Interface
[root@comp1 ~]# gftp 192.168.0.253
Accessing FTP via Graphical User Interface
Open Mozilla or Fire Fox browser.
In the address box type ftp://192.168.0.253
Accessing FTP via Graphical User Interface
Open Mozilla or Fire Fox browser.
In the address box type ftp://192.168.0.253
12
FTP Client Windows
Accessing FTP via Command Line InterfaceC:\Documents and Settings\Administrator >Connected to 192.168.0.253.220 (vsFTPd 2.0.1)User (192.168.0.15:(none)):331 Please specify the password.Password:230 Login successful.ftp>200 PORT command successful. Consider using PASV.150 Here comes the directory listing.pubupload226 Directory send OK.ftp: 50 bytes received in 0.02Seconds 3.13Kbytes/sec.ftp>C:\Documents and Settings\Administrator >
Accessing FTP via Command Line InterfaceC:\Documents and Settings\Administrator >Connected to 192.168.0.253.220 (vsFTPd 2.0.1)User (192.168.0.15:(none)):331 Please specify the password.Password:230 Login successful.ftp>200 PORT command successful. Consider using PASV.150 Here comes the directory listing.pubupload226 Directory send OK.ftp: 50 bytes received in 0.02Seconds 3.13Kbytes/sec.ftp>C:\Documents and Settings\Administrator >
ftp 192.168.0.253
ftp
ls
bye
.
13
FTP Client Windows
Accessing FTP via Graphical User Interface
Open Internet Explorer or Netscape Navigator browser.
In the address box type ftp://192.168.0.253
Accessing FTP via Graphical User Interface
Open Internet Explorer or Netscape Navigator browser.
In the address box type ftp://192.168.0.253
14
FTP Server Configuration Local User Access
WindowsClient
WindowsClient
FTPServerFTP
Server
LinuxClientLinuxClient
/var/ftp/pub/var/ftp/pub192.168.0.253192.168.0.253
15
/etc/vsftpd/vsftpd.conf
Change the below options
anonymous_enable=NO
local_enable=YES
Change the below options
anonymous_enable=NO
local_enable=YES
16
Configuring FTP Server
Creating users
[root@comp1 ~]# useradd user1
[root@comp1 ~]# useradd user2
Creating users
[root@comp1 ~]# useradd user1
[root@comp1 ~]# useradd user2
Assigning password to the users
[root@comp1 ~]# passwd user1
[root@comp1 ~]# passwd user2
Assigning password to the users
[root@comp1 ~]# passwd user1
[root@comp1 ~]# passwd user2
17
FTP Client Linux
Accessing FTP via Command Line Interface
[root@comp1 ~]#Connected to 192.168.0.253.220 (vsFTPd 2.0.1)530 Please login with USER and PASS.530 Please login with USER and PASS.KERBEROS_V4 rejected as an authentication typeName (192.168.0.253:root):331 Please specify the password.Password:230 Login successful.Remote system type is UNIX.Using binary mode to transfer files.ftp>227 Entering Passive Mode (192,168,0,12,80,246)150 Here comes the directory listing./home/user1226 Directory send OK.ftp>221 Goodbye.[root@comp1 ~]#
Accessing FTP via Command Line Interface
[root@comp1 ~]#Connected to 192.168.0.253.220 (vsFTPd 2.0.1)530 Please login with USER and PASS.530 Please login with USER and PASS.KERBEROS_V4 rejected as an authentication typeName (192.168.0.253:root):331 Please specify the password.Password:230 Login successful.Remote system type is UNIX.Using binary mode to transfer files.ftp>227 Entering Passive Mode (192,168,0,12,80,246)150 Here comes the directory listing./home/user1226 Directory send OK.ftp>221 Goodbye.[root@comp1 ~]#
ftp 192.168.0.253
user1
pwd
bye
****