环境
系统平台:Linux x86-64 Red Hat Enterprise Linux 7
版本:4.5.10
文档用途
本文只要用于在客户提出hghac8008端口漏洞时,如何进行漏洞处理,本文章的方法已经应用于浪潮云,华为云上的多个客户。
详细信息
总体上处理方式为只允许数据库服务器相关的8008端口互访。
1、服务器上添加富规则,允许相应端口通过,以10.xx.xx.189、10.xx.xx.190、10.xx.xx.191为例
firewall-cmd --add-rich-rule="rule family="ipv4" source address="10.xx.xx.189" port protocol="tcp" port="8008" accept"
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="10.xx.xx.189" port protocol="tcp" port="8008" accept"
firewall-cmd --add-rich-rule="rule family="ipv4" source address="10.xx.xx.190" port protocol="tcp" port="8008" accept"
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="10.xx.xx.190" port protocol="tcp" port="8008" accept"
firewall-cmd --add-rich-rule="rule family="ipv4" source address="10.xx.xx.191" port protocol="tcp" port="8008" accept"
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="10.xx.xx.191" port protocol="tcp" port="8008" accept"
2、重载防火墙策略
firewall-cmd --reload
3、删除全局规则
firewall-cmd --permanent --remove-port=8008/tcp
firewall-cmd --remove-port=8008/tcp
ps: 执行优先级最高,优先规则:直接规则–富规则–区域规则
4、确定策略生效
firewall-cmd --list-all