nixos-module/container/wireguard: brind back wireguardMark

This commit is contained in:
Astro 2022-09-18 16:23:18 +02:00
parent 5eb915e4f6
commit a5e3abfca6
1 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,7 @@ let
privateKeyFile = ifName:
"/run/wireguard-keys/${ifName}.key";
wireguardMark = 3;
vpnTable = 100;
in
{
@ -50,6 +51,7 @@ in
};
wireguardConfig = {
PrivateKeyFile = privateKeyFile ifName;
FirewallMark = wireguardMark;
RouteTable = "vpn";
};
wireguardPeers = [ {
@ -67,6 +69,7 @@ in
core.routingPolicyRules = [ {
# Marked wireguard packets take the vpn routing table
routingPolicyRuleConfig = {
FirewallMark = wireguardMark;
Table = vpnTable;
};
} ];