NSD install step breaks internet connection if behind security gateway

I’ve encountered an issue with installation where the NSD install step causes internet connectivity to be lost when a security gateway is present.

Setup is as follows:

Internet -> Security Gateway -> Mail in a box host

Ubuntu 18.04.5 LTS server was installed on a dedicated box behind a security gateway, all ports were open at the time of install so for all intents and purposes the gateway was not blocking any port.

DHCP enabled, confirmed internet connectivity was active at time of install.

When NSD install step is reached the following occurs:

Installing nsd (DNS server)...

FAILED: apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew install nsd ldnsutils openssh-client
Reading package lists...
Building dependency tree...
Reading state information...
openssh-client is already the newest version (1:7.6p1-4ubuntu0.3).
The following NEW packages will be installed:
  ldnsutils libldns2 nsd
0 upgraded, 3 newly installed, 0 to remove and 5 not upgraded.
Need to get 1,010 kB of archives.
After this operation, 3,153 kB of additional disk space will be used.
Err:1 http://au.archive.ubuntu.com/ubuntu bionic/universe amd64 nsd amd64 4.1.17-1build1
  Temporary failure resolving 'au.archive.ubuntu.com'
Err:2 http://au.archive.ubuntu.com/ubuntu bionic/main amd64 libldns2 amd64 1.7.0-3ubuntu4
  Temporary failure resolving 'au.archive.ubuntu.com'
Err:3 http://au.archive.ubuntu.com/ubuntu bionic/universe amd64 ldnsutils amd64 1.7.0-3ubuntu4
  Temporary failure resolving 'au.archive.ubuntu.com'
E: Failed to fetch http://au.archive.ubuntu.com/ubuntu/pool/universe/n/nsd/nsd_4.1.17-1build1_amd64.deb  Temporary failure resolving 'au.archive.ubuntu.com'
E: Failed to fetch http://au.archive.ubuntu.com/ubuntu/pool/main/l/ldns/libldns2_1.7.0-3ubuntu4_amd64.deb  Temporary failure resolving 'au.archive.ubuntu.com'
E: Failed to fetch http://au.archive.ubuntu.com/ubuntu/pool/universe/l/ldns/ldnsutils_1.7.0-3ubuntu4_amd64.deb  Temporary failure resolving 'au.archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I checked the /etc/nsd/zones folder, and there were no files present.

It appears that the nameserver is modified in a fashion that causes internet connectivity to be lost. I tested this by modifying /etc/resolve.conf to either nameserver or gateway which results in internet connectivity to be present again from host (note this was just a test, I’m not suggesting this as a solution)

If the security gateway is removed the install completes without issue.

I need help troubleshooting this step, because it appear the NSD install does not play nicely with my security gateway.

Sorry, this set up is unsupported.