Compare commits

..

2 Commits

Author SHA1 Message Date
e8e4c4b311 wireguard partial setup 2024-11-20 09:15:56 +01:00
67d7b6669f setup wireguard interface 2024-11-13 14:44:13 +01:00

View File

@ -142,16 +142,21 @@
netdevConfig = {
Kind = "wireguard";
Name = "wg0";
MTUBytes = "1450";
};
wireguardConfig = {
PrivateKeyFile = "/run/keys/wireguard-privkey";
ListenPort = 9918;
FirewallMark = 51820;
};
wireguardPeers = [
{
PublicKey = "OhApdFoOYnKesRVpnYRqwk3pdM247j8PPVH5K7aIKX0=";
AllowedIPs = ["fc00::1/64" "10.100.0.1"];
Endpoint = "{set this to the server ip}:51820";
wireguardPeerConfig = {
Endpoint = "89.234.141.83:8095";
PublicKey = "t3+JkBfXI1uw8fa9P6JfxXJfTPm9cOHcgIN215UHg2g=";
PresharedKeyFile = "/run/keys/wireguard-psk.key";
AllowedIPs = ["0.0.0.0/0" "::/0"];
PersistentKeepalive = 15;
};
}
];
};
@ -176,10 +181,45 @@
"10-wg0" = {
matchConfig.Name = "wg0";
address = [
"fe80::3/64"
"fc00::3/120"
"10.100.0.2/24"
"89.234.141.196/32"
"2a00:5881:8119:400::1/128"
];
# routingPolicyRules = [
# {
# routingPolicyRuleConfig = {
# FirewallMark = "51820";
# InvertRule = true;
# Table = "51820";
# Priority = "10";
# };
# }
# {
# routingPolicyRuleConfig = {
# To = "10.0.0.0/8";
# Priority = "9";
# };
# }
# {
# routingPolicyRuleConfig = {
# To = "192.168.0.0/16";
# Priority = "9";
# };
# }
# {
# routingPolicyRuleConfig = {
# To = "89.234.141.83/32";
# Priority = "5";
# };
# }
# ];
# routes = [
# {
# routeConfig = {
# Destination = "0.0.0.0/0";
# Table = 51820;
# };
# }
# ];
};
"40-eno2" = {
networkConfig = {