Commit 76faf0f3 by chenzy

[新增]ES访问风险处理,防火墙限制方法

parent fa4c4ed2
1. ES风险处理
1. ES风险处理
有两种解决方式,一种是用防火墙,一种是nginx代理接口访问
nginx的在集群环境下数据同步会有问题,所以这里只写防火墙处理方法
方案一:用防火墙,控制一些服务器能访问es主机,达到其它用户不能通过9200和9300端口随意操作数据库的目的
开启防火墙启用白名单
# 检查防火墙状态,如果没有开启则开启
systemctl status firewalld
# 设置开机启动防火墙
systemctl enable firewalld
# 启动防火墙
systemctl start firewalld
# 设置白名单
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="后端服务IP" port protocol="tcp" port="1-65535" accept"
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="后端服务IP" port protocol="tcp" port="1-65535" accept"
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="后端服务IP" port protocol="tcp" port="1-65535" accept"
# 重启防火墙
systemctl restart firewalld
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment