< Home

ftp server-source

Function

The ftp server-source command configures the specified loopback address or loopback interface as the source address or source interface of the FTP server.

The undo ftp server-source command cancels the specified source IP address of a FTP server.

Format

ftp server-source { -a source-ip-address | -i interface-type interface-number }

undo ftp server-source

Parameters

Parameter Description Value

-a source-ip-address

Specifies the ipv4 address of the local device.

-

-i interface-type interface-number

Specifies a source interface for the FTP server.

-

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

After running the ftp server-source command, you can only use the specified IPv4 address or loopback interface of the FTP server for login. You need to restart the FTP service to activate the configuration.

If the ftp server-source command is not configured, all users can log in to the FTP server by default.

Prerequisites

Before you specify a logical interface as the source interface, ensure that the interface to be specified is created and has an IP address configured. Before you specify a physical interface as the source interface, ensure that the interface has an IPv4 address configured. Otherwise, the ftp server-source command cannot be successfully executed.

Configuration Impact

After the source interface is specified, the system only allows FTP users to log in to the FTP server through this source interface, and FTP users logging in through other interfaces are denied. Note that setting this parameter only affects FTP users that attempt to log in to the FTP server, and it does not affect FTP users that have logged in to the server.

Precautions

After the source interface of a FTP server is specified using this command, ensure that FTP users can access the source interface at Layer 3. Otherwise, the FTP users will fail to log in to the FTP server.

If the specified source interface has been bound to a VPN instance, the server is automatically bound to the same VPN instance.

The source interface is not specified, which may cause security risks.

Example

# Set the source interface of the FTP server to LoopBack0.

<sysname> system-view
[sysname] ftp server-source -i loopback0
Warning: To make the server source configuration take effect, the FTP server will be restarted. Continue? [Y/N]: y
Info: Succeeded in setting the source interface of the FTP server to LoopBack0.
Info: Succeeded in starting the FTP server.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >