dOpensource / dsiprouter

UI Interface for implementing Kamailio to provide PBX Hosting and SIP Trunking Services
https://dsiprouter.org
Apache License 2.0
196 stars 104 forks source link

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

Open karthikindia opened 8 months ago

karthikindia commented 8 months ago

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:

![Uploading Screenshot from 2024-02-25 11-54-43.png…]()

mackhendricks commented 8 months ago

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"

3) Save the file 4) Run the following

dsiprouter configuressl -f 
devopsec commented 7 months ago

resolved by a1b0339904c45755471f52ba2114327362ef6059