Don't listen Erlang Port Mapper Daemon (4369/tcp) on 0.0.0.0
authorr3g_5z <june@girlboss.ceo>
Sat, 10 Dec 2022 02:36:21 +0000 (21:36 -0500)
committerr3g_5z <june@girlboss.ceo>
Sat, 10 Dec 2022 02:36:21 +0000 (21:36 -0500)
Signed-off-by: r3g_5z <june@girlboss.ceo>
Dockerfile
docker-resources/env.example
installation/akkoma.service
installation/akkoma.supervisord
installation/freebsd/rc.d/akkoma
installation/init.d/akkoma
installation/netbsd/rc.d/akkoma

index 6ba7a226956a4e540e7dcd43bc9442f1af873abb..0551a4c9ea160d17da5cbf7e19bab3aed75d2da3 100644 (file)
@@ -1,6 +1,7 @@
 FROM hexpm/elixir:1.13.4-erlang-24.3.4.5-alpine-3.15.6
 
 ENV MIX_ENV=prod
+ENV ERL_EPMD_ADDRESS=127.0.0.1
 
 ARG HOME=/opt/akkoma
 
index d6cf0c7b8edcd6cf8d5931eb98746756283d288c..23ca1522193b9db6c2a258b53d9a0f9a9c20c609 100644 (file)
@@ -1,4 +1,5 @@
 MIX_ENV=prod
+ERL_EPMD_ADDRESS=127.0.0.1
 DB_NAME=akkoma
 DB_USER=akkoma
 DB_PASS=akkoma
index f5865a91a0918dee7e3e53f23beecf3cce5acd2f..3d7c062ff27d6614c7765a3a2be16fb171d1b929 100644 (file)
@@ -14,6 +14,9 @@ User=akkoma
 ; Declares that Akkoma runs in production mode.
 Environment="MIX_ENV=prod"
 
+; Don't listen epmd on 0.0.0.0
+Environment="ERL_EPMD_ADDRESS=127.0.0.1"
+
 ; Make sure that all paths fit your installation.
 ; Path to the home directory of the user running the Akkoma service.
 Environment="HOME=/var/lib/akkoma"
index 8fd5e8d42b8533c12632998db41ce34bf28daf1b..1e0ee97446f6107b0f30de00447bf489d30e2a0b 100644 (file)
@@ -12,7 +12,8 @@ environment =
   HOME=/home/akkoma,
   USER=akkoma,
   PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/akkoma/bin:%(ENV_PATH)s",
-  PWD=/home/akkoma/akkoma
+  PWD=/home/akkoma/akkoma,
+  ERL_EPMD_ADDRESS=127.0.0.1
 stdout_logfile=/home/akkoma/logs/stdout.log
 stdout_logfile_maxbytes=50MB
 stdout_logfile_backups=10
index 38186522b1fb3629415f600f2a78c398d0138f99..e87c26b57835bf395a58c6d64c4baff0052a56d1 100755 (executable)
@@ -18,7 +18,8 @@ load_rc_config ${name}
 : ${akkoma_user:=akkoma}
 : ${akkoma_home:=$(getent passwd ${akkoma_user} | awk -F: '{print $6}')}
 : ${akkoma_chdir:="${akkoma_home}/akkoma"}
-: ${akkoma_env:="HOME=${akkoma_home} MIX_ENV=prod"}
+: ${akkoma_env:="HOME=${akkoma_home} MIX_ENV=prod ERL_EPMD_ADDRESS=127.0.0.1"}
+
 
 command=/usr/local/bin/elixir
 command_args="--erl \"-detached\" -S /usr/local/bin/mix phx.server"
index bf70c34fbcc3eeeb907a38564200ca8189672c5c..6c1973db4dfe9114d1d93924574cc7ecb39abc18 100755 (executable)
@@ -31,6 +31,7 @@ else
 fi
 
 export MIX_ENV=prod
+export ERL_EPMD_ADDRESS=127.0.0.1
 
 depend() {
        need nginx postgresql
index 7b80bc414c786b22d5b5286aa9aea842cc76d1ea..6dfe80f4a2c17db74004c736c56def3c4f6e5f90 100755 (executable)
@@ -14,7 +14,7 @@ start_precmd="ulimit -n unlimited"
 pidfile="/dev/null"
 
 akkoma_chdir="${akkoma_home}/akkoma"
-akkoma_env="HOME=${akkoma_home} MIX_ENV=prod"
+akkoma_env="HOME=${akkoma_home} MIX_ENV=prod ERL_EPMD_ADDRESS=127.0.0.1"
 
 check_pidfile()
 {