40.5. Creating Virtual Servers

ProFTPD's most useful feature is probably its support for virtual FTP servers. This allows you to define a totally different set of options that apply to clients connecting to a particular IP address. In most ways, they are similar to Apache's IP-based virtual servers, with which most website administrators should be familiar.

Virtual servers are only really useful if your system has multiple IP addresses. Typically, this is done by adding additional virtual IP addresses to your Internet-connected network interface, as explained in Chapter 16, which covers Network Configuration. As usual, any extra IP addresses must be properly routed to your system. If you are connected to an ISP and assigned only a single static address, you cannot just add additional virtual interfaces and expect them to work. Unlike Apache, ProFTPD does not support name-based virtual servers because there is no provision in the FTP protocol for them. Clients never tell the server the hostname to which they are connecting, so the FTP server can only use the IP address on which a connection was received to determine which virtual server the client wants.

When your system receives an FTP connection, ProFTPD will compare the connected address with those of all configured virtual servers. The first one to match defines the options that apply to the connection. If no match is found, the default server is used instead.

To add a new virtual FTP server to your system, follow these steps:

1.
In the Network Configuration module, add a new virtual IP address to the external network interface on your system. Make sure that it will be activated at boot time and is active now.

2.
Back in the ProFTPD Server module, scroll down to the Create virtual server form at the bottom of the main page.

3.
In the Address field, enter the IP address that you just assigned. It should not be used by any other virtual server already defined.

4.
Leave the Port field set to Default.

5.
In the Server name field, select the second radio button and enter a name for this server that will be displayed to connecting clients. For example, you could enter Example Corporation's FTP server. If Default is selected, clients will see a message like ProFTPD 1.2.2rc2 Server instead.

6.
Hit the Create button to add the server. Once it has been created, you will be taken to the new server's options page.

7.
Return to the module's main page and click the Apply Changes button to make it active.

Once a virtual server has been created, you can set options that apply to it by clicking on its icon on the main page, then clicking on one of the category icons. Some of these are explained in more detail later in this chapter. It is also possible to change the attributes of a virtual server by clicking on the Configure Virtual Server icon, editing the fields on the form (which have the same meanings as those on the creation form) and clicking Save. Or you can remove it altogether by hitting the Delete virtual server button on the configuration form.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.67.125