Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Configuring a Trusted IP Address to Access LDAP

Updated on 2024-10-11 GMT+08:00

Scenario

By default, the LDAP service deployed in the OMS and cluster can be accessed by any IP address. To enable the LDAP service to be accessed by only trusted IP addresses, you can configure the INPUT policy in the iptables filtering list.

Impact on the System

After the configuration, the LDAP service cannot be accessed by IP addresses that are not configured. Before the expansion, the added IP addresses need to be configured as trusted IP addresses.

Prerequisites

  • You have collected the management plane IP addresses and service plane IP addresses of all nodes in the cluster and all floating IP addresses.
  • You have obtained the root user account for all nodes in the cluster.

Procedure

Configuring trusted IP addresses for the LDAP service on the OMS

  1. Confirm the management node IP address. For details, see Logging In to the Management Node.
  2. Log in to FusionInsight Manager. For details, see Logging In to FusionInsight Manager.
  3. Choose System > OMS and choose oldap > Modify Configuration to view the OMS LDAP port number, that is, the value of LDAP Listening Port. The default port number is 21750.
  4. Log in to the active management node as user root using the IP address of the active management node.
  5. Run the following command to check the INPUT policy in the iptables filtering list:

    iptables -L

    For example, if no rule is configured, the INPUT policy is displayed as follows:

    Chain INPUT (policy ACCEPT) 
    target     prot opt source               destination              

  6. Run the following command to configure all IP addresses used by the cluster as trusted IP addresses. Each IP address needs to be added independently.

    iptables -A INPUT -s Trusted IP address -p tcp --dport Port number -j ACCEPT

    For example, to configure 10.0.0.1 as a trusted IP address and enable it to access port 21750, you need to run the following command:

    iptables -A INPUT -s 10.0.0.1 -p tcp --dport 21750 -j ACCEPT

  7. Run the following command to configure all IP addresses as untrusted IP addresses. The trusted IP addresses will not be affected by this rule.

    iptables -A INPUT -p tcp --dport Port number -j DROP

    For example, to disable all IP addresses to access port 21750, run the following command:

    iptables -A INPUT -p tcp --dport 21750 -j DROP

  8. Run the following command to view the modified INPUT policy in the iptables filtering list:

    iptables -L

    For example, after a trusted IP address is configured, the INPUT policy is displayed as follows:

    Chain INPUT (policy ACCEPT) 
    target     prot opt source               destination          
    ACCEPT     tcp  --  10.0.0.1             anywhere            tcp dpt:21750 
    DROP       tcp  --  anywhere             anywhere            tcp dpt:21750     

  9. Run the following command to view the rules and rule numbers in the iptables filtering list:

    iptables -L -n --line-number

    Chain INPUT (policy ACCEPT) 
    num target     prot opt source               destination          
    1   DROP       tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:21750     

  10. Run the following command to delete the desired rule from the iptables filtering list based on site requirement:

    iptables -D INPUT Number of the rule to be deleted

    For example, to delete rule 1, run the following command:

    iptables -D INPUT 1

  11. Log in to the standby management node as user root using the standby IP address. Repeat 5 to 10.

Configuring trusted IP addresses for the LDAP service in the cluster

  1. Log in to FusionInsight Manager.
  2. Click Cluster, click the name of the desired cluster, and choose Service > LdapServer. On the displayed page, click Instance to view the nodes where the LDAP services locate.
  3. Go to the Configurations page, and view the LDAP port number of the cluster, that is, the value of LDAP_SERVER_PORT. The default value is 21780.
  4. Log in to the LDAP node as user root using the LDAP service IP address.
  5. Run the following command to view the INPUT policy in the iptables filtering list:

    iptables -L

    For example, if no rule is configured, the INPUT policy is displayed as follows:

    Chain INPUT (policy ACCEPT) 
    target     prot opt source               destination              

  6. Run the following command to configure all IP addresses used by the cluster as trusted IP addresses. Each IP address needs to be added independently.

    iptables -A INPUT -s Trusted IP address -p tcp --dport Port number -j ACCEPT

    For example, to configure 10.0.0.1 as a trusted IP address and enable it to access port 21780, you need to run the following command:

    iptables -A INPUT -s 10.0.0.1 -p tcp --dport 21780 -j ACCEPT

  7. Run the following command to configure all IP addresses as untrusted IP addresses. The trusted IP addresses will not be affected by this rule.

    iptables -A INPUT -p tcp --dport Port number -j DROP

    For example, to disable all IP addresses to access port 21780, run the following command:

    iptables -A INPUT -p tcp --dport 21780 -j DROP

  8. Run the following command to view the modified INPUT policy in the iptables filtering list:

    iptables -L

    For example, after a trusted IP address is configured, the INPUT policy is displayed as follows:

    Chain INPUT (policy ACCEPT) 
    target     prot opt source               destination          
    ACCEPT     tcp  --  10.0.0.1             anywhere            tcp dpt:21780 
    DROP       tcp  --  anywhere             anywhere            tcp dpt:21780     

  9. Run the following command to view the rules and rule numbers in the iptables filtering list:

    iptables -L -n --line-number

    Chain INPUT (policy ACCEPT) 
    num target     prot opt source               destination          
    1   DROP       tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:21780     

  10. Run the following command to delete the desired rule from the iptables filtering list based on site requirement:

    iptables -D INPUT Number of the rule to be deleted

    For example, to delete rule 1, run the following command:

    iptables -D INPUT 1

  11. Log in to the LDAP node as user root using the IP address of another LDAP service, and repeat 16 to 21.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback