The ftp server-source command specifies the source IP address for an FTP server to send packets.
The undo ftp server-source command restores the default source IP address for an FTP server to send packets.
The default source IP address for the FTP server to send packets is 0.0.0.0.
ftp server-source { -a source-ip-address | -i interface-type interface-number }
undo ftp server-source
Parameter | Description | Value |
---|---|---|
-a source-ip-address |
Specifies the IPv4 address of the source interface on the local device. |
- |
-i interface-type interface-number |
Specifies the source interface of the local device. |
- |
Usage Scenario
If no source IP address (0.0.0.0 by default) is specified, the FTP server uses the source IP address specified by routes to send packets. The source IP address must be configured for an interface with stable performance, such as the loopback interface. Using the loopback interface as the source IP address simplifies the ACL rule and security policy configuration. This shields the IP address differences and interface status impact, filters incoming and outgoing packets, and implements security authentication.
Precautions
# Set the source IP address of the FTP server to LoopBack0.
<HUAWEI> system-view [HUAWEI] ftp server-source -i loopback 0 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.