ddavness / power-mailinabox

A Mail-in-a-Box with extra capabilities and more customizability. Not just for power users!
Creative Commons Zero v1.0 Universal
168 stars 31 forks source link

DNS settings changed during setup #112

Open jwgn opened 1 year ago

jwgn commented 1 year ago

Hi,

I have no idea how to determine the current version, so I just tried to upgrade.

Updating system packages...
Installing system packages...
Initializing system random number generator...
Firewall is active and enabled on system startup
Installing nsd (DNS server)...
Installing Postfix (SMTP server)...
Installing Dovecot (IMAP server)...
Installing OpenDKIM/OpenDMARC...
Installing SpamAssassin...
Installing Nginx (web server)...
Installing Roundcube (webmail)...
Installing Nextcloud (contacts/calendar)...
Upgrading Nextcloud --- backing up existing installation, configuration, and database to directory to /home/user-data/owncloud-backup/2023-02-02-00:42:01...

Upgrading to Nextcloud version 24.0.7

FAILED: wget -O /tmp/nextcloud.zip https://download.nextcloud.com/server/releases/nextcloud-24.0.7.zip
-----------------------------------------
--2023-02-02 00:42:03--  https://download.nextcloud.com/server/releases/nextcloud-24.0.7.zip
Resolving download.nextcloud.com (download.nextcloud.com)... failed: Temporary failure in name resolution.
wget: unable to resolve host address ‘download.nextcloud.com’

It fails because the installer is changing my /etc/resolv.conf during installer run.

This is how it should look:

# --- BEGIN PVE ---
search home.arpa
nameserver 192.168.100.1
# --- END PVE ---

The installer breaks it during install by changing it to:

nameserver 127.0.0.1

How to keep my DNS settings during install?

jwgn commented 1 year ago

Nevermind, fixed it by repeatedly overwriting the file with the correct content during install.

ddavness commented 1 year ago

The installer breaks it during install by changing it to: nameserver 127.0.0.1 How to keep my DNS settings during install?

FWIW - This is intentional. Before overwriting /etc/resolv.conf, MIAB installs a DNS resolver of it's own (bind9) that listens on - you guessed it - 127.0.0.1. So there should have been a DNS resolver but it for some reason decided that it wouldn't be working.

I'll re-open the issue as it is relevant, but if you have a use case for using another resolver, please let me know.