mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
dnsmasq
This commit is contained in:
parent
fb0bc5666a
commit
a36841f12f
2 changed files with 18 additions and 14 deletions
|
|
@ -94,20 +94,7 @@ in
|
|||
enable = true;
|
||||
allowedTCPPorts = [ 22 80 443 ];
|
||||
};
|
||||
nameservers = [ "127.0.0.1" ];
|
||||
};
|
||||
|
||||
services.dnsmasq = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# Only specific subdomains go to local server
|
||||
address = [
|
||||
"/git.ramos.codes/192.168.0.154"
|
||||
"/frigate.ramos.codes/192.168.0.154"
|
||||
"/test.ramos.codes/192.168.0.154"
|
||||
];
|
||||
server = [ "1.1.1.1" "8.8.8.8" ];
|
||||
};
|
||||
nameservers = [ "192.168.0.154" ];
|
||||
};
|
||||
|
||||
services = {
|
||||
|
|
|
|||
|
|
@ -109,6 +109,23 @@
|
|||
};
|
||||
};
|
||||
|
||||
services.dnsmasq = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# All *.ramos.codes subdomains -> local server
|
||||
address = "/.ramos.codes/192.168.0.154";
|
||||
# Except www -> forward to upstream
|
||||
server = [
|
||||
"/www.ramos.codes/1.1.1.1"
|
||||
"1.1.1.1"
|
||||
"8.8.8.8"
|
||||
];
|
||||
cache-size = 1000;
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedUDPPorts = [ 53 ];
|
||||
|
||||
services.fail2ban = {
|
||||
enable = true;
|
||||
maxretry = 5;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue