Discover Centmin Mod today
Register Now

vhost dns lookups

Discussion in 'Install & Upgrades or Pre-Install Questions' started by cloud9, Mar 3, 2022.

  1. cloud9

    cloud9 Premium Member Premium Member

    431
    117
    43
    Oct 6, 2015
    England
    Ratings:
    +217
    Local Time:
    2:19 PM
    1.25.3
    10.6.x
    Any way to force cmm to look for the dns elsewhere ? not sure where it gets its dns from ?

    I have a domain, altered dns, into dns reports its changed, dig from the server reports its changed but when I try to set up a vhost with lets encrypt I get the old server IP address

    dig and various dns lookups (like intends) all report aaa.aaa.aaa.aaa

     
    Last edited: Mar 3, 2022
  2. cloud9

    cloud9 Premium Member Premium Member

    431
    117
    43
    Oct 6, 2015
    England
    Ratings:
    +217
    Local Time:
    2:19 PM
    1.25.3
    10.6.x
    Screenshot 2022-03-02 at 21.54.04.png
     
  3. cloud9

    cloud9 Premium Member Premium Member

    431
    117
    43
    Oct 6, 2015
    England
    Ratings:
    +217
    Local Time:
    2:19 PM
    1.25.3
    10.6.x
    Output of
    Code:
    vhostname_dns=yourdomain.com
    VHOST_ACHECK=$(dig -t A +short @8.8.8.8 $vhostname_dns)
    echo $VHOST_ACHECK
    gives bbb.bbb.bbb.bbb

    Output of

    Code:
    ifconfig | grep 'inet' | grep $VHOST_ACHECK
    gives nothing

    If I run

    Code:
    curl -4sL https://ipinfo.io/
    and this
    Code:
    curl http://169.254.169.254/latest/meta-data/public-ipv4
    its gives aaa.aaa.aaa.aaa
     
  4. cloud9

    cloud9 Premium Member Premium Member

    431
    117
    43
    Oct 6, 2015
    England
    Ratings:
    +217
    Local Time:
    2:19 PM
    1.25.3
    10.6.x
    Your check here

    Code:
    if [ "$VHOST_AWWWCHECK" ]; then
            cecho "current DNS A record IP address for www.$vhostname_dns is: $VHOST_AWWWCHECK" $boldyellow
            if [[ "$(ifconfig | grep 'inet' | grep $VHOST_AWWWCHECK >/dev/null 2>&1; echo $?)" != '0' ]]; then
            cecho "current DNS A record IP address for www.$vhostname_dns is: $VHOST_AWWWCHECKLIST" $boldyellow
            if [[ -z "$ISCF_AWWWCHECK" && "$(ifconfig | grep 'inet' | grep $VHOST_AWWWCHECK >/dev/null 2>&1; echo $?)" != '0' ]]; then
              echo
              cecho "!! Error: DNS A record IP doesn't match any found on this server" $boldyellow
              echo
    If I run

    Code:
    dig -t A +short @8.8.8.8 *****************.co.uk
    it gives bbb.bbb.bbb.bbb (my old server IP)
     
  5. eva2000

    eva2000 Administrator Staff Member

    53,178
    12,112
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,647
    Local Time:
    11:19 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  6. eva2000

    eva2000 Administrator Staff Member

    53,178
    12,112
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,647
    Local Time:
    11:19 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what about now if you run from the server
    Code (Text):
    dig -t A +short @8.8.8.8 *****************.co.uk
    

    and
    Code (Text):
    dig -t A +short @8.8.4.4 *****************.co.uk
    

    and
    Code (Text):
    dig -t A +short @1.1.1.1 *****************.co.uk
    

    and
    Code (Text):
    dig -t A +short @1.0.0.1 *****************.co.uk
    
     
  7. cloud9

    cloud9 Premium Member Premium Member

    431
    117
    43
    Oct 6, 2015
    England
    Ratings:
    +217
    Local Time:
    2:19 PM
    1.25.3
    10.6.x
    Bum

    Just got home and read this, DNS is all refreshed everywhere now as my last

    Code:
    dig -t A +short @8.8.8.8 *****************.co.uk
    returned old server address - It now returns new server address

    So I cant check 8.8.4.4 1.1.1.1 1.0.0.1

    Will have to wait till my next site move
     
  8. eva2000

    eva2000 Administrator Staff Member

    53,178
    12,112
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,647
    Local Time:
    11:19 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    It could be do to your registrar DNS provider's nameserver TTL settings. If you have a long TTL for DNS record, it could take a while to propagate across all DNS servers.
     
  9. cloud9

    cloud9 Premium Member Premium Member

    431
    117
    43
    Oct 6, 2015
    England
    Ratings:
    +217
    Local Time:
    2:19 PM
    1.25.3
    10.6.x
    Set them all to 5mins 48 hours before I moved servers