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; + }; + } + ]; }; #######