ftp server-source
Function
The ftp server-source command specifies the source IP address for the FTP server to send packets.
The undo ftp server-source command restores the default source IP address for the FTP server to send IP address.
The default source IP address for the FTP server to send packets is 0.0.0.0.
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 source IP address. You are advised to use the loopback interface IP address. |
- |
-i interface-type interface-number | Specifies the source interface. You are advised to use the loopback interface. The IP address configured for the source interface is the source IP address for sending packets. If no IP address is configured for the source interface, the FTP connection cannot be set up. |
- |
Usage Guidelines
Usage Scenario
If no source IP address (0.0.0.0 by default) is specified, the FTP server uses the source IP address that the router specifies to send packets. The source IP address must be configured for an interface with stable performance. The loopback interface is recommended. Using the loopback interface as the source interface simplifies the ACL rule and security policy configuration. This shields the IP address differences and interface status impact, and incoming and filters outgoing packets, and implements security authentication.
Precautions
- After the source IP address is specified for the FTP server, you must use the specified IP address to log in to the FTP server.
- If FTP services have been enabled, the FTP service restarts after the ftp server-source command is executed.
Example
# Set the source IP address of the FTP server to LoopBack0.
<Huawei> system-view [Huawei] ftp server-source -i loopback0 Warning: To make the server source configuration take effect, the FTP server will be restarted. Continue? (y/n)[n]: y Info: Succeeded in setting the source interface of the FTP server to LoopBack0 Warning: FTP is not a secure protocol, and it is recommended to use SFTP. Info: Succeeded in starting the FTP server