# Cannot Connect to Machines on internal Service Port

**URL:** <https://community.fly.io/t/cannot-connect-to-machines-on-internal-service-port/8330>\
**Category:** Build debugging\
**Created:** [October 30, 2022, 6:41pm UTC](https://community.fly.io/t/cannot-connect-to-machines-on-internal-service-port/8330 "2022-10-30T18:41:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [October 30, 2022, 8:04pm UTC](https://community.fly.io/t/cannot-connect-to-machines-on-internal-service-port/8330/2 "2022-10-30T20:04:00Z")

</div>

> [@bromanko](#):
>
> However, I cannot connect via the exposed port:

Over `6pn`, one must connect to `internal_port` (`8080`?), not the (public) exposed one. But I see you did so, and it didn’t work.

If you do want to connect to public ports over `6pn`, I _think_ (not sure) you can do so over a [Flycast address](https://community.fly.io/t/new-feature-application-private-ips/6078), which you must explicitly assign to an app.

> [@bromanko](#):
>
> so, the output of the app doesn’t show the service ports

For a Machine app, instead exec `fly m status <vm-id> -d -a <machine-app-name>` ([docs](https://fly.io/docs/flyctl/machine-status/)).

If you haven’t already, then `fly ssh console "[6pn-addr]"` ([ref](https://community.fly.io/t/fly-ssh-console-fails-with-error-host-unavailable-host-was-not-found-in-dns/5781/5)) and exec `netstat -alpn` to see if things are listening on ports you expect them to.

---

_[View the full topic](https://community.fly.io/t/cannot-connect-to-machines-on-internal-service-port/8330)._
