add initial fw configs
This commit is contained in:
45
hosts/fw.cloonar.com/modules/dhcp4.nix
Normal file
45
hosts/fw.cloonar.com/modules/dhcp4.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
{ ... }: {
|
||||
services.dhcpd4 = {
|
||||
enable = true;
|
||||
interfaces = [ "lan" "server" "smart" "multimedia" "guest" ];
|
||||
extraConfig = ''
|
||||
option domain-name-servers 10.42.97.1, 9.9.9.9;
|
||||
option subnet-mask 255.255.255.0;
|
||||
|
||||
subnet 10.42.96.0 netmask 255.255.255.0 {
|
||||
option broadcast-address 10.42.96.255;
|
||||
option routers 10.42.97.1;
|
||||
interface lan;
|
||||
range 10.42.96.128 10.42.96.254;
|
||||
}
|
||||
|
||||
subnet 10.42.97.0 netmask 255.255.255.0 {
|
||||
option broadcast-address 10.42.97.255;
|
||||
option routers 10.42.97.1;
|
||||
interface server;
|
||||
range 10.42.96.128 10.42.97.254;
|
||||
}
|
||||
|
||||
subnet 10.42.99.0 netmask 255.255.255.0 {
|
||||
option broadcast-address 10.42.99.255;
|
||||
option routers 10.42.99.1;
|
||||
interface multimedia;
|
||||
range 10.42.99.128 10.42.99.254;
|
||||
}
|
||||
|
||||
subnet 10.42.100.0 netmask 255.255.255.0 {
|
||||
option broadcast-address 10.42.100.255;
|
||||
option routers 10.42.100.1;
|
||||
interface smart;
|
||||
range 10.42.100.128 10.42.100.254;
|
||||
}
|
||||
|
||||
subnet 10.42.254.0 netmask 255.255.255.0 {
|
||||
option broadcast-address 10.42.254.255;
|
||||
option routers 10.42.254.1;
|
||||
interface guest;
|
||||
range 10.42.100.128 10.42.254.254;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user