Reinstalling server broke DNS

I have had Mail in a box for almost a year now, everything has been going great for me until I had to reset the server completely, I reinstalled ubuntu 22.04 and installed MIAB on a clean instance, however I am now getting this
sudo: unable to resolve host domain because new user: Temporary failure in name resolution

I tried going to the admin panel and it’s telling me to set up the DNS on my service provide when the nameservers are already pointing to the box, I think it was a bit iffy when I first set it up and I might’ve made a mistake however I can’t see the problem or fix it, I tried setting the external dns inside the panel to the IP address however that doesn’t solve the problem despite DIG command returning the ip correctly from the server’s dns, am I missing something?

Let me clear this up since I feel like I did a horrible job with explaining my current DNS settings, here are my godaddy settings, they are referring to the correct IP and mailinabox is running on that IP without any problems however it’s unable to forward the DNS as expected


This may have more to do with linux config than your external dns settings at the registrar.

Link that explores this error in Linux.

Resolution
Solution:
• This issue can occur if the host name is not updated or incorrect in the /etc/hosts file.
• To address this issue update the hostname or FQDN of the Archiving server in the /etc/hosts file and save the file.
Example:
127.0.0.1 hostname

Attempt to use the sudo command after updating the hosts file and it should work fine.

Another useful link.

Check that you gave the server the right name, if I recall correctly, the install instructions are very specific about this.

Your Box Has A Name
Every machine connected to the Internet has a name and an address.
The address, an IP address, is like a telephone number. It’s made up of numbers and is assigned to you by whoever provides Internet access to your mail server (that’s coming in the next section).
The name — called a hostname — is something you decide. It can be a domain name you own or any “subdomain” of a domain you own.
For your Mail-in-a-Box, we recommend naming your box box + . + your domain name.
Josh’s Mail-in-a-Box is named box.occams.info. This is its hostname.
Your Mail-in-a-Box may handle the email or multiple domain names, but the box has a single name.
Your box’s name CANNOT be a domain name that you intend to serve a website on from another web hosting service. We strongly suggest using a subdomain like box, as in the example above, so that you are able to use the main domain name for a website hosted from another web hosting service if you choose.

Oh so I am pointing the DNS to be resolved on my IP address but I am not resolving it on the server that was so stupid of me, thank you so much

I have added this to /etc/hosts however I still haven’t noticed any change

if you run hostname in your linux cli, what is the output?

Here is some more info:

Check that /etc/hostname contains just your computer’s name, and and /etc/hosts will have a line that maps the IP address to your hostname

If your host name is set correctly, and the hosts file is configured correctly, then run sudo systemctl restart systemd-resolved.service

Then check the status by running
'sudo systemctl status systemd-resolved.service

You should see the systemd-resolved service is running correctly now, and you should be good to go (fingers crossed). (source)

I get the box domain output

Please reply with the error you receive: Please quote it precisely.

This seems like a typical DNS propagation issue.
Check here: DNS Checker - DNS Check Propagation Tool

Please wait longer for the propagation to take place. It can take up to 48 hours.

I am not familiar with the Godaddy panel but in teory In Nameservers: you need an

  1. A record: ns1.box and an AAAA record ns1.box (if you use IPV6 as dual stack instance, if not just IPV4)
  2. NS record ns1.box.elitesoftworks.com and ns2.box.elitesoftworks.com (as per the screenshot this is wrong, enter the full name)
    If anybody here knows how this is done in Godaaddy please respond. I suppose the A record is in My Domains >> Domain Settings (see here How to Add an A Record with GoDaddy - Kinsta®)

For nameservers see here to enter your own nameservers it will warn you that it is risky just forget about the warning: How to Change GoDaddy Nameservers in 2 Minutes (Step by Step)

If you messed the etc/hosts file revert or do a fresh install. Nothing to do with this is file on a fresh install as the issue is propagation.

WAIT FOR 48 Hours!

If all IP addresses and host names are the same, why would propagation take so long? Wouldn’t all DNS servers already have that info?

Are you still getting any errors?

It does not look to me that this is the case. Maybe @Noodles obtained new IPs with the new instance and forgot how to edit GoDaddy’s stupid admin panel. I remember that custom nameservers settings are hidden somewhere in their admin panel. Nonetheless his NS settings are wrong as per the screenshot.

And @Noodles please change TTL settings to low values for shorter propagation.

ah ok, that makes sense. I didn’t even consider that as a possibility. good thinking!

No I didn’t receive any new addresses, I am using the same server, that’s why I am very confused, I haven’t touched anything in godaddy for almost a year

I get

telnet box.elitesoftworks.com 25
telnet: could not resolve box.elitesoftworks.com/25: Temporary failure in name resolution

From 3 of my servers: Frankfurt, Amsterdam and Toronto.
I can connect to your port 25 with IPV4 no problem.


telnet 154.38.163.82 25
Trying 154.38.163.82...
Connected to 154.38.163.82.
Escape character is '^]'.
220 box.elitesoftworks.com ESMTP Hi, I'm a Mail-in-a-Box (Ubuntu/Postfix; see https://mailinabox.email/)

I am out of ideas.

So are you still getting the same error? Can you do me a favor and relay any errors or issue you’re getting in bullet points? I have admittedly gotten confused with the replies and suggestions and am not 100% about what you’re experiencing.

Sure, so basically

  • I haven’t changed any of the settings on godaddy for over a year and it has been working just fine until my recent reset of the server
  • I have set up the /etc/hosts as you said and added my domain and box(dot)domain and made them resolve to my ip address
  • running ping or telnet on the domain name still doesn’t resolve the website
  • running dig normally doesn’t resolve however running dig @ip website returns the correct DNS records

Read this topic. DNS Issues on only one domain - Help with daignosing the issue - #6 by BangsKeyboards
It is also GoDaddy related. @BangsKeyboards resolved the issue by using their namesrvers and using the MIAB external DNS option. Do you use DNSSEC. If so. Turn it off and try again.

2 Likes

I can confirm this worked as a workaround to get that domain back working. I have not tried to set it back to using MiaB yet for DNS, but the other 5 domains I have don’t seem to have the same issue, even though they are also on GoDaddy.

it’s good to know I am not crazy as I have had some uncomfortable conversations with their tech teams and they isolate their networking guys so that even the phone support people can only interact with them via chat. Maddening.

We may need to get together on a call to show them that their sh!t is messed up. The love to gaslight and say that since we are not using all GD services then it MUST be an issue with our side.

1 Like

Wow… Never in a million years would I assume a registrar would be the issue.

1 Like

I have had my systems and my entire work offline for almost 2 weeks now and the crazy thing was I didn’t change anything and it was working just fine so I thought it 100% had to be wrong configuration on my end, but you are right, I think this happened before and I solved it by mistake by resetting the godaddy settings but I only noticed so now because it was 100% working

1 Like