Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Created November 15, 2015 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cleverca22/500beb0289824e0a634e to your computer and use it in GitHub Desktop.
Save cleverca22/500beb0289824e0a634e to your computer and use it in GitHub Desktop.
services = {
bind = {
enable = true;
cacheNetworks = [ "192.168.2.0/24" "127.0.0.0/8" ];
zones = [
{
name = "localnet";
slaves = [ ];
file = ./localnet;
}
{
name = "2.168.192.in-addr.arpa";
slaves = [ ];
file = ./lan.reverse;
}
];
};
dhcpd = {
interfaces = [ "${LAN}" ];
enable = true;
machines = [
{ hostName = "ramboot"; ethernetAddress = "00:1c:23:16:4b:b3"; ipAddress = "192.168.2.10"; }
{ hostName = "amd"; ethernetAddress = "40:16:7e:b3:32:48"; ipAddress = "192.168.2.15"; }
{ hostName = "nix1"; ethernetAddress = "92:C5:E2:BB:12:A9"; ipAddress = "192.168.2.30"; }
{ hostName = "nix2"; ethernetAddress = "5E:88:5B:D7:6E:BC"; ipAddress = "192.168.2.31"; }
];
extraConfig = ''
subnet 192.168.2.0 netmask 255.255.255.0 {
option domain-search "localnet";
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.2.255;
option routers 192.168.2.1;
option domain-name-servers 192.168.2.61;
range 192.168.2.100 192.168.2.200;
}
'';
};
};
$TTL 3D
@ IN SOA ns.localnet. hostmaster (
1 ; serial
8H ; refresh
2H ; retry
4W ; expire
1D) ; minimum ttl
NS ns.localnet.
router IN A 192.168.2.1
ns IN A 192.168.2.1
router IN AAAA fe80::230:48ff:fec5:d2df
amd IN A 192.168.2.15
amd IN AAAA fe80::4216:7eff:feb3:3248
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment