# What network mode use in podman-compose

**URL:** <https://discuss.elastic.co/t/what-network-mode-use-in-podman-compose/321914>\
**Category:** Logstash\
**Tags:** docker\
**Created:** [December 23, 2022, 12:50pm UTC](https://discuss.elastic.co/t/what-network-mode-use-in-podman-compose/321914 "2022-12-23T12:50:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vnovotny98](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vnovotny98/32/124809_2.png) [@vnovotny98](https://discuss.elastic.co/u/vnovotny98)\
**Post date:** [December 23, 2022, 12:50pm UTC](https://discuss.elastic.co/t/what-network-mode-use-in-podman-compose/321914/1 "2022-12-23T12:50:12Z")

</div>

Hello,  
I have a problem with podman-compose. I have running ELK stack and communication between apps is working but I cant figure out why I cant connect from another host to logstash input.

Can you please tell me which network\_mode are you using in podman for logstash?  
I was using network mode host in docker, but now I switched to podman but my application servers cannt connect to logstash. In podman there is no network host and I use bridge.

I made dump and I can see that app machine wants to send logs to logstash but docker cannt respond.

```auto
   10.12.1.30.46524 > 10.12.10.70.6379: Flags [S], cksum 0x9d05 (correct), seq 1371328963, win 29200, options [mss 1380,sackOK,TS val 1148183335 ecr 0,nop,wscale 7], length 0
11:19:42.600654 IP (tos 0x0, ttl 63, id 41139, offset 0, flags [DF], proto TCP (6), length 60)
    10.12.1.30.46524 > 10.12.10.70.6379: Flags [S], cksum 0x991c (correct), seq 1371328963, win 29200, options [mss 1380,sackOK,TS val 1148184336 ecr 0,nop,wscale 7], length 0
11:19:44.604616 IP (tos 0x0, ttl 63, id 41140, offset 0, flags [DF], proto TCP (6), length 60)
    10.12.1.30.46524 > 10.12.10.70.6379: Flags [S], cksum 0x9148 (correct), seq 1371328963, win 29200, options [mss 1380,sackOK,TS val 1148186340 ecr 0,nop,wscale 7], length 0

```

From my config I think this is important:

```auto
services:
  elk-logstash:
    image: logstash:8.4.0
    ports:
      - "6379:6379"
      - "5044:5044"
      - "9600:9600"
    logging:
        driver: journald
        options:
          tag: "{{.Name}}"

```

```auto
input {
  tcp {
    mode => "server"
    host => "0.0.0.0"
    port => "6379"
    ssl_enable => "true"
    ssl_cert => "***"
    ssl_key => "***"
    ssl_key_passphrase => "***"
    ssl_verify => "false"
    ssl_cipher_suites => ['TLS_AES_256_GCM_SHA384', 'TLS_AES_128_GCM_SHA256', 'TLS_CHACHA20_POLY1305_SHA256', 'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384', 'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384', 'TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256', 'TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256', 'TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256', 'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256', 'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384', 'TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384', 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256', 'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256']
    ssl_supported_protocols => ['TLSv1.2', 'TLSv1.3']
    codec => "json_lines"
    tags => "ssl_TCPinput"
  }
}

```

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [December 23, 2022, 12:56pm UTC](https://discuss.elastic.co/t/what-network-mode-use-in-podman-compose/321914/2 "2022-12-23T12:56:31Z")

</div>

You mean the mode in the `tcp` input plugin?

If you want to send data to logstash using the `tcp` input, then you need to use the `server` mode, which is the default and you do not need to specify it in your configuration.

If this was working with docker, but it is not working with podman, then it is a network issue and not related to Logstash, it would be better to check with a Podman community.

---

<div class="post-metadata">

**Author:** ![vnovotny98](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vnovotny98/32/124809_2.png) [@vnovotny98](https://discuss.elastic.co/u/vnovotny98)\
**Post date:** [December 23, 2022, 1:02pm UTC](https://discuss.elastic.co/t/what-network-mode-use-in-podman-compose/321914/3 "2022-12-23T13:02:06Z")

</div>

I mean network mode like bridge, host, ip

Docker has host networks but Podman hasn' t  
Docker:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/c/1c6561ab6cc95604265e3b61384e2bfb94402bba.png)

---

<div class="post-metadata">

**Author:** ![vnovotny98](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vnovotny98/32/124809_2.png) [@vnovotny98](https://discuss.elastic.co/u/vnovotny98)\
**Post date:** [December 23, 2022, 1:03pm UTC](https://discuss.elastic.co/t/what-network-mode-use-in-podman-compose/321914/4 "2022-12-23T13:03:05Z")

</div>

I think that many members here are using logstash in podman-compose and they must somehow connect some app machines to logstash, I cant figure out how.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [December 23, 2022, 1:09pm UTC](https://discuss.elastic.co/t/what-network-mode-use-in-podman-compose/321914/5 "2022-12-23T13:09:38Z")

</div>

You will need to wait to see if someone who has a use case similar to yours can help out.

As I said, this is not an issue with Logstash, it is a network issue related to your infrastructure with Podman, looking for a forum specific to podman has more chances to solve your issue faster.

Have you search for podman here to see if there is something related?

---

<div class="post-metadata">

**Author:** ![vnovotny98](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vnovotny98/32/124809_2.png) [@vnovotny98](https://discuss.elastic.co/u/vnovotny98)\
**Post date:** [December 23, 2022, 1:19pm UTC](https://discuss.elastic.co/t/what-network-mode-use-in-podman-compose/321914/6 "2022-12-23T13:19:02Z")

</div>

I searched but they had problem with connect logstash to ES. But I have a problem in communication logstash input. I use application logback that send logs to logstash but both are on another VM.  
This scenario is about 5 years old now. I dont know, maybe I should use something new. Can you tell me what is now trend to use?  
I have Java apps that use logback and in logback I have appender STASH and it sends json logs to logstash.

---

<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:** [January 20, 2023, 1:19pm UTC](https://discuss.elastic.co/t/what-network-mode-use-in-podman-compose/321914/7 "2023-01-20T13:19:49Z")

</div>

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