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

Add option HTTP_BINDING_ADDRESS to control the bound IP address #665

Merged
merged 3 commits into from
May 2, 2020

Conversation

dyxyl
Copy link
Contributor

@dyxyl dyxyl commented Apr 29, 2020

I couldn't find a way to force the http server to listen only on 127.0.0.1, so I've created this PR to add an environment variable HTTP_BINDING_ADDRESS to control the bound IP address. This is useful for extra security when running behind a reverse proxy.

The code overrides the :inet6 option because you can control the protocol by using the appropriate string, e.g. ::1 for IPv6.

@DrMichael
Copy link
Collaborator

Well, you can restrict the address in the docker-compose.yml:

ports:
  - 127.0.0.1:4000:4000

restricts it to 127.0.0.1. I am not sure about IPv6 though.

Is that, what you meant?

@dyxyl
Copy link
Contributor Author

dyxyl commented Apr 30, 2020

@DrMichael That works for docker, but I'm running on FreeBSD, based on the manual setup.

@DrMichael
Copy link
Collaborator

DrMichael commented Apr 30, 2020

Ah, I see... Just curious, you COULD run docker also on FreeBSD?

@dyxyl
Copy link
Contributor Author

dyxyl commented Apr 30, 2020

Yes, in theory, but the prebuilt containers are all Linux-based so they will run under ABI emulation.
It would be better to use the FreeBSD native containers (jails) directly.

Copy link
Collaborator

@adriankumpf adriankumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@adriankumpf adriankumpf merged commit 2765ae8 into teslamate-org:master May 2, 2020
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

Successfully merging this pull request may close these issues.

3 participants