From bdc50ad703b311f1bec08b6c29b5451ca3457f59 Mon Sep 17 00:00:00 2001 From: Denis-Cosmin Nutiu Date: Mon, 13 Jun 2022 14:49:59 +0300 Subject: [PATCH] Redirect port 80 to 3000 for Grafana --- grafana/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grafana/install.sh b/grafana/install.sh index 1d7332f..fe866a4 100644 --- a/grafana/install.sh +++ b/grafana/install.sh @@ -1,10 +1,10 @@ wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add - echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list apt-get update -apt-get install -y grafana +apt-get install -y grafana iptables cp grafana.ini /etc/grafana/grafana.ini -iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3000 +iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3000 systemctl daemon-reload systemctl enable grafana-server