DNS cleanup

Discussion in 'General' started by SamTzu, Aug 6, 2019.

  1. SamTzu

    SamTzu Active Member

    Does any1 have any bright ideas how to find out what domains have expired and should be removed from ISPconfig?
    ahrasis likes this.
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I have written a python program that finds out from whois the expiry dates of domains. It works mostly, but is kind of ad hoc since registrants use different formats in their whois information.
    So if you have a listing of the domains one per line, I can run it through my script. Maybe do a sql query or a ls -ldh /var/www/*.
    ahrasis likes this.
  3. SamTzu

    SamTzu Active Member

    Maybe ls /etc/bind/ |grep pri then pipe that to something...
  4. SamTzu

    SamTzu Active Member

    Even better:
    ls /etc/bind/ |grep pri | cut -d. -f2-
  5. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Another option might be to query dns, eg. if all your current customers register ns1.your.tld as a nameserver, then you could query NS records for your domain (eg. from google or other public dns server), and check the response for your nameservers.
  6. SamTzu

    SamTzu Active Member

    So. Now we have a working list of domains with:
    ls /etc/bind/ |grep pri | cut -d. -f2- > /var/log/domains
    Now what do we do with it?

Share This Page