Unable to setup MIAB on EC2 instance


#1

Can anyone help me resolve the issue of

I get the following error mid way through installing MIB, right after I provide email, and hostname:
“network is unreachable” on an EC2 instance Ubuntu 18.04 Server edition.

Once this error happens, I am also not able to do “apt-get update” as well on my EC2 server. All package Downloads fail.
I have checked all the inbound and outbound rules all are correct.

However I am able to run apt command successfully if I try on the new instance, before the MIB installation command is run.

Also I am using Name server from with AWS Route53 so do not want to make MIAB my NS

Appreciate any leads to solve this issue. Thanks!


#2

Hi OP … you resolved this on the Slack channel, right?

Care to post the problem and resolution in case someone else has the same issue?


#3

This issue is resolved.

The problem was that the MIB install script adds it’s own nameserver and overrides the nameserver set by AWS VPC for the instance, because of which outbound traffic on the machine fails to work.

That was the reason I was not able to complete the installation as apt-get couldn’t download the needed packages.

The fix is:

  1. Comment lines 329 to 331 in file mailinabox/setup/system.sh :
    rm -f /etc/resolv.conf
    tools/editconf.py /etc/systemd/resolved.conf DNSStubListener=no
    echo “nameserver 127.0.0.1” > /etc/resolv.conf

  2. add /etc/resolv.conf with you AWS VPC Nameserver