strongswan-swanctl: fix test
This commit is contained in:
parent
592a89befc
commit
ee95cb8169
|
@ -19,12 +19,12 @@
|
||||||
import ./make-test.nix ({ pkgs, ...} :
|
import ./make-test.nix ({ pkgs, ...} :
|
||||||
|
|
||||||
let
|
let
|
||||||
ifAddr = node: iface: (pkgs.lib.head node.config.networking.interfaces.${iface}.ip4).address;
|
|
||||||
|
|
||||||
allowESP = "iptables --insert INPUT --protocol ESP --jump ACCEPT";
|
allowESP = "iptables --insert INPUT --protocol ESP --jump ACCEPT";
|
||||||
|
|
||||||
# Shared VPN settings:
|
# Shared VPN settings:
|
||||||
vlan0 = "192.168.0.0/24";
|
vlan0 = "192.168.0.0/24";
|
||||||
|
carolIp = "192.168.1.2";
|
||||||
|
moonIp = "192.168.1.3";
|
||||||
version = 2;
|
version = 2;
|
||||||
secret = "0sFpZAZqEN6Ti9sqt4ZP5EWcqx";
|
secret = "0sFpZAZqEN6Ti9sqt4ZP5EWcqx";
|
||||||
esp_proposals = [ "aes128gcm128-x25519" ];
|
esp_proposals = [ "aes128gcm128-x25519" ];
|
||||||
|
@ -38,15 +38,12 @@ in {
|
||||||
virtualisation.vlans = [ 0 ];
|
virtualisation.vlans = [ 0 ];
|
||||||
networking = {
|
networking = {
|
||||||
dhcpcd.enable = false;
|
dhcpcd.enable = false;
|
||||||
defaultGateway = ifAddr nodes.moon "eth1";
|
defaultGateway = "192.168.0.3";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
moon = {pkgs, config, nodes, ...} :
|
moon = {pkgs, config, nodes, ...} :
|
||||||
let
|
let strongswan = config.services.strongswan-swanctl.package;
|
||||||
carolIp = ifAddr nodes.carol "eth1";
|
|
||||||
moonIp = ifAddr nodes.moon "eth2";
|
|
||||||
strongswan = config.services.strongswan-swanctl.package;
|
|
||||||
in {
|
in {
|
||||||
virtualisation.vlans = [ 0 1 ];
|
virtualisation.vlans = [ 0 1 ];
|
||||||
networking = {
|
networking = {
|
||||||
|
@ -98,10 +95,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
carol = {pkgs, config, nodes, ...} :
|
carol = {pkgs, config, nodes, ...} :
|
||||||
let
|
let strongswan = config.services.strongswan-swanctl.package;
|
||||||
carolIp = ifAddr nodes.carol "eth1";
|
|
||||||
moonIp = ifAddr nodes.moon "eth2";
|
|
||||||
strongswan = config.services.strongswan-swanctl.package;
|
|
||||||
in {
|
in {
|
||||||
virtualisation.vlans = [ 1 ];
|
virtualisation.vlans = [ 1 ];
|
||||||
networking = {
|
networking = {
|
||||||
|
|
Loading…
Reference in a new issue