Configures IP-based access to firewall for dnsc-vps-sm
This commit is contained in:
parent
3c558f5411
commit
2292f2a60f
2 changed files with 20 additions and 5 deletions
|
|
@ -10,6 +10,7 @@
|
|||
./hardware-configuration.nix
|
||||
./networking.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.ip-whitelist.nixosModules.default
|
||||
];
|
||||
|
||||
# Secrets
|
||||
|
|
@ -44,11 +45,24 @@
|
|||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
|
||||
# Firewall
|
||||
networking.firewall.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
ipBasedAllowedTCPPorts = [
|
||||
{
|
||||
port = 22;
|
||||
ips = [
|
||||
"100.103.199.4"
|
||||
"100.115.100.87"
|
||||
"100.83.40.63"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
# My user account
|
||||
users.users.dennis = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue