Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Mar 2003
    Posts
    427

    Default Script ? Find domains not pointing to server anymore

    Is there a script that can check all domains installed on a server which nameservers or DNS they use ? I have moved accounts from different servers and I'm a little confused now and need to get things sorted out. I can check dnsstuff and see where a domains goes but a scritp that does it for me would be nice :-)

  2. #2
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    Here is a quick crude way of doing some checks.

    It uses the info in /etc/localdomains and gets the NS info for each domain listed. If anything it can be used as a starting point. Feel free to improve it.

    Code:
    for i in `cat /etc/localdomains`;do dig $i|grep NS|grep -v ROOT-SERVERS|grep -v ANSWER;done
    to pipe the results to a file

    Code:
    for i in `cat /etc/localdomains`;do dig $i|grep NS|grep -v ROOT-SERVERS|grep -v ANSWER>>domains.txt;done
    Regards,
    David
    Forum Moderator

  3. #3
    Member
    Join Date
    Mar 2003
    Posts
    427

    Default

    cool, thanks - it helped

Similar Threads & Tags
Similar threads

  1. Replies: 3
    Last Post: 08-14-2011, 03:39 PM
  2. Replies: 1
    Last Post: 12-14-2009, 08:09 PM
  3. spammer on the server can't find the script
    By hammer65 in forum E-mail Discussions
    Replies: 2
    Last Post: 08-22-2009, 02:24 PM
  4. DNS issues domains not pointing to server.
    By speedy in forum cPanel and WHM Discussions
    Replies: 11
    Last Post: 04-08-2005, 04:49 AM
  5. Replies: 1
    Last Post: 12-24-2003, 01:43 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube