depot/hosts/VEGAS/services/backbone-routing/default.nix

29 lines
491 B
Nix
Raw Permalink Normal View History

{ config, hosts, ... }:
let
inherit (hosts.${config.networking.hostName}) interfaces;
in
{
imports = [
./port-forward.nix
./peering.nix
];
networking.nat = {
enable = true;
externalInterface = interfaces.primary.link;
internalIPs = [
"10.10.0.0/16"
];
};
networking.interfaces.${interfaces.vstub.link} = {
virtual = true;
ipv4.addresses = [
{
address = interfaces.vstub.addr;
prefixLength = 32;
}
];
};
}