[サーバ1のファイル ( /etc/proftpd1.conf ) ]
# This is a first server configuration file
ServerName "ftp.aconus.com FTP Server"
Servertype inetd
DefaultServer on
Port 21
UseReverseDNS off
MaxInstances 30
User nobody
Group nobody
LogFormat allinfo "%t : %u (%a [%h]) : [%s], %T, %m (%f)"
LogFormat write "%t : %u : %F (%a)"
LogFormat read "%t : %u : %F (%a)"
LogFormat auth "%t : %u (%a [%h])"
Umask 022
AuthPAMConfig ftp
TimesGMT off
IdentLookups off
MasqueradeAddress aconusftp.aconus.com
PassivePorts 5000 5029
DefaultRoot ~/public_html users,!wheel
ExtendedLog /var/log/proftpd/all.log ALL allinfo
ExtendedLog /var/log/proftpd/write.log WRITE write
ExtendedLog /var/log/proftpd/read.log READ read
ExtendedLog /var/log/proftpd/auth.log AUTH auth
<Directory />
AllowOverwrite on
</Directory>
<Limit LOGIN>
DenyGroup !users
</Limit>
<IfModule mod_tls.c>
TLSEngine on
TLSLog /var/log/proftpd/tls.log
TLSCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
TLSRequired off
TLSRSACertificateFile /usr/local/certs/server0.crt
TLSRSACertificateKeyFile /usr/local/certs/server0.key
TLSVerifyClient off
</IfModule>
# A basic anonymous configuration, no upload directories.
<Anonymous ~ftp>
User ftp
Group ftp
UserAlias anonymous ftp
MaxClients 20
DisplayLogin welcome.msg
DisplayFirstChdir .message
<Limit LOGIN>
AllowAll
</Limit>
<Directory *>
<Limit WRITE>
Order allow, deny
Allow from 127.0.0.1, 192.168.1.0/24
Deny from all
</Limit>
</Directory>
</Anonymous>
[サーバ2のファイル ( /etc/proftpd2.conf ) ]
# This is a second server configuration file
ServerName "ftp.example.com FTP server"
Servertype inetd
DefaultServer on
Port 21
UseReverseDNS off
MaxInstances 30
User nobody
Group nobody
LogFormat allinfo "%t : %u (%a [%h]) : [%s], %T, %m (%f)"
LogFormat write "%t : %u : %F (%a)"
LogFormat read "%t : %u : %F (%a)"
LogFormat auth "%t : %u (%a [%h])"
Umask 022
AuthPAMConfig ftp
TimesGMT off
IdentLookups off
MasqueradeAddress 111.222.111.222
PassivePorts 5000 5029
DefaultRoot /srv/ftp/exsample
<Directory /srv/ftp/exsample>
AllowOverwrite on
</Directory>
<Limit LOGIN>
DenyGroup !example
</Limit>
<IfModule mod_tls.c>
TLSEngine on
TLSLog /var/log/proftpd/example-tls.log
TLSCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
TLSRequired off
TLSRSACertificateFile /usr/local/certs/server1.crt
TLSRSACertificateKeyFile /usr/local/certs/server1.key
TLSVerifyClient off
</IfModule>
ExtendedLog /var/log/proftpd/example-all.log ALL allinfo
ExtendedLog /var/log/proftpd/example-write.log WRITE write
ExtendedLog /var/log/proftpd/example-read.log READ read
ExtendedLog /var/log/proftpd/example-auth.log AUTH auth
[サーバ1のファイル ( /etc/xinetd.d/proftpd1 ) ]
# default: on
# description: The ProFTPD FTP server
service ftp
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/proftpd
server_args = -c /etc/proftpd1.conf
bind = 192.168.1.100
log_on_failure += USERID
disable = no
}
[サーバ2のファイル ( /etc/xinetd.d/proftpd2 ) ]
# default: on
# description: The ProFTPD FTP server
service ftp
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/proftpd
server_args = -c /etc/proftpd2.conf
bind = 192.168.1.101
log_on_failure += USERID
disable = no
}
# This is a basic ProFTPD configuration file
ServerName "ProFTPD"
Servertype inetd
DefaultServer on
DefaultAddress 0.0.0.0
Port 21
UseReverseDNS off
MaxInstances 30
User nobody
Group nobody
LogFormat allinfo "%t : %u (%a [%h]) : [%s], %T, %m (%f)"
LogFormat write "%t : %u : %F (%a)"
LogFormat read "%t : %u : %F (%a)"
LogFormat auth "%t : %u (%a [%h])"
<Global>
Umask 022
AuthPAMAuthoritative On
AuthPAMConfig ftp
TimesGMT off
IdentLookups off
</Global>
# First virtual server
<VirtualHost 192.168.1.100>
ServerName "ftp.aconus.com FTP Server"
MasqueradeAddress aconusftp.aconus.com
PassivePorts 5000 5029
DefaultRoot ~/public_html users,!wheel
ExtendedLog /var/log/proftpd/all.log ALL allinfo
ExtendedLog /var/log/proftpd/write.log WRITE write
ExtendedLog /var/log/proftpd/read.log READ read
ExtendedLog /var/log/proftpd/auth.log AUTH auth
<Directory />
AllowOverwrite on
</Directory>
<Limit LOGIN>
DenyGroup !users
</Limit>
<IfModule mod_tls.c>
TLSEngine on
TLSLog /var/log/proftpd/tls.log
TLSCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
TLSRequired off
TLSRSACertificateFile /usr/local/certs/server0.crt
TLSRSACertificateKeyFile /usr/local/certs/server0.key
TLSVerifyClient off
</IfModule>
# A basic anonymous configuration, no upload directories.
<Anonymous ~ftp>
User ftp
Group ftp
UserAlias anonymous ftp
MaxClients 20
DisplayLogin welcome.msg
DisplayFirstChdir .message
<Limit LOGIN>
AllowAll
</Limit>
<Directory *>
<Limit WRITE>
Order allow, deny
Allow from 127.0.0.1, 192.168.0.0/23
Deny from all
</Limit>
</Directory>
</Anonymous>
</VirtualHost># Another virtual server
<VirtualHost 192.168.1.101>
ServerName "ftp.example.com FTP server"
MasqueradeAddress 111.222.111.222
PassivePorts 5000 5029
DefaultRoot /var/www
<Directory /var/www>
AllowOverwrite on
</Directory>
<Limit LOGIN>
DenyGroup !example
</Limit>
<IfModule mod_tls.c>
TLSEngine on
TLSLog /var/log/proftpd/example-tls.log
TLSCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
TLSRequired off
TLSRSACertificateFile /usr/local/certs/server1.crt
TLSRSACertificateKeyFile /usr/local/certs/server1.key
TLSVerifyClient off
</IfModule>
ExtendedLog /var/log/proftpd/example-all.log ALL allinfo
ExtendedLog /var/log/proftpd/example-write.log WRITE write
ExtendedLog /var/log/proftpd/example-read.log READ read
ExtendedLog /var/log/proftpd/example-auth.log AUTH auth
</VirtualHost>
# default: on
# description: The ProFTPD FTP server
service ftp
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/proftpd
log_on_failure += USERID
disable = no
}