# Port not opening for Apple Homekit on Linux

**URL:** <https://community.openhab.org/t/port-not-opening-for-apple-homekit-on-linux/143030>\
**Category:** Other\
**Tags:** port, homekit, applehomekit, metadata, openhab3\
**Created:** [January 6, 2023, 5:57pm UTC](https://community.openhab.org/t/port-not-opening-for-apple-homekit-on-linux/143030 "2023-01-06T17:57:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastiencastermans](https://community.openhab.org/user_avatar/community.openhab.org/sebastiencastermans/32/118744_2.png) [@sebastiencastermans](https://community.openhab.org/u/sebastiencastermans)\
**Post date:** [January 6, 2023, 5:57pm UTC](https://community.openhab.org/t/port-not-opening-for-apple-homekit-on-linux/143030/1 "2023-01-06T17:57:26Z")

</div>

Hi all,

I have a problem while configuring Homekit on openhab which itself is on linux… I followed the tutorial as presented [here](https://www.openhab.org/addons/integrations/homekit/) and doing an analysis of open ports, port 9123 is not! After a lot of searching, I couldn’t find anything about it. Could someone help me to solve this problem? Of course, when I scan the QR code with the Homekit app, it can’t connect to it…

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Jacek\_Kaczmarczyk](https://community.openhab.org/user_avatar/community.openhab.org/jacek_kaczmarczyk/32/58513_2.png) [@Jacek\_Kaczmarczyk](https://community.openhab.org/u/Jacek_Kaczmarczyk)\
**Post date:** [January 10, 2023, 10:06pm UTC](https://community.openhab.org/t/port-not-opening-for-apple-homekit-on-linux/143030/2 "2023-01-10T22:06:21Z")

</div>

Sure, you need to check  
1/ if the service is up and running

```auto
pi@raspberrypi:~ $ netstat -nl |grep 9124
tcp 0 0 192.168.0.13:9124 0.0.0.0:* LISTEN

```

2/ if it is accesible  
` **sudo iptables -L** `  
if default policy is ACCEPT it will be OK  
3/ or try  
` **nc 127.0.0.1 9124 -w 1 -v** `  
Connection to 127.0.0. 1 9124 port [tcp/\*] succeeded!

4/ check if there is hap service visible from linux host  
avahi-browse \_hap.\_tcp  
5/ check if there is hap service visible from your Phone i personaly use “Discover” app but you can use any mdns  
6/ check if there are more than 1 router in your wifi setup, sometimes mdns packetes are not passing routers

and check budle startup logs from

```auto
openhab-cli console -p habopen log:set TRACE org.openhab.io.homekit.internal
openhab-cli console -p habopen log:tail org.openhab.io.homekit.internal

```

good luck!

---

<div class="post-metadata">

**Author:** ![sebastiencastermans](https://community.openhab.org/user_avatar/community.openhab.org/sebastiencastermans/32/118744_2.png) [@sebastiencastermans](https://community.openhab.org/u/sebastiencastermans)\
**Post date:** [January 21, 2023, 10:45am UTC](https://community.openhab.org/t/port-not-opening-for-apple-homekit-on-linux/143030/3 "2023-01-21T10:45:34Z")

</div>

Hello, thank you for your answer. In the meantime, I realized that the linux did not know how to open the port because it is connected via wifi and RJ45. So I put the ip address of the RJ45 connection in the Apple Homekit configuration and it opened the port for me directly (after restarting all the same). So it works great now! Thanks again
