The ftp server-source command sets the specific source IP address of the FTP server to establish the connection, including the source IP address and source interface.
The undo ftp server-source command cancels the configuration of FTP server source configuration.
The ftp server-source physic-isolate command configures the isolation source interface of the FTP server.
The ftp server-source physic-isolate command cancels the isolation source interface of the FTP server.
By default, the IPv4 source address of packet sent by the FTP server is 0.0.0.0 . The IPv6 source address of packet sent by the FTP server is ::.
ftp server-source { -a { ip-address } | -i { interface-type interface-number | interface-name } }
ftp ipv6 server-source -a ipv6-address [ -vpn-instance vpn-instance-name ]
ftp ipv6 server-source all-interface
ftp server-source all-interface
ftp ipv6 server-source physic-isolate -i { interface-type interface-number | interface-name } -a { ipv6-address }
ftp server-source physic-isolate -i { interface-type interface-number | interface-name } -a { ip-address }
undo ftp server-source { -a { ip-address } | -i { interface-type interface-number | interface-name } }
undo ftp ipv6 server-source -a ipv6-address [ -vpn-instance vpn-instance-name ]
undo ftp server-source all-interface
undo ftp ipv6 server-source all-interface
undo ftp ipv6 server-source physic-isolate -i { interface-type interface-number | interface-name } -a { ipv6-address }
undo ftp server-source physic-isolate -i { interface-type interface-number | interface-name } -a { ip-address }
Parameter | Description | Value |
---|---|---|
-a ip-address |
Specifies the source IP address. |
The value is in the decimal format. |
-a ipv6-address |
Specifies the source IPv6 address. |
The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
-i interface-name |
Specifies the source interface name of an FTP server. |
- |
interface-type interface-number |
Specifies the source interface type and interface number of an FTP server. |
- |
ipv6 |
Specifies the FTP IPv6 server. |
- |
-vpn-instance vpn-instance-name |
Specifies the VPN. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string. |
all-interface |
Indicates that any interface having an IP address configured can be used as the source interface of an FTP server. |
- |
Usage Scenario
The FTP server receives login connection requests from all interfaces and addresses, which has low system security. To improve system security, run the ftp server-source command to specify the source interface or source IPv6 address of the FTP server, and run the ftp server-source physic-isolate command to specify the isolated source interface of the FTP server.
Prerequisites
A loopback interface has been created if you want to specify it as the source interface for an FTP server. Otherwise, the command cannot be executed.
A VPN instance has been created before you specify it for an FTP server. Otherwise, the command cannot be executed.
Configuration Impact
If a source interface or source IPv6 address is specified for an FTP server, FTP users can log in only through the specified source interface or source IPv6 address.
Precautions
<HUAWEI> system-view [~HUAWEI] ftp server-source -a 10.1.1.1
<HUAWEI> system-view [~HUAWEI] interface LoopBack 0 [~HUAWEI-LoopBack0] ip address 10.1.1.1 16 [*HUAWEI-LoopBack0] quit [*HUAWEI] ftp server-source -i loopback 0
<HUAWEI> system-view [~HUAWEI] ftp server-source all-interface
<HUAWEI> system-view [~HUAWEI] ftp ipv6 server-source all-interface
<HUAWEI> system-view [~HUAWEI] ftp server-source physic-isolate -i GigabitEthernet 0/1/0 -a 10.1.1.1 Warning: FTP server source configuration will take effect in the next login. Do you want to continue? [Y/N]:y Info: Succeeded in setting Succeeded in setting the source interface of the FTP server to GigabitEthernet0/1/0.
<HUAWEI> system-view [~HUAWEI] ftp ipv6 server-source physic-isolate -i GigabitEthernet 0/1/0 -a 2001:db8::1 Warning: FTP server source configuration will take effect in the next login. Do you want to continue? [Y/N]:y Info: Succeeded in setting Succeeded in setting the source interface of the FTP server to GigabitEthernet0/1/0.