mmmrrr

mmmrrr

The title says it all:

I’d like to completely deactivate Erlang port mapper daemon for my application. Since it is running in a shared hosting setup, as far as I know, anyone could connect to it without any kind of authentication.

Also this particular application will never run in a clustered setup, so I think it is safe to say, that empd is not needed in this scenario.

Showing Posts 1 to 10

Nicd

Nicd

Mix release supports the environment variable RELEASE_DISTRIBUTION=none so using that when generating the release should disable distribution features. I don’t know if it avoids starting epmd but at least you shouldn’t be able to connect to the release.

I’m not a 100 % sure on these details so test before going into prod. Hoping someone wiser can chime in too.

Source: mix release — Mix v1.20.2

mmmrrr

mmmrrr OP

@Nicd just to be clear: This also means that it is entirely impossible to connect to the running system, right? So no introspection of the running system, even when connected directly to the machine the node runs on?

Nicd

Nicd

I think so, because AFAIK that connecting like remsh uses the distribution system. But you should try it and report. :slight_smile:

mmmrrr

mmmrrr OP

As soon as I have time on my hands again :slight_smile: thanks for clarifying

cmkarlsson

cmkarlsson

The article is a bit old but perhaps still valid?

al2o3cr

al2o3cr

Look into blocking the EPMD port at the interface (with iptables or equivalent new hotness); that way you can still SSH into the box and attach an IEx session like usual.

tristan

tristan

Rebar3 Core Team

First, you can have epmd and the node itself bind to 127.0.0.1 so it is inaccessible outside of the host.

Next, there is GitHub - tsloughter/epmdless: Distributed Erlang without the EPMD · GitHub which can be used to simplify running a node that you can get a remote connection to still locally but does not have epmd running.

Finally, OTP 23.1 will make this even simpler, removing the need for epmdless entirely in the case that you are fine with a static port being used for the Erlang node.

mmmrrr

mmmrrr OP

This looks great. Thanks for sharing!

And also thanks to all the others for chiming in. I’m planning on trying all solutions suggested here and to report back when that happened. Thanks for all the contributions!

mmmrrr

mmmrrr OP

Ah @al2o3cr think this is a misunderstanding: The release is running on a host where multiple users can connect to via ssh. iptables would not help me in the scenario, if I’m not mistaken, since everyone who can ssh into that server would be able to circumvent the firewall.

mmmrrr

mmmrrr OP

  1. RELEASE_MODE=none still starts epmd, unfortunately.
  2. As stated before, iptables won’t help due to the shared hosting environment.
  3. While epmdless is indeed working as advertised it has the same problem as 2. Other users could still connect to the running application just by inspecting the started process and reading the cookie from there (at least that’s my understanding)

@tristan is my understanding of epmdless correct here, or am I still missing something?

Thanks!


If a moderator strolls by: could you please fix the topic of this post to contain epmd instead of emdp? :man_facepalming:

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New
ChrisAmelia
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication): toke...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews