# I wonder about NAT

**URL:** <https://forum.cedalo.com/t/i-wonder-about-nat/323>\
**Category:** Deployment\
**Created:** [September 7, 2021, 1:14pm UTC](https://forum.cedalo.com/t/i-wonder-about-nat/323 "2021-09-07T13:14:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomas](https://avatars.discourse-cdn.com/v4/letter/t/439d5e/32.png) [@Tomas](https://forum.cedalo.com/u/Tomas)\
**Post date:** [September 7, 2021, 1:14pm UTC](https://forum.cedalo.com/t/i-wonder-about-nat/323/1 "2021-09-07T13:14:37Z")

</div>

I wonder if you could subscribe with mosquitto\_sub to a host behind NAT.  
like mosquitto\_sub -h x.x.x.x:1183 -t #  
If you have a external Ip with a broker but also other broker behind the external Ip.

Or is it impossible to workaround without ssh or similar to get “inside” the network first

---

<div class="post-metadata">

**Author:** ![roger.light](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@roger.light](https://forum.cedalo.com/u/roger.light)\
**Post date:** [September 8, 2021, 1:06pm UTC](https://forum.cedalo.com/t/i-wonder-about-nat/323/2 "2021-09-08T13:06:10Z")

</div>

Hi Tomas,

The client has to initiate the connection, so if the broker does not have an external IP it would not be possible to connect to it directly. You may be able to configure port forwarding on the external router to have port 1883 sent to the broker in the private IP.

Regards,

Roger

---

<div class="post-metadata">

**Author:** ![Tomas](https://avatars.discourse-cdn.com/v4/letter/t/439d5e/32.png) [@Tomas](https://forum.cedalo.com/u/Tomas)\
**Post date:** [September 27, 2021, 11:27am UTC](https://forum.cedalo.com/t/i-wonder-about-nat/323/3 "2021-09-27T11:27:46Z")

</div>

Hi again  
Yes I solved it with portforwarding.  
mosquitto\_sub -t # -v -h X.X.X.X -p XXXX

Worked fine
