router: add static routes to opnsense to fix vpn issues

This commit is contained in:
Yuri Tatishchev 2025-04-15 10:35:18 -07:00
parent 9bbd0cfbdd
commit 9487d5bdea
Signed by: CaZzzer
SSH Key Fingerprint: SHA256:sqXB3fe0LMpfH+IeM/vlmxKdso52kssrIJBlwKXVe1U
3 changed files with 27 additions and 1 deletions

View File

@ -20,8 +20,9 @@ in
${ifs.lan40.name},
${ifs.lan50.name},
}
define OPNSENSE_NET6 = ${pdFromWan}d::/64
define OPNSENSE_NET6 = ${vars.extra.opnsense.net6}
define ZONE_LAN_EXTRA_NET6 = {
# TODO: reevaluate this statement
${ifs.lan20.net6}, # needed since packets can come in from wan on these addrs
$OPNSENSE_NET6,
}

View File

@ -150,6 +150,7 @@ in
ifs.lan40.name
ifs.lan50.name
];
routes = vars.extra.opnsense.routes;
};
"30-vlan10" = mkLanConfig ifs.lan10;
"30-vlan20" = mkLanConfig ifs.lan20;

View File

@ -95,4 +95,28 @@ rec {
ulaPrefix_ = "${ulaPrefix}:0050"; # ::/64
};
};
extra = {
opnsense = rec {
addr4 = "${ifs.lan.p4}.250";
ulaAddr = "${ifs.lan.ulaPrefix}::250";
p6 = "${pdFromWan}d";
net6 = "${p6}::/64";
# VPN routes on opnsense
routes = [
{
Destination = "10.6.0.0/24";
Gateway = addr4;
}
{
Destination = "10.18.0.0/20";
Gateway = addr4;
}
{
Destination = net6;
Gateway = ulaAddr;
}
];
};
};
}