dOpensource/dsiprouter

[BUG] aws instance default hostname assigned auto instead of set hostname

Opened this issue · 2 comments

Describe the bug
aws instance default hostname assigned auto instead of set hostname

To Reproduce
While default installation

Expected behavior
It should install the ssl for hostnamectl set-hostname

Screenshots
https://pix.cobrasoft.org/images/2024/02/25/Screenshot-from-2024-02-25-11-54-43.png

Server Info:

  • OS: output from uname -a
    -- Linus 5.10.0-28-cloud-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64 GNU/Linux

  • Distro: output from cat /etc/os-release

  • PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
    NAME="Debian GNU/Linux"
    VERSION_ID="11"
    VERSION="11 (bullseye)"
    VERSION_CODENAME=bullseye
    ID=debian
    HOME_URL="https://www.debian.org/"
    SUPPORT_URL="https://www.debian.org/support"
    BUG_REPORT_URL="https://bugs.debian.org/"

  • dSIPRouter Version: output from dsiprouter version

  • 0.74
    If not on a release version include the branch name and last commit id

  • Kamailio Version: output from kamailio -v
    version: kamailio 5.7.4 (x86_64/linux)

Uploading Screenshot from 2024-02-25 11-54-43.png…

The system is doing a reverse lookup to obtain the EXTERNAL FQDN. Even if you set the hostname of the system AWS will return the AWS hostname based on reverse lookup records. We will add an option to override this. Probably something like this:

dsiprouter configuressl -f -fqdn sip1.dsiprouter.net

The -fqdn would take precedence over the FQDN that's registered as the reverse lookup for the ip address of the server

A workaround for right now is to do the following:

  1. ssh to the server
  2. vi /opt/dsiprouter/dsiprouter.sh
  3. Add the following line before 768:
 768     EXTERNAL_FQDN=<your FQDN>
 769     printdbg "Generating Certs for ${EXTERNAL_FQDN} using LetsEncrypt"
  1. Save the file
  2. Run the following
dsiprouter configuressl -f 

resolved by a1b0339