# using Wireguard / connecting to a port on an app

**URL:** <https://community.fly.io/t/using-wireguard-connecting-to-a-port-on-an-app/5701>\
**Category:** Questions / Help\
**Created:** [June 20, 2022, 5:54pm UTC](https://community.fly.io/t/using-wireguard-connecting-to-a-port-on-an-app/5701 "2022-06-20T17:54:18Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [June 21, 2022, 2:57pm UTC](https://community.fly.io/t/using-wireguard-connecting-to-a-port-on-an-app/5701/4 "2022-06-21T14:57:17Z")

</div>

> I’m also using `"::1"` for the host on the nrepl-server instead of `"localhost"`.

If the intention is to connect to `nrepl-server` over `6pn`, then `nrepl-server` must listen on `::` or `_local_ip.internal` or `fly-local-6pn` to accept connections tunneled in Fly’s wireguard overlay (`6pn`).

See also: [Private networking not working - #4 by kurt](https://community.fly.io/t/private-networking-not-working/993/4)

> …also added a line to my Dockerfile, `EXPOSE 7888`.

Fly doesn’t respect dockerfile’s `EXPOSE` directive. If you intend the port be exposed to the public internet, you need to specify so in `fly.toml` ([ref](https://fly.io/docs/app-guides/udp-and-tcp/#the-basic-idea)). If you intend the port be exposed on the vm, there’s nothing to be done, as your Fly app has a free reign to open as many ports it likes.

---

_[View the full topic](https://community.fly.io/t/using-wireguard-connecting-to-a-port-on-an-app/5701)._
