[SOLVED] How to configure launch script so that only local host listens on 8080

  • OS: Ubuntu Server 18.04 (headless)
  • Java Runtime Environment: Zulu 8
  • openHAB version: openHAB 2.4.0 Release Build

I want to modify OpenHAB in my Ubuntu launch script so that only local host listens on 8080 but I an not sure where to find this script and what to change.

It is not configured in the launch script. I believe it is in the configuration file /etc/defaults/openhab2.

I have configure the security as per https://www.openhab.org/docs/installation/security.html. This means that when I browse to the IP, it get challenged with a username and password, plus all traffic is encrypted. The issue I have however is that one can get around this by browsing to IP:8080.

I was told that I could fix this by only allowing localhost to browse via 8080 and than I would need to configure this in the startup scripts.

Looking at /etc/defaults/openhab2 I can see that OPENHAB_HTTP_ADDRESS=127.0.0.1 already.

I am therefore not sure what else to try.

It looks like I did not restart the service after making the change. Once rebooted, it all worked.

OPENHAB_HTTP_ADDRESS=127.0.0.1 did the trick.

2 Likes

Perhaps you can submit a PR on GitHub to clarify documentation.

Done :slight_smile:

1 Like