Skip to content

Commit

Permalink
Set ERL_EPMD_ADDRESS=127.0.0.1 by default
Browse files Browse the repository at this point in the history
If an EPMD process is spawned during eturnal startup, let it listen on
localhost only.

This reverts commit 3a65d40, since
issue #11 has been addressed by Erlang/OTP 25.0:

erlang/otp@e8c9e12

Resolves #9.
  • Loading branch information
weiss committed Jul 13, 2022
1 parent 53d133d commit 353039e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ project adheres to [Semantic Versioning][SemVer].
`ENV` variable or a configuration file).

### Changed
- If an [EPMD](https://erlang.org/doc/man/epmd.html) process is spawned during
eturnal startup, let it listen on `localhost` only (#9). (Note that our Linux
packages and container images are
[configured](https://eturnal.net/documentation/#ERL_DIST_PORT) to _not_ start
an EPMD process.)
- Omit the code location from log messages, except when debug logging is
enabled.
- Apply other minor logging improvements.
Expand Down
2 changes: 1 addition & 1 deletion build.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
{eturnal_user, "eturnal"}.
{eturnal_bin_prefix, "/opt/eturnal"}. % Points to: /opt/eturnal/bin/eturnal
{eturnal_etc_prefix, ""}. % Points to: /etc/eturnal.yml
{erl_epmd_address, ""}.
{erl_epmd_address, "127.0.0.1"}.
{erl_dist_port, ""}.
1 change: 0 additions & 1 deletion config/eturnal.service
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ LogsDirectory=eturnal
ProtectSystem=full
NoNewPrivileges=true
AmbientCapabilities=CAP_NET_BIND_SERVICE
#Environment="ERL_EPMD_ADDRESS=127.0.0.1"

[Install]
WantedBy=multi-user.target
14 changes: 6 additions & 8 deletions doc/overview.edoc
Original file line number Diff line number Diff line change
Expand Up @@ -540,14 +540,12 @@ feature requires at least Erlang/OTP 23.1 and Rebar3 3.18.0.</em>
=== ERL_EPMD_ADDRESS ===

On eturnal startup, an Erlang Port Mapper Daemon (EPMD) service is spawned (if
it's not running already and {@section ERL_DIST_PORT} isn't specified). By
default, this service listens on all available interfaces. Setting the
`ERL_EPMD_ADDRESS' environment variable tells EPMD to listen on the specified
comma-seperated list of IP addresses instead. Note that the IPv4 and IPv6
loopback addresses are implicitly added to this list if not specified. It's
usually recommended to set `ERL_EPMD_ADDRESS' to `127.0.0.1' (e.g., by calling
`systemctl edit eturnal' and adding the following line to the `[Service]'
section: `Environment="ERL_EPMD_ADDRESS=127.0.0.1"').
it's not running already, and {@section ERL_DIST_PORT} isn't specified). By
default, eturnal lets EPMD listen on `localhost'. Setting the `ERL_EPMD_ADDRESS'
environment variable tells EPMD to listen on the specified comma-seperated list
of IP addresses instead. Note that the IPv4 and IPv6 loopback addresses are
implicitly added to this list if not specified. Setting `ERL_EPMD_ADDRESS' to an
empty value lets EPMD listen on all interfaces.

=== ERL_EPMD_PORT ===

Expand Down

0 comments on commit 353039e

Please sign in to comment.