Welcome!: Red Hat Network Services and Security Administration
Welcome!: Red Hat Network Services and Security Administration
*irtua" #irectory
Access ontro"
+, Scri%ts
3
Understanding FTP Server
4
What is FTP?
FTP- t&e Fi"e Trans!er Protoco"- is one o! t&e origina" network
a%%"ications deve"o%ed wit& t&e TP.,P %rotoco" suite/ ,t !o""ows t&e
standard mode" !or network services- as FTP re0uires a c"ient and a
server - t&e !irst im%"ementations o! FTP date )ack to 1231/
FTP set out to so"ve t&e need to %u)"is& documents and so!tware so
t&at %eo%"e cou"d get t&em easi"y !rom ot&er com%uter systems/ 4n t&e
FTP server- !i"es were organi5ed in a directory structure6 users cou"d
connect to t&e server over t&e network -and down"oad !i"es !rom 7and
%ossi)"y u%"oad !i"es to8 t&e server/
5
What is vsftpd?
T&e Very Secure FTP Server Very Secure FTP Server 7vsFTPd8 is t&e on"y FTP server so!tware
inc"uded in t&e Red Hat 9inu: distri)ution - vsFTPd is )ecoming t&e
FTP server o! c&oice !or sites t&at need to su%%ort t&ousands o!
concurrent down"oads/ ,t was a"so designed to secure your systems
against most common attacks/
6
Configuration Files
FTP uses TCP ports !" #for ftp data$ % !& #ftp progra'$.
7
Starting vsftpd service
ftp -.-.-.-
For .nstalling Pac(ages fro' FTP server For .nstalling Pac(ages fro' FTP server
*SFTP# a""ows un"imited connection !rom t&e same c"ient ,P address/ =ou
can easi"y !orce vs!t%d !t% server to use "imited num)er o! connection/
T&ere is a s%ecia" directive ca""ed 'a-perip.
vi /etc/vsftpd/vsftpd.conf
'a-perip1*
'a-clients1! ))))) 'a- si'ultaneous connections
11
5llo6ing 7anony'ous8 upload to FTP
From t&is idea came t&e conce%t o! using one c"ient 7t&e (e) )rowser8
to access data 7te:t- images- sounds- video- and )inary !i"es8 !rom
severa" ty%es o! servers 7HTTP- FTP and SMTP Servers 8
T&e 5pache We/ Server 5pache We/ Server was origina""y )ased on HTTPd- a !ree server
!rom NSA 7t&e Nationa" enter !or Su%ercom%uting A%%"ications8
14
5pache <ain Features
T&e sta)i"ity and ra%id deve"o%ment cyc"e associated wit& a "arge grou%
o! coo%erative vo"unteer %rogrammers/
T&e de!au"t con!iguration !i"e insta""ed wit& t&e A%ac&e HTTP Server works
wit&out a"teration !or most situations/
16
5pache 0TTP Server !.!
There are important differences between the Apache HTTP Server 2.2 and
version 2.0 (version 2.0 shipped with Red Hat Enterprise Linu ! and ear"ier#.
Support for hand"in$ "ar$e fi"es (name"+( $reater than 2,-# on .2/bit
p"atforms
The fo""owin$ chan$es have been made to the defau"t httpd confi$uration%
/etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf
httpd httpd
18
0osting Virtual 0ost
vi /etc/httpd/conf/httpd.conf vi /etc/httpd/conf/httpd.conf
httpd )t httpd )t
vi /etc/httpd/conf/httpd.conf vi /etc/httpd/conf/httpd.conf
vi /etc/httpd/conf/httpd.conf vi /etc/httpd/conf/httpd.conf
vi /etc/httpd/conf/httpd.conf vi /etc/httpd/conf/httpd.conf
vi .var.www.&tm".station1./&taccess
vi /var/666/ht'l/station&/cgi)/in vi /var/666/ht'l/station&/cgi)/in
LM//in//ash LM//in//ash
echo Content)type: te-t/ht'l echo Content)type: te-t/ht'l
echo echo
echo H?preCH echo H?preCH
echo <y userna'e is: echo <y userna'e is:
6hoa'i 6hoa'i
echo echo
echo <y id is: echo <y id is:
id id
echo H?/preCH echo H?/preCH
25
CK. Script