< Home

http server-source

Function

The http server-source command specifies a source interface for an HTTP server.

The undo http server-source command cancels the source interface specified for an HTTP server.

By default, no source interface is specified for an HTTP server.

Format

http server-source -i loopback interface-number

undo http server-source

Parameters

Parameter Description Value
-i loopback interface-number

Specifies a loopback interface as the source interface of an HTTP server.

-

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

By default, an HTTP server accepts login requests from all interfaces, so the system is vulnerable to attacks. To enhance system security, specify a source interface for the HTTP server, so that only authorized users can log in to the server from this interface.

Prerequisites

A loopback interface has been configured.

Configuration Impact

Users can log in to an HTTP server only from the specified source interface.

After you run http server-source command, the HTTP IPv4 user that has logged in to the server will be forcibly logged out and needs to log in again.

Precautions

After the source interface of an HTTP server is specified using the http server-source command, ensure that HTTP users can access the source interface at Layer 3. Otherwise, the HTTP users will fail to log in to the HTTP server.

Example

# Specify loopback 0 as the source interface of an HTTP server.

<HUAWEI> system-view
[HUAWEI] interface loopback 0
[HUAWEI-LoopBack0] quit
[HUAWEI] http server-source -i loopback 0
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >