Applicable scenario
- Product:
ZCF - Component:
Cloud - Versions:
4.8.x, 4.6.x - Deployment topology: dual management nodes
- Trigger: Security-scan remediation requires blocking high-risk ports and upgrading OpenSSH.
Symptoms
- Block
5900,5901,5902,3306,7070,9100,9103,9090, and6379. - Upgrade OpenSSH components.
- Incorrect port restrictions can affect internal service communication.
Determination method
- Confirm that customer external services do not depend on the listed ports.
- Check
iptables -nvL -t mangleandipset listafter blocking. - Check
rpm -qa | grep opensshafter upgrade.
Cause
The remediation combines blocking designated high-risk ports with a security-hardening script and upgrading OpenSSH RPMs. Define allowed IPs before running the script and retain precise iptables/ipset rollback steps.
Resolution
- Preparation
- Risk level: low.
- Disable global HA or set HA policy to a conservative mode.
- Confirm that customer external services do not use the ports to be blocked.
- Back up current
ipsetconfiguration.
- Port blocking
- Back up
ipset:
ipset save > /etc/sysconfig/ipset
- Expected result: Existing rules are recoverable.
- Upload and extract the hardening script:
tar zxvf safe_script_v4.6.tar.gz
- Expected result: The script directory is ready.
- Enter the directory and run it:
cd safe_script/
bash safe.sh
- Enter the platform
adminpassword. - Expected result: The script interaction interface opens.
- Select:
3: Restrict physical-host ports1: Configure rules- Enter:
5900,5901,5902,3306,7070,9100,9103,9090,6379
- Press Enter for allowed IPs to allow all cluster IPs.
- Expected result: Target port restriction rules are written.
- Enter
qafter blocking completes.
- Expected result: The script completes.
- Check the result:
iptables -nvL -t mangle
ipset list <ZS-ALLOW-IP-*>
- Expected result: Target-port DROP rules and allowed-IP sets exist.
- Upgrade OpenSSH
- Upload and verify
sha256for:
openssh-8.2.Xp1-16.p08.ky10.aarch64.rpmopenssh-server-8.2.Xp1-16.p08.ky10.aarch64.rpmopenssh-clients-8.2.Xp1-16.p08.ky10.aarch64.rpm- Expected result: Packages are complete and trusted.
- Run:
yum localinstall -y openssh-8.2p1-16.p08.ky10.aarch64.rpm openssh-clients-8.2p1-16.p08.ky10.aarch64.rpm openssh-server-8.2p1-16.p08.ky10.aarch64.rpm
- Expected result: OpenSSH components are upgraded.
- Check versions:
rpm -qa | grep openssh
- Expected result: New RPMs are installed.
- Enable platform HA.
- Expected result: The change process is complete.
Verification
- Target-port restrictions are effective in
iptables -nvL -t mangle. - Allowed rule sets exist in
ipset list. rpm -qa | grep opensshshows upgraded packages.- Platform services and cluster-internal communication are normal.
Risks and rollback
- Risk: Incorrect port selection or allowed scope can affect internal services.
- Risk: Mismatched OpenSSH RPMs can cause upgrade failure.
- Risk level: low.
Rollback
- Delete an individual IP from a rule set:
ipset del <rule_set> <ip>
- Find a DROP rule for a port:
iptables-save | grep ZS-SAFE-CONFIGURATION | grep "dport 9090" | grep "DROP"
- Delete the rule:
iptables -t mangle -D INPUT ... --dport 9090 -j DROP
- Delete the rule set:
ipset destroy <rule_set>
- Note: Delete
iptablesrules before runningipset destroy.
