From 4d8c76e2078de847d154c24fe2166e219fb545e3 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Thu, 21 Nov 2024 11:32:35 +0100 Subject: [PATCH] Working outgoing emails --- systems/LoutreOS/network.nix | 39 ++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/systems/LoutreOS/network.nix b/systems/LoutreOS/network.nix index 7008094..7bab14d 100644 --- a/systems/LoutreOS/network.nix +++ b/systems/LoutreOS/network.nix @@ -227,17 +227,34 @@ "89.234.141.196/32" "2a00:5881:8119:400::1/128" ]; - #routingPolicyRules = [ - # # Route outgoing emails to VPN table - # { - # routingPolicyRuleConfig = { - # DestinationPort = "25"; - # Table = 3; - # Priority = 50; - # Family = "both"; - # }; - # } - #]; + routingPolicyRules = [ + # Route outgoing emails to VPN table + { + routingPolicyRuleConfig = { + IncomingInterface = "lo"; + DestinationPort = "25"; + Table = 3; + Priority = 50; + Family = "both"; + }; + } + # Route packets originating from wg0 device to VPN table + # Allow server to respond on the wg0 interface requests + { + routingPolicyRuleConfig = { + From = "89.234.141.196"; + Table = 3; + Priority = 49; + }; + } + { + routingPolicyRuleConfig = { + From = "2a00:5881:8119:400::1"; + Table = 3; + Priority = 49; + }; + } + ]; }; #######