[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)
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:
- ssh to the server
- vi /opt/dsiprouter/dsiprouter.sh
- Add the following line before 768:
768 EXTERNAL_FQDN=<your FQDN>
769 printdbg "Generating Certs for ${EXTERNAL_FQDN} using LetsEncrypt"
- Save the file
- Run the following
dsiprouter configuressl -f