This example shows how you might set up virtual hosts
where different clients access your machine on different IP addresses (virtual
IPs) and get redirected to different ftp sites
For example
you could have the two different IPs represent two totally different FTP sites
For this example
Step
ifconfig eth
(the standard IP address is
(note
added
Step
useradd
chown root
chmod a+rx /var/ftp_site
umask
mkdir /var/ftp_site
echo
Step
Edit /etc/xinetd
bind =
Step
cp /etc/xinetd
Edit vsftpd
server_args = /etc/nf
This launches this FTP site with a different vsftpd configuration file
cp /etc/nf /etc/nf
Add two lines:
ftp_username=ftp_site
ftpd_banner=This is the alternative FTP site
Step
/etc/rc
[chris@localhost vsftpd]$ ftp
Connected to
Name (
[chris@localhost vsftpd]$ ftp
Connected to
Name (
Login failed
ftp> quit
[chris@localhost vsftpd]$ ftp
Connected to
Name (
Login failed
ftp>
From:http://tw.wingwit.com/Article/program/Oracle/201311/18549.html