Rebase and add intl interface to exceptions
Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
parent
e7570aa4ce
commit
4d7e836f07
|
@ -92,7 +92,7 @@ in
|
||||||
firewall = {
|
firewall = {
|
||||||
allowedTCPPorts = [ 53 80 443 2222 7402 ];
|
allowedTCPPorts = [ 53 80 443 2222 7402 ];
|
||||||
allowedUDPPorts = [ 53 67 500 4500 ];
|
allowedUDPPorts = [ 53 67 500 4500 ];
|
||||||
trustedInterfaces = [ netifLan ];
|
trustedInterfaces = [ netifLan netifUSA ];
|
||||||
logRefusedConnections = false;
|
logRefusedConnections = false;
|
||||||
};
|
};
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
|
@ -252,29 +252,6 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
greTunnels.intl0 = {
|
|
||||||
dev = netifWan;
|
|
||||||
remote = "5.78.86.156";
|
|
||||||
local = "94.190.212.123";
|
|
||||||
ttl = 255;
|
|
||||||
type = "tun";
|
|
||||||
};
|
|
||||||
interfaces.intl0 = {
|
|
||||||
ipv4.addresses = [
|
|
||||||
{
|
|
||||||
address = "10.47.3.1";
|
|
||||||
prefixLength = 31;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
ipv4.routes = [
|
|
||||||
{
|
|
||||||
address = "0.0.0.0";
|
|
||||||
prefixLength = 0;
|
|
||||||
via = "10.47.3.0";
|
|
||||||
options.table = "3";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
vlans = {
|
vlans = {
|
||||||
"${netifAltVlan}" = {
|
"${netifAltVlan}" = {
|
||||||
id = 2;
|
id = 2;
|
||||||
|
@ -343,27 +320,6 @@ in
|
||||||
start_action = "start";
|
start_action = "start";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.strongswan-swanctl.swanctl.connections.intl = {
|
|
||||||
local_addrs = [ "94.190.212.123" ];
|
|
||||||
remote_addrs = [ "5.78.86.156" ];
|
|
||||||
local.main = {
|
|
||||||
auth = "pubkey";
|
|
||||||
id = "fqdn:m-labs.hk";
|
|
||||||
pubkeys = [ "/etc/swanctl/pubkey/m-labs.hk" ];
|
|
||||||
};
|
|
||||||
remote.main = {
|
|
||||||
auth = "pubkey";
|
|
||||||
id = "fqdn:m-labs-intl.com";
|
|
||||||
pubkeys = [ "/etc/swanctl/pubkey/m-labs-intl.com" ];
|
|
||||||
};
|
|
||||||
children.intl0 = {
|
|
||||||
mode = "transport";
|
|
||||||
ah_proposals = [ "sha256-curve25519" ];
|
|
||||||
remote_ts = [ "5.78.86.156[gre]" ];
|
|
||||||
local_ts = [ "94.190.212.123[gre]" ];
|
|
||||||
start_action = "start";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.network-custom-route-backup = {
|
systemd.services.network-custom-route-backup = {
|
||||||
wantedBy = [ "network.target" ];
|
wantedBy = [ "network.target" ];
|
||||||
|
@ -392,15 +348,6 @@ in
|
||||||
ExecStop = "${pkgs.iproute2}/bin/ip rule del table 1";
|
ExecStop = "${pkgs.iproute2}/bin/ip rule del table 1";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.services.network-custom-route-intl = {
|
|
||||||
wantedBy = [ "network.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
RemainAfterExit = true;
|
|
||||||
ExecStart = "${pkgs.iproute2}/bin/ip rule add from 10.47.3.0/31 table 3";
|
|
||||||
ExecStop = "${pkgs.iproute2}/bin/ip rule del table 3";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# https://kb.isc.org/docs/dnssec-key-and-signing-policy
|
# https://kb.isc.org/docs/dnssec-key-and-signing-policy
|
||||||
# chown named.named /etc/nixos/named
|
# chown named.named /etc/nixos/named
|
||||||
|
|
Loading…
Reference in New Issue