Testing IP whitelist

This commit is contained in:
albert 2025-02-28 10:54:03 -08:00
parent df915bf261
commit c21a76cca5
2 changed files with 19 additions and 20 deletions
nixos/hosts
frankfurt-linode-01
milan-linode-01

View file

@ -1,9 +1,4 @@
{ inputs, lib, modulesPath, hostname, ... }:
let
# ipOffice = "";
ipIfargle = "97.71.91.121";
ipSysctl = "172.185.76.221";
in {
{ inputs, lib, modulesPath, hostname, ... }: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
inputs.ip-whitelist.nixosModules.default
@ -14,18 +9,6 @@ in {
./wireguard.nix
];
# SSH Whitelist for certain IP's
networking.firewall.ipBasedAllowedTCPPorts = [
{
port = 22;
ips = [
# ipOffice
ipIfargle
ipSysctl
];
}
];
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];

View file

@ -1,4 +1,8 @@
{ hostname, lib, modulesPath, ... }: {
{ hostname, lib, modulesPath, ... }: let
# ipOffice = "";
ipIfargle = "97.71.91.121";
ipSysctl = "172.185.76.221";
in {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
(import ../../common/containers/derp.nix { domainName = "milan.sysctl.io"; })
@ -6,7 +10,19 @@
../../common/services/podman.nix
];
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
# SSH Whitelist for certain IP's
networking.firewall.ipBasedAllowedTCPPorts = [
{
port = 22;
ips = [
# ipOffice
ipIfargle
ipSysctl
];
}
];
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];