INSTALL,CONFIGURE AND TEST FTP
INSTALL,CONFIGURE AND TEST FTP
install vsftpd
-ftp sever
yum install vsftpd
systemctl start vsftd
inorder to work this 1 st disable selinux - edit file
vim /etc/selinux/config
SELINUX=disabled
rebbot the machine to apply selinx changes
now edit vsftdd conf file
vim /etc/vsftpd/vsftd.conf
anonymous_enable means login anonymous users to download whatever they want from ftp server
local_umask=022
which sets the permission for users
anon_upload_enable
means anonymous upload from the users.u should not allow
logs stored:
/var/log/xferlog - by default
listen=NO
listen_ipv6=YES
by default it listens on ipv4 sockets.
in this ex used all the conf as it is but added below lines as a part of trouble shoting bcz had lot of problem with ftp,with fw for time being
add below
pasv_enable=YES means passive mode for ftp is enabled
pasv_max_port=40000 maximum port to be 40000
pasv_min_port=40000 minimum port to be 40000 which means 1 port
### allow this rule in firewall
firewall-cmd --permanent --add-port=40000/tcp ###
## ftp uses 2 ports
one for communication and other for actual transfer of files ##
changed ftpd banner as well
ftpd_banner=welcome guest to my test ftpd server
restart vsftpd service bcz we made some changes
systemctl restart vsftpd
now allow port at firewall level
firewall-cmd --permanent --add-port=21/tcp
create file to download in ftp server
files location: var/ftp/pub
vi /var/ftp/pub/hi
now connect to this ftp server
linux: wget ftp://192.168.0.84/pub/hi
or
install ftp client in linux machine
yum install lftp
lftp 192.168.0.84
ls
u see pub
ls pub
u see hi
get hi
or login with user specified
lftp neelima@192.168.0.84
password: enter it
it got connected now
ls
it shows the home directory of that user
get -for download files
u can see system created users for ftp
cat /etc/passwd | grep "ftp"
windows machine
open terminal
cd C:/
open 192.168.0.84
asks for user and pwd
user: neelima
pwd: neelima
it got connected
it opens home directory of that user
ftp service uses port 21
ftp uses 2 ports
one for 21 for communication and other for transfer files here 40000
yum install vsftpd
systemctl start vsftd
inorder to work this 1 st disable selinux - edit file
vim /etc/selinux/config
SELINUX=disabled
rebbot the machine to apply selinx changes
now edit vsftdd conf file
vim /etc/vsftpd/vsftd.conf
anonymous_enable means login anonymous users to download whatever they want from ftp server
local_umask=022
which sets the permission for users
anon_upload_enable
means anonymous upload from the users.u should not allow
logs stored:
/var/log/xferlog - by default
listen=NO
listen_ipv6=YES
by default it listens on ipv4 sockets.
in this ex used all the conf as it is but added below lines as a part of trouble shoting bcz had lot of problem with ftp,with fw for time being
add below
pasv_enable=YES means passive mode for ftp is enabled
pasv_max_port=40000 maximum port to be 40000
pasv_min_port=40000 minimum port to be 40000 which means 1 port
### allow this rule in firewall
firewall-cmd --permanent --add-port=40000/tcp ###
## ftp uses 2 ports
one for communication and other for actual transfer of files ##
changed ftpd banner as well
ftpd_banner=welcome guest to my test ftpd server
restart vsftpd service bcz we made some changes
systemctl restart vsftpd
now allow port at firewall level
firewall-cmd --permanent --add-port=21/tcp
create file to download in ftp server
files location: var/ftp/pub
vi /var/ftp/pub/hi
now connect to this ftp server
linux: wget ftp://192.168.0.84/pub/hi
or
install ftp client in linux machine
yum install lftp
lftp 192.168.0.84
ls
u see pub
ls pub
u see hi
get hi
or login with user specified
lftp neelima@192.168.0.84
password: enter it
it got connected now
ls
it shows the home directory of that user
get -for download files
u can see system created users for ftp
cat /etc/passwd | grep "ftp"
windows machine
open terminal
cd C:/
open 192.168.0.84
asks for user and pwd
user: neelima
pwd: neelima
it got connected
it opens home directory of that user
ftp service uses port 21
ftp uses 2 ports
one for 21 for communication and other for transfer files here 40000
Comments
Post a Comment