Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Specify listening IP #168

Open
DerOetzi opened this issue Feb 24, 2018 · 8 comments
Open

[Feature Request] Specify listening IP #168

DerOetzi opened this issue Feb 24, 2018 · 8 comments

Comments

@DerOetzi
Copy link
Contributor

Hi,

I want to host openhab-cloud on one of my servers, which has several ips for different customer services. Now I noticed that openhab-cloud ist listening on all of this IPs on port 3000, which I really don't want because it although opens the possibilty to skip https secured proxy on a specific domain.

I did not find any configuration option to specify an listen ip. Can you add this option?

Thanks in advance

Johannes

@marziman
Copy link
Contributor

marziman commented Mar 4, 2018

Hi @DerOetzi ,

I am not sure if I got you right, but in config.json you can specify your host:

      "host": "<your-openhab-cloud-host>",
      "port": "443",
      "protocol": "https",
      "logging": "info",
      "subDomainCookies": false

@DerOetzi
Copy link
Contributor Author

DerOetzi commented Mar 4, 2018

Hi @marziman,

I don't think this is the right option. I try to explain a little bit more. the server I want to run openhab-cloud has several different ips

W.W.W.W internal VPN IP not reachable from WAN
X.X.X.X public.smarthome.domain.de
Y.Y.Y.Y customer1.domain.de
Z.Z.Z.Z customer2.domain.de
...

I wan't the openhab-cloud listen to https://public.smarthome.domain.de where a apache is listening as proxy to http://W.W.W.W:3000 to ssl secure the connection from the internet.

My Openhab instance at home connects although via vpn to the W.W.W.W:3000. So far, so good. But when I start the openhab-cloud on server it is although listening to http://X.X.X.X:3000 and Y.Y.Y.Y.3000 and Z.Z.Z.Z:3000 and all other customer ips. This is not what I want for two reasons. First on customer's there should never be that port 3000 and on public smarthome ip not as well because it gives the opportunity to skip the ssl proxy.

If I see it right for openhab-cloud express server is used inside the app for presenting the http-protocol and it is initialized only with the PORT set in env or default 3000

var server = app.listen(app.get('port'), function () { logger.info('openHAB-cloud: express server listening on port ' + app.get('port')); });
I think there should be the option to set IP as well something like

var server = app.listen({host:app.get('host'),port:app.get('port')}, function () { logger.info('openHAB-cloud: express server listening on port ' + app.get('port')); });

@DerOetzi
Copy link
Contributor Author

DerOetzi commented Mar 4, 2018

Hi @marziman,

I have greated a pull request with the feature implemented. I'm looking forward for your comments on this.

Regards

DerOetzi

@marziman
Copy link
Contributor

Hi @DerOetzi,

I was busy with docker stuff, sorry.
I will test it tomorrow and merge it accordingly if fine.

Thanks for the PR!

@DerOetzi
Copy link
Contributor Author

Hi @marziman,

I'm really looking forward to your comments on the PR. Did you already managed to have a look on it?

Thanks

digitaldan added a commit that referenced this issue Apr 21, 2018
digitaldan added a commit that referenced this issue Apr 21, 2018
* Revert "Fix paging parameter (page/skip/limit) handling. (#174)"

This reverts commit 34a09b6.

* Revert "Specify HOST for express server to listen on #168 (#172)"

This reverts commit 8e95065.
@DerOetzi
Copy link
Contributor Author

@digitaldan Hi can you give me a short update on my new PR please?

@DerOetzi
Copy link
Contributor Author

DerOetzi commented Sep 3, 2018

Hi @marziman, @digitaldan

is there any problem with my Pull Request #190. Anything can do or have to change to get it merged?

@digitaldan
Copy link
Contributor

Apologies, I am just coming around to PR's today, I will comment on the PR now, thanks for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants