servo: port ANATIVE over the doof interface to return the doof IP address
This commit is contained in:
parent
72b8211029
commit
50353280d3
|
@ -39,6 +39,7 @@ in
|
||||||
CNAME."native" = "%CNAMENATIVE%";
|
CNAME."native" = "%CNAMENATIVE%";
|
||||||
A."@" = "%ANATIVE%";
|
A."@" = "%ANATIVE%";
|
||||||
A."servo.wan" = "%AWAN%";
|
A."servo.wan" = "%AWAN%";
|
||||||
|
A."servo.doof" = "%ADOOF%";
|
||||||
A."servo.lan" = config.sane.hosts.by-name."servo".lan-ip;
|
A."servo.lan" = config.sane.hosts.by-name."servo".lan-ip;
|
||||||
A."servo.hn" = config.sane.hosts.by-name."servo".wg-home.ip;
|
A."servo.hn" = config.sane.hosts.by-name."servo".wg-home.ip;
|
||||||
|
|
||||||
|
@ -87,31 +88,34 @@ in
|
||||||
sane.services.trust-dns.enable = true;
|
sane.services.trust-dns.enable = true;
|
||||||
sane.services.trust-dns.instances = let
|
sane.services.trust-dns.instances = let
|
||||||
mkSubstitutions = flavor: {
|
mkSubstitutions = flavor: {
|
||||||
|
"%ADOOF%" = config.sane.netns.doof.netnsPubIpv4;
|
||||||
|
"%ANATIVE%" = nativeAddrs."servo.${flavor}";
|
||||||
|
"%AOVPNS%" = config.sane.netns.ovpns.netnsPubIpv4;
|
||||||
"%AWAN%" = "$(cat '${dyn-dns.ipPath}')";
|
"%AWAN%" = "$(cat '${dyn-dns.ipPath}')";
|
||||||
"%CNAMENATIVE%" = "servo.${flavor}";
|
"%CNAMENATIVE%" = "servo.${flavor}";
|
||||||
"%ANATIVE%" = nativeAddrs."servo.${flavor}";
|
|
||||||
"%ADOOF%" = config.sane.netns.doof.netnsPubIpv4;
|
|
||||||
"%AOVPNS%" = config.sane.netns.ovpns.netnsPubIpv4;
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
wan = {
|
doof = {
|
||||||
substitutions = mkSubstitutions "wan";
|
substitutions = mkSubstitutions "doof";
|
||||||
listenAddrsIpv4 = [
|
listenAddrsIpv4 = [ config.sane.netns.doof.hostVethIpv4 ];
|
||||||
nativeAddrs."servo.lan"
|
};
|
||||||
config.sane.netns.ovpns.hostVethIpv4
|
hn = {
|
||||||
config.sane.netns.doof.hostVethIpv4
|
substitutions = mkSubstitutions "hn";
|
||||||
];
|
listenAddrsIpv4 = [ nativeAddrs."servo.hn" ];
|
||||||
|
port = 1053;
|
||||||
};
|
};
|
||||||
lan = {
|
lan = {
|
||||||
substitutions = mkSubstitutions "lan";
|
substitutions = mkSubstitutions "lan";
|
||||||
listenAddrsIpv4 = [ nativeAddrs."servo.lan" ];
|
listenAddrsIpv4 = [ nativeAddrs."servo.lan" ];
|
||||||
port = 1053;
|
port = 1053;
|
||||||
};
|
};
|
||||||
hn = {
|
wan = {
|
||||||
substitutions = mkSubstitutions "hn";
|
substitutions = mkSubstitutions "wan";
|
||||||
listenAddrsIpv4 = [ nativeAddrs."servo.hn" ];
|
listenAddrsIpv4 = [
|
||||||
port = 1053;
|
nativeAddrs."servo.lan"
|
||||||
|
config.sane.netns.ovpns.hostVethIpv4
|
||||||
|
];
|
||||||
};
|
};
|
||||||
# hn-resolver = {
|
# hn-resolver = {
|
||||||
# # don't need %AWAN% here because we forward to the hn instance.
|
# # don't need %AWAN% here because we forward to the hn instance.
|
||||||
|
@ -153,9 +157,10 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
sane.services.dyn-dns.restartOnChange = [
|
sane.services.dyn-dns.restartOnChange = [
|
||||||
"trust-dns-wan.service"
|
"trust-dns-doof.service"
|
||||||
"trust-dns-lan.service"
|
|
||||||
"trust-dns-hn.service"
|
"trust-dns-hn.service"
|
||||||
|
"trust-dns-lan.service"
|
||||||
|
"trust-dns-wan.service"
|
||||||
# "trust-dns-hn-resolver.service" # doesn't need restart because it doesn't know about WAN IP
|
# "trust-dns-hn-resolver.service" # doesn't need restart because it doesn't know about WAN IP
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user