iptables中的ElasticSearch端口

伊贾兹·艾哈迈德·汗(Ijaz Ahmad Khan)

我已经设置了一个弹性搜索集群,其中包含两个数据节点,一个主节点和一个客户端节点kibanaiptables在每个节点上都禁用了它来运行它

现在,我需要启用,iptables并且我想知道我需要在每个节点上打开哪个端口(9200、9300)以及在哪个方向上(传入或传出或同时向两个方向)打开。

我还需要知道我需要在哪个节点上进行身份验证,只有客户端节点?

ZOXIS

Elasticsearch使用以下端口范围:

  • 9200-9300:Web API连接。
  • 9300-9400:红外线/节点通信

在Elasticsearch Cluster节点之间:

iptables -A INPUT -p tcp -s <source> --dport 9300:9400 -j ACCEPT

在Master和Kibana之间(客户端>服务器):

iptables -A INPUT -p tcp -s <source> --dport 9200 -j ACCEPT

默认情况下,Elasticsearch使用UDP多播来发现网络上的其他节点以形成集群。您可以使用以下规则来启用

iptables -A INPUT -m pkttype --pkt-type multicast -j ACCEPT

或者

另一种更好的选择(较大的集群可从中受益更多)是通过切换到单播最大程度地减少多播的闲聊(请注意,某些云提供商不允许单播)

另外,您也可以使用Transport定义自己的端口绑定配置

transport.profiles.default.port: 9300-9400
transport.profiles.default.bind_host: 10.0.0.1
transport.profiles.client.port: 9500-9600
transport.profiles.client.bind_host: 192.168.0.1
transport.profiles.dmz.port: 9700-9800
transport.profiles.dmz.bind_host: 172.16.1.2

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章