# Multiple network interfaces settings and X-PACK

**URL:** https://discuss.elastic.co/t/multiple-network-interfaces-settings-and-x-pack/126585
**Category:** Logstash
**Created:** [April 3, 2018, 1:55pm UTC](https://discuss.elastic.co/t/multiple-network-interfaces-settings-and-x-pack/126585 "2018-04-03T13:55:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dao](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@dao](https://discuss.elastic.co/u/dao)
#### Post date: [April 3, 2018, 1:55pm UTC](https://discuss.elastic.co/t/multiple-network-interfaces-settings-and-x-pack/126585/1 "2018-04-03T13:55:51Z")

</div>

Hello,

I have a server with 2 network interfaces, one on a private network and the other on internet.

On my private network, I have an elasticsearch cluster with X-PACK (ip-filtering). This cluster is not open on internet. I want that logstash communicates with the cluster.

How can I specify logstash to use a specific network interface?

---

<div class="post-metadata">

### Author: ![sm00thindian](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sm00thindian/32/27376_2.png) [@sm00thindian](https://discuss.elastic.co/u/sm00thindian)
#### Post date: [April 3, 2018, 2:50pm UTC](https://discuss.elastic.co/t/multiple-network-interfaces-settings-and-x-pack/126585/2 "2018-04-03T14:50:51Z")

</div>

I believe you can bind Logstash by specifying the ip address of the interface you want to use in your logstash.conf file. Mileage may vary

input {  
tcp  
{ host =\> "10.10.10.10" port =\> 5140 type =\> "json-tcp" debug =\> true }  
}

---

<div class="post-metadata">

### Author: ![dao](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@dao](https://discuss.elastic.co/u/dao)
#### Post date: [April 11, 2018, 1:09pm UTC](https://discuss.elastic.co/t/multiple-network-interfaces-settings-and-x-pack/126585/3 "2018-04-11T13:09:01Z")

</div>

> [@sm00thindian](#):
>
> can bind Logstash by specifying the ip address of the interface you want

Hello I was not clear enought, I think:

My logstash reads on files (input) and writes into the elasticsearch cluster (output)  
The host where logstash runs has 2 network interfaces: a public interface `eth0` IP:`a.a.a.a` and a private interface `eth0:0` IP:b.b.b.b

In the security settings of `elasticsearch.yml` I put an IP filtering mentionning `b.b.b.b`

Now, How can I specify to logstash that it has to connect elasticsearch as the IP `b.b.b.b` and not `a.a.a.a`?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 9, 2018, 1:09pm UTC](https://discuss.elastic.co/t/multiple-network-interfaces-settings-and-x-pack/126585/4 "2018-05-09T13:09:13Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
