From c3f141ae24382e06427d4ff98a3428f2c9d6ac0e Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Thu, 22 Feb 2024 13:33:11 +0100 Subject: [PATCH] remove PREROUTING rule first to prevent already existing rule error --- systems/LoutreOS/configuration.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/systems/LoutreOS/configuration.nix b/systems/LoutreOS/configuration.nix index 56c7864..b643360 100644 --- a/systems/LoutreOS/configuration.nix +++ b/systems/LoutreOS/configuration.nix @@ -118,6 +118,7 @@ # Redirect local network request from server external IP to internal IP # Make the server available even without internet access + iptables -t nat -D PREROUTING -s 10.30.0.0/16 -d 176.180.172.105 -j DNAT --to 10.30.0.1 || true iptables -t nat -A PREROUTING -s 10.30.0.0/16 -d 176.180.172.105 -j DNAT --to 10.30.0.1 ''; };