< Home

ftp client-source

Function

The ftp client-source command sets the specified loopback address or loopback interface as the source address or source interface of the device that functions as the FTP client.

The undo ftp client-source command restores the default source address.

By default, the ftp client source address is 0.0.0.0

Format

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

undo ftp client-source

Parameters

Parameter Description Value

-a source-ip-address

Specifies the loopback address of the local FW.

-

-i interface-type interface-number

Specifies the loopback interface of the local FW.

-

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

If you run the ftp command to log in to an FTP server without specifying a source address or source interface, the source address or source interface that is specified through the ftp client-source command is adopted by default. If you run the ftp command and specify a source address or source interface at the same time, the specified source address or the specified source interface is adopted. When you view the current FTP connection on the server, the specified source IP address or the primary IP address of the specified Loopback interface is displayed as the IP address of the user.

Prerequisites

The source interface specified using the command must exist and have an IP address configured.

Precautions

If the ftp client-source command is not run, the source IP address of the device that functions as the FTP client is 0.0.0.0. When an FTP connection is initiated, the device uses the outbound interface's IP address as the source IP address of FTP packets.

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

Example

# Set the source IP address of the FTP client to 1.1.1.1.

<sysname> system-view
[sysname] ftp client-source -a 1.1.1.1
Info: Succeeded in setting the source address of the FTP client to 1.1.1.1.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >