From b3c7cce8d995234938d1beae7b58734da4286f5b Mon Sep 17 00:00:00 2001 From: laanwj <126646+laanwj@users.noreply.github.com> Date: Tue, 12 Apr 2022 11:41:37 +0200 Subject: [PATCH] prometheus: Listen on 127.0.0.1 by default Make the prometheus plugin listen on 127.0.0.1 (localhost) by default instead of open to the world. This closes a privacy breach in the default configuration. --- prometheus/README.md | 4 ++-- prometheus/prometheus.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/prometheus/README.md b/prometheus/README.md index f86a83c..1ee7055 100644 --- a/prometheus/README.md +++ b/prometheus/README.md @@ -5,8 +5,8 @@ so it can be scraped, plotted and alerts can be created on it. The plugin adds the following command line arguments: - `prometheus-listen`: the IP address and port to bind the HTTP server to - (default: `0.0.0.0:9750`) - + (default: `127.0.0.1:9750`) + Exposed variables include: - `node`: ID, version, ... diff --git a/prometheus/prometheus.py b/prometheus/prometheus.py index 2e5a209..5c28b48 100755 --- a/prometheus/prometheus.py +++ b/prometheus/prometheus.py @@ -220,7 +220,7 @@ def init(options, configuration, plugin): plugin.add_option( 'prometheus-listen', - '0.0.0.0:9750', + '127.0.0.1:9750', 'Address and port to bind to' )