mail-in-a-box / mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.
https://mailinabox.email/
Creative Commons Zero v1.0 Universal
13.85k stars 1.43k forks source link

NSD server install results in lost network connection #1852

Open orrery opened 3 years ago

orrery commented 3 years ago

Note that until this step, the install was proceeding without issue.

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?

The NSD install step results in the /etc/resolv.conf being overwritten, resulting in loss of network connectivity and subsequent package installation fail as a result.

Ubuntu version:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.5 LTS
Release:    18.04
Codename:   bionic

A network connection from the host was present. the NSD install breaks this. Ubuntu 18.04 was installed onva dedicated box behind a security gateway, all requisite ports were open at the time of install. Note that Ubuntu 18.04 was installed with DHCP enabled.

john-clark commented 3 years ago

I can also verify this is still a problem, it appears resolve.conf nameserver is set to 127.0.0.1, nsd is not setup so DNS fails

NotExift commented 3 years ago

I too have also run into this issue, has there been any fix?

memesalot commented 2 years ago

Still a problem in 2022.

It appears resolve.conf nameserver is set to 127.0.0.1, nsd is not setup so DNS fails


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.5).
The following NEW packages will be installed:
  ldnsutils libldns2 nsd
0 upgraded, 3 newly installed, 0 to remove and 0 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://nova.clouds.archive.ubuntu.com/ubuntu bionic/universe amd64 nsd amd64 4.1.17-1build1
  Temporary failure resolving 'nova.clouds.archive.ubuntu.com'
Err:2 http://nova.clouds.archive.ubuntu.com/ubuntu bionic/main amd64 libldns2 amd64 1.7.0-3ubuntu4
memesalot commented 2 years ago

Update:

Figured out it was the OVH VPS firewall that was causing the issues. After disabling it, everything is working now.

benkhouya commented 2 years ago

I confirm, I have the same problem on a vps.

tasmo commented 1 year ago

Still a problem with v60.1.

MonoMaister commented 1 year ago

Hello, I have found a solution that worked for me, the source is https://discourse.mailinabox.email/t/installer-breaks-dns-and-fails-on-name-resolution/9249/30

Apparently, when you install mail in a box in a container, there is a problem with BIND.

So my container is running Ubuntu 22.04

  1. Install bind before install Mail-on-a-box: sudo apt install bind9 bind9utils bind9-doc
  2. Edit the file /etc/bind/named.conf.options, the key "dnssec-validation" from auto to yes

Aflter that, you can make de installation with no problems. Your Mail-in-a-Box is running.

Im running Mail-in-a-Box Version: v61.1

x3r4n0 commented 1 year ago

dosnt work for me... get error cant resolve... resolv.conf is automatic setted to 127.0.0.1 again...

Euro-pol commented 2 months ago

Still can reproduce this issue Edit: Was due to DDoS protection