# gRPC with Private Networking

**URL:** <https://community.fly.io/t/grpc-with-private-networking/11240>\
**Category:** Questions / Help\
**Tags:** login-only\
**Created:** [March 5, 2023, 6:04am UTC](https://community.fly.io/t/grpc-with-private-networking/11240 "2023-03-05T06:04:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bl4ckBe4r](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/bl4ckbe4r/32/13205_2.png) [@Bl4ckBe4r](https://community.fly.io/u/Bl4ckBe4r)\
**Post date:** [March 5, 2023, 6:04am UTC](https://community.fly.io/t/grpc-with-private-networking/11240/1 "2023-03-05T06:04:48Z")

</div>

Hello, need some help 🙂

So i have two services deployed on [fly.io](http://fly.io) as gRPC client and server. And i cannot make them connect using the private networking.

The client is calling: [region].rust-grpc-users.internal, and he doest not see the server.

Server setup:

```auto
# fly.toml file generated for rust-grpc-users on 2023-03-02T10:20:05+01:00

app = "rust-grpc-users"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []

[env]
  PORT= 3000

[experimental]
  allowed_public_ports = []
  auto_rollback = true

[[services]]
  http_checks = []
  internal_port = 3000
  processes = ["app"]
  protocol = "tcp"
  script_checks = []

  [services.concurrency]
    hard_limit = 25
    soft_limit = 20
    type = "connections"

  #[[services.ports]]
  # force_https = true
  # handlers = ["http"]
  # port = 80

[[services.ports]]
    handlers = ["tls"]
    port = "443"
    tls_options = { "alpn" = ["h2"] }

  [[services.tcp_checks]]
    grace_period = "1s"
    interval = "15s"
    restart_limit = 0
    timeout = "2s"

```

Any help please?

---

<div class="post-metadata">

**Author:** ![kdevan](https://avatars.discourse-cdn.com/v4/letter/k/6a8cbe/32.png) [@kdevan](https://community.fly.io/u/kdevan)\
**Post date:** [March 5, 2023, 6:18am UTC](https://community.fly.io/t/grpc-with-private-networking/11240/2 "2023-03-05T06:18:35Z")

</div>

I’m not sure but you could try `[region].rust-grpc-users.internal:3000` with the port?

---

<div class="post-metadata">

**Author:** ![Bl4ckBe4r](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/bl4ckbe4r/32/13205_2.png) [@Bl4ckBe4r](https://community.fly.io/u/Bl4ckBe4r)\
**Post date:** [March 5, 2023, 6:29am UTC](https://community.fly.io/t/grpc-with-private-networking/11240/3 "2023-03-05T06:29:09Z")

</div>

Tried, but still nothing ☹ Added private\_network = true to expermiental, but still nothing.

---

<div class="post-metadata">

**Author:** ![kdevan](https://avatars.discourse-cdn.com/v4/letter/k/6a8cbe/32.png) [@kdevan](https://community.fly.io/u/kdevan)\
**Post date:** [March 5, 2023, 6:31am UTC](https://community.fly.io/t/grpc-with-private-networking/11240/4 "2023-03-05T06:31:55Z")

</div>

Could try `rust-grpc-users.internal:3000` without the region. Both need to be same region for that to work but even so this would be a bit more catch all.

---

<div class="post-metadata">

**Author:** ![Bl4ckBe4r](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/bl4ckbe4r/32/13205_2.png) [@Bl4ckBe4r](https://community.fly.io/u/Bl4ckBe4r)\
**Post date:** [March 5, 2023, 6:40am UTC](https://community.fly.io/t/grpc-with-private-networking/11240/5 "2023-03-05T06:40:11Z")

</div>

Tried every combination, still nothing ☹

---

<div class="post-metadata">

**Author:** ![ignoramous](https://avatars.discourse-cdn.com/v4/letter/i/a9adbd/32.png) [@ignoramous](https://community.fly.io/u/ignoramous)\
**Post date:** [March 5, 2023, 9:09pm UTC](https://community.fly.io/t/grpc-with-private-networking/11240/6 "2023-03-05T21:09:22Z")

</div>

> [@Bl4ckBe4r](#):
>
> Tried every combination, still nothing

Is the server listening for 6pn connections on IPv6 (`::` or `fly-local-6pn` instead of `0.0.0.0`)? See: [Fly io Newbie: Making internal requests between apps - #3 by ignoramous](https://community.fly.io/t/fly-io-newbie-making-internal-requests-between-apps/5307/3) Consequently, is the client capable of making IPv6 connections?

If so, and if you are deploying Apps v1 (nomad), then may be wait it out a bit; ref: [Can anyone from Fly confirm if our support email is actually working?](https://community.fly.io/t/can-anyone-from-fly-confirm-if-our-support-email-is-actually-working/11246)

---

<div class="post-metadata">

**Author:** ![Bl4ckBe4r](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/bl4ckbe4r/32/13205_2.png) [@Bl4ckBe4r](https://community.fly.io/u/Bl4ckBe4r)\
**Post date:** [March 6, 2023, 5:42pm UTC](https://community.fly.io/t/grpc-with-private-networking/11240/7 "2023-03-06T17:42:26Z")

</div>

So i started server on [::]:443, and client is using the standard @grpc/grpc-js library, and trying to connect to rust-grpc-users.internal.

Not working ☹

The same config, but pointing directly at server hostname is working. But i want to hide the server, so that’s it’s only accesible from “inside”. Maybe i can do that some other way? Then i will not need the private network ;p

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [March 13, 2023, 5:42pm UTC](https://community.fly.io/t/grpc-with-private-networking/11240/8 "2023-03-13T17:42:28Z")

</div>

Closed on March 13, 2023, 5:42pm UTC

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