Limited virtual hosting provides partial support for virtual FTP servers. You can enable support for limited virtual hosting by specifying the virtual root directory. If required, you can also set the following parameters for the virtual host in the ftpaccess file:
banner
logfile
hostname
All directives in the ftpaccess file are shared globally across all virtual servers.
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. To configure a role with the Primary Administrator profile, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
Add the following entries to the ftpaccess file.
virtual address root|banner|logfile path virtual address hostname|email string |
Keyword that is used to enable virtual server capabilities
IP address of the virtual server
The root directory of the virtual server
Banner file that is displayed when a connection is made to the virtual server
Record of file transfers that are made to and from the virtual server
Variable that is used to specify the location of directories and files on the virtual server
Email address that is used in message files and in the HELP command
Name of the host that is shown in the greeting message or status command
Variable that is used to specify email or hostname parameters
While it is possible to use hostname as the address of the virtual server, you are strongly encouraged to use the IPv4 address instead. DNS must be available when the FTP connection is received in order for hostname to be matched. For an IPv6 host, use the host name rather than the IPv6 address.
virtual 10.1.2.3 root /var/ftp/virtual/ftp-serv virtual 10.1.2.3 banner /var/ftp/virtual/ftp-serv/banner.msg virtual 10.1.2.3 logfile /var/log/ftp/virtual/ftp-serv/xferlog |
The preceding example sets the location of the root directory, banner, and logfile on a virtual FTP server.
The ftpaddhost(1M) script with the -l option is provided to configure limited virtual hosts.
In the following example, ftpaddhost is run with -l -b -x options to configure limited virtual hosting with a test banner and the logfile /var/ftp/virtual/10.1.2.3/xferlog under a virtual root /var/ftp/virtual/10.1.2.3.
# ftpaddhost -l -b -x /var/ftp/virtual/10.1.2.3/xferlog \ /var/ftp/virtual/10.1.2.3 |