Set up DynDNS

This commit is contained in:
2019-11-06 23:04:16 +01:00
parent 72d77e44f5
commit 140676179e
3 changed files with 52 additions and 10 deletions

40
modules/networking.nix Normal file
View File

@@ -0,0 +1,40 @@
{ config, pkgs, lib, ... }:
{
environment.systemPackages = with pkgs; [
ddclient
];
# Dynamic DNS configuration
services.ddclient = {
enable = true;
quiet = true;
use = "cmd, cmd='/run/current-system/sw/bin/curl https://checkipv4.dedyn.io/'";
server = "update.dedyn.io";
extraConfig = "
login=coolneng.dedyn.io\n
password='5320e326cf0564e10703e16ef38644da161f195a'\n
coolneng.dedyn.io\n
\n
login=rehiwi.dedyn.io\n
password='b05f777b8ca7193f5054a308c3cf396e73c2fb69'\n
rehiwi.dedyn.io\n
\n
login=nujabes.dedyn.io\n
password='IVstfQqFT8mDT9-CXsVS-nbv36rY'\n
nujabes.dedyn.io\n
\n
login=methyl.dedyn.io\n
password='vQ0S5dSWCwsO4LUSlVWqkZ2LDYD8'\n
methyl.dedyn.io\n
";
};
# Firewall configuration
networking.firewall = {
allowedTCPPorts = [ 631 6566 ];
autoLoadConntrackHelpers = true;
connectionTrackingModules = [ "sane" ];
};
}