dns: switch over to systemd for the host
this changes unbound to listen to 127.0.0.150 (150 is roman CL) we cannot only bind on docker bridge because unbound is relied upon for the initial domain setup. docker itself is only initialized when the platform initializes
This commit is contained in:
+2
-2
@@ -81,7 +81,7 @@ async function verifyDomainConfig(domainObject) {
|
||||
|
||||
const ipv4 = await network.getIPv4();
|
||||
if (ipv4) {
|
||||
const [ipv4Error, ipv4Result] = await safe(dig.resolve(fqdn, 'A', { server: '127.0.0.1', timeout: 5000 }));
|
||||
const [ipv4Error, ipv4Result] = await safe(dig.resolve(fqdn, 'A', { timeout: 5000 }));
|
||||
if (ipv4Error && (ipv4Error.code === 'ENOTFOUND' || ipv4Error.code === 'ENODATA')) throw new BoxError(BoxError.BAD_FIELD, `Unable to resolve IPv4 of ${fqdn}. Please check if you have set up *.${domainObject.domain} to point to this server's IP`);
|
||||
if (ipv4Error) throw new BoxError(BoxError.BAD_FIELD, `Unable to resolve IPv4 of ${fqdn}: ${ipv4Error.message}`);
|
||||
if (!ipv4Result) throw new BoxError(BoxError.BAD_FIELD, `Unable to resolve IPv4 of ${fqdn}`);
|
||||
@@ -91,7 +91,7 @@ async function verifyDomainConfig(domainObject) {
|
||||
|
||||
const ipv6 = await network.getIPv6(); // both should be RFC 5952 format
|
||||
if (ipv6) {
|
||||
const [ipv6Error, ipv6Result] = await safe(dig.resolve(fqdn, 'AAAA', { server: '127.0.0.1', timeout: 5000 }));
|
||||
const [ipv6Error, ipv6Result] = await safe(dig.resolve(fqdn, 'AAAA', { timeout: 5000 }));
|
||||
if (ipv6Error && (ipv6Error.code === 'ENOTFOUND' || ipv6Error.code === 'ENODATA')) throw new BoxError(BoxError.BAD_FIELD, `Unable to resolve IPv6 of ${fqdn}`);
|
||||
if (ipv6Error) throw new BoxError(BoxError.BAD_FIELD, `Unable to resolve IPv6 of ${fqdn}: ${ipv6Error.message}`);
|
||||
if (!ipv6Result) throw new BoxError(BoxError.BAD_FIELD, `Unable to resolve IPv6 of ${fqdn}`);
|
||||
|
||||
Reference in New Issue
Block a user