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

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

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
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews