rico0: add dns for local hosts

This commit is contained in:
Adithya 2024-08-11 20:07:28 +05:30
parent 8969d408c6
commit a747dbf8ec
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
2 changed files with 39 additions and 5 deletions

View file

@ -50,6 +50,14 @@ _: {
customTTL = "1h"; customTTL = "1h";
filterUnmappedTypes = true; filterUnmappedTypes = true;
mapping = { mapping = {
"gateway.local.adtya.xyz" = "192.168.0.1";
"ap1.local.adtya.xyz" = "192.168.1.1";
"ap2.local.adtya.xyz" = "192.168.1.2";
"switch.local.adtya.xyz" = "192.168.1.3";
"gateway.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10";
"ap1.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10";
"ap2.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10";
"switch.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10";
"proxy.labs.adtya.xyz" = "10.10.10.1,fd7c:585c:c4ae::1"; "proxy.labs.adtya.xyz" = "10.10.10.1,fd7c:585c:c4ae::1";
"skipper.labs.adtya.xyz" = "10.10.10.2,fd7c:585c:c4ae::2"; "skipper.labs.adtya.xyz" = "10.10.10.2,fd7c:585c:c4ae::2";
"rico0.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10"; "rico0.labs.adtya.xyz" = "10.10.10.10,fd7c:585c:c4ae::10";

View file

@ -8,11 +8,37 @@ _: {
]; ];
services.caddy = { services.caddy = {
virtualHosts."frp.labs.adtya.xyz" = { virtualHosts = {
"gateway.labs.adtya.xyz" = {
extraConfig = ''
reverse_proxy 192.168.0.1:80
tls /persist/secrets/caddy/certs/default.crt /persist/secrets/caddy/certs/default.key
'';
};
"ap1.labs.adtya.xyz" = {
extraConfig = ''
reverse_proxy 192.168.1.1:80
tls /persist/secrets/caddy/certs/default.crt /persist/secrets/caddy/certs/default.key
'';
};
"ap2.labs.adtya.xyz" = {
extraConfig = ''
reverse_proxy 192.168.1.2:80
tls /persist/secrets/caddy/certs/default.crt /persist/secrets/caddy/certs/default.key
'';
};
"switch.labs.adtya.xyz" = {
extraConfig = ''
reverse_proxy 192.168.1.3:80
tls /persist/secrets/caddy/certs/default.crt /persist/secrets/caddy/certs/default.key
'';
};
"frp.labs.adtya.xyz" = {
extraConfig = '' extraConfig = ''
reverse_proxy 10.10.10.1:7500 reverse_proxy 10.10.10.1:7500
tls /persist/secrets/caddy/certs/default.crt /persist/secrets/caddy/certs/default.key tls /persist/secrets/caddy/certs/default.crt /persist/secrets/caddy/certs/default.key
''; '';
}; };
}; };
};
} }