aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-05-08 14:42:18 +0200
committerAlex Auvolat <alex@adnab.me>2022-05-08 14:42:18 +0200
commit83dd3ea25ac7ded159105e2501b438dac4e01e22 (patch)
treef53a75ac8c35133f090fddd20c9a1f1b44cf909c
parent397a3fdfa9d9f9fd279ca45dee592d1b0c157b69 (diff)
downloadnixcfg-83dd3ea25ac7ded159105e2501b438dac4e01e22.tar.gz
nixcfg-83dd3ea25ac7ded159105e2501b438dac4e01e22.zip
Update network configuration
-rw-r--r--cluster/prod/cluster.nix6
-rw-r--r--cluster/prod/site/neptune.nix4
-rw-r--r--cluster/prod/ssh_config9
-rw-r--r--cluster/staging/cluster.nix6
-rw-r--r--cluster/staging/site/neptune.nix4
-rw-r--r--cluster/staging/ssh_config9
-rw-r--r--nix/deuxfleurs.nix2
-rw-r--r--ssh_known_hosts6
8 files changed, 29 insertions, 17 deletions
diff --git a/cluster/prod/cluster.nix b/cluster/prod/cluster.nix
index ece401e..1bf4a7b 100644
--- a/cluster/prod/cluster.nix
+++ b/cluster/prod/cluster.nix
@@ -5,9 +5,9 @@
# Bootstrap nodes for Wesher overlay network
services.wesher.join = [
- "2a01:e0a:c:a720::31" # concombre
- "2a01:e0a:c:a720::32" # courgette
- "2a01:e0a:c:a720::33" # celeri
+ "192.168.1.31" # concombre
+ "192.168.1.32" # courgette
+ "192.168.1.33" # celeri
];
# The IP range to use for the Wesher overlay of this cluster
diff --git a/cluster/prod/site/neptune.nix b/cluster/prod/site/neptune.nix
index 6e69b18..3770c2f 100644
--- a/cluster/prod/site/neptune.nix
+++ b/cluster/prod/site/neptune.nix
@@ -2,11 +2,11 @@
{
deuxfleurs.site_name = "neptune";
- deuxfleurs.lan_default_gateway = "192.168.1.254";
+ deuxfleurs.lan_default_gateway = "192.168.1.1";
deuxfleurs.lan_ip_prefix_length = 24;
deuxfleurs.ipv6_prefix_length = 64;
- networking.nameservers = [ "192.168.1.254" ];
+ networking.nameservers = [ "192.168.1.1" ];
networking.firewall.allowedTCPPorts = [ 80 443 ];
}
diff --git a/cluster/prod/ssh_config b/cluster/prod/ssh_config
index cb4841f..d05e5c6 100644
--- a/cluster/prod/ssh_config
+++ b/cluster/prod/ssh_config
@@ -1,10 +1,13 @@
UserKnownHostsFile ./ssh_known_hosts
Host concombre
- HostName 2a01:e0a:c:a720::31
+ #HostName 2a01:e0a:c:a720::31
+ HostName 192.168.1.31
Host courgette
- HostName 2a01:e0a:c:a720::32
+ #HostName 2a01:e0a:c:a720::32
+ HostName 192.168.1.32
Host celeri
- HostName 2a01:e0a:c:a720::33
+ #HostName 2a01:e0a:c:a720::33
+ HostName 192.168.1.33
diff --git a/cluster/staging/cluster.nix b/cluster/staging/cluster.nix
index 2ad79bf..0836dcb 100644
--- a/cluster/staging/cluster.nix
+++ b/cluster/staging/cluster.nix
@@ -5,9 +5,9 @@
# Bootstrap nodes for Wesher overlay network
services.wesher.join = [
- "2a01:e0a:c:a720::21" # cariacou
- "2a01:e0a:c:a720::22" # carcajou
- "2a01:e0a:c:a720::23" # caribou
+ "192.168.1.21" # cariacou
+ "192.168.1.22" # carcajou
+ "192.168.1.23" # caribou
];
# The IP range to use for the Wesher overlay of this cluster
diff --git a/cluster/staging/site/neptune.nix b/cluster/staging/site/neptune.nix
index 38a4bab..034c634 100644
--- a/cluster/staging/site/neptune.nix
+++ b/cluster/staging/site/neptune.nix
@@ -2,11 +2,11 @@
{
deuxfleurs.site_name = "neptune";
- deuxfleurs.lan_default_gateway = "192.168.1.254";
+ deuxfleurs.lan_default_gateway = "192.168.1.1";
deuxfleurs.lan_ip_prefix_length = 24;
deuxfleurs.ipv6_prefix_length = 64;
- networking.nameservers = [ "192.168.1.254" ];
+ networking.nameservers = [ "192.168.1.1" ];
networking.firewall.allowedTCPPorts = [ 80 443 ];
diff --git a/cluster/staging/ssh_config b/cluster/staging/ssh_config
index 9bc4e6e..3360725 100644
--- a/cluster/staging/ssh_config
+++ b/cluster/staging/ssh_config
@@ -1,13 +1,16 @@
UserKnownHostsFile ./ssh_known_hosts
Host caribou
- HostName 2a01:e0a:c:a720::23
+ #HostName 2a01:e0a:c:a720::23
+ HostName 192.168.1.23
Host carcajou
- HostName 2a01:e0a:c:a720::22
+ #HostName 2a01:e0a:c:a720::22
+ HostName 192.168.1.22
Host cariacou
- HostName 2a01:e0a:c:a720::21
+ #HostName 2a01:e0a:c:a720::21
+ HostName 192.168.1.21
Host spoutnik
HostName 10.42.0.2
diff --git a/nix/deuxfleurs.nix b/nix/deuxfleurs.nix
index 2050776..09ba526 100644
--- a/nix/deuxfleurs.nix
+++ b/nix/deuxfleurs.nix
@@ -104,7 +104,7 @@ in
# wesher overlay network
services.wesher = {
enable = true;
- bindAddr = cfg.ipv6;
+ bindIface = cfg.network_interface;
overlayNet = "${cfg.wesher_cluster_prefix}/${toString cfg.wesher_cluster_prefix_length}";
interface = "wg0";
logLevel = "debug";
diff --git a/ssh_known_hosts b/ssh_known_hosts
index 6d003c9..8150174 100644
--- a/ssh_known_hosts
+++ b/ssh_known_hosts
@@ -12,3 +12,9 @@
2a01:e0a:c:a720::33 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOuY1CvhxBP9BtKkTlmOUu6Hhy8OQTB3R8OCFXbHA/RA
2a01:e0a:c:a720::31 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL3N0QOFNGkCpVLuOHFdpnBaxIFH925KpdIHV/3F9+BR
2a01:e0a:c:a720::32 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPCXJeo6yeQeTN7D7OZwLd8zbyU1jWywlhQ29yyk7x+G
+192.168.1.22 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMf/ioVSSb19Slu+HZLgKt4f1/XsL+K9uMxazSWb/+nQ
+192.168.1.21 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPXTUrXRFhudJBESCqjHCOttzqYPyIzpPOMkI8+SwLRx
+192.168.1.23 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDsYD1gNmGyb6c9wjGR6tC69fHP6+FpPHTBT6laPTHeD
+192.168.1.33 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOuY1CvhxBP9BtKkTlmOUu6Hhy8OQTB3R8OCFXbHA/RA
+192.168.1.31 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL3N0QOFNGkCpVLuOHFdpnBaxIFH925KpdIHV/3F9+BR
+192.168.1.32 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPCXJeo6yeQeTN7D7OZwLd8zbyU1jWywlhQ29yyk7x+G