Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 3 of 5 FirstFirst 1 2 3 4 5 LastLast
Results 31 to 45 of 61
  1. #31
    Member
    Join Date
    Mar 2004
    Location
    This Planet
    Posts
    984

    Default

    So it did get through finally?

  2. #32
    Member DigiCrime's Avatar
    Join Date
    Nov 2002
    Posts
    388

    Default

    Because I have a lot of servers to go thru I wrote this to help me out, if it helps anyone great, use at your own risk.

    Code:
    #!/bin/bash
    # 3/11/06 digicrime@aol.com 
    # Open DNS Patch
    #
    cp /etc/named.conf /etc/named.conf-$(date +%Y%m%d)
    echo 'acl "trusted" {'
    echo `/bin/hostname -i`\;
    for i in `cat /etc/ips | cut -d ":" -f 1`
    do
     echo $i\;
    done
    echo "};"
    echo ""
    echo "options {
            directory "/var/named";
            version "not currently available";
            allow-recursion { trusted; };
            allow-notify { trusted; };
            allow-transfer { trusted; };
    };"
    echo ""
    echo ""
    echo ""
    MHW="This will fix the Open DNS errors found from dnsreport.com Paste these results after the control }; line in /etc/named.conf. Remember to restart named after you make changes /scripts/restartsrv_named check to see if it is running as well. Run /scripts/fixndc if you get an rndc error and then restart named then use dnsreport.com making sure you do not get any Open DNS errors. If you mess up you will find a backup in /etc/named.conf-timestamp where timestamp is the current date and time you ran this script"
    
    echo $MHW
    echo " "
    echo " "
    echo "Backup file is /etc/named.conf-$(date +%Y%m%d)"
    echo " "
    save it however you want like named.patch chmod 755 then sh named.patch

    It paste an output of what you need to place in named.conf.

  3. #33
    Member This forum account has been confirmed by cPanel staff to represent a vendor. Radio_Head's Avatar
    Join Date
    Feb 2002
    Posts
    2,064

    Default

    Quote Originally Posted by DigiCrime
    Because I have a lot of servers to go thru I wrote this to help me out, if it helps anyone great, use at your own risk.

    Code:
    #!/bin/bash
    # 3/11/06 digicrime@aol.com 
    # Open DNS Patch
    #
    cp /etc/named.conf /etc/named.conf-$(date +%Y%m%d)
    echo 'acl "trusted" {'
    echo `/bin/hostname -i`\;
    for i in `cat /etc/ips | cut -d ":" -f 1`
    do
     echo $i\;
    done
    echo "};"
    echo ""
    echo "options {
            directory "/var/named";
            version "not currently available";
            allow-recursion { trusted; };
            allow-notify { trusted; };
            allow-transfer { trusted; };
    };"
    echo ""
    echo ""
    echo ""
    MHW="This will fix the Open DNS errors found from dnsreport.com Paste these results after the control }; line in /etc/named.conf. Remember to restart named after you make changes /scripts/restartsrv_named check to see if it is running as well. Run /scripts/fixndc if you get an rndc error and then restart named then use dnsreport.com making sure you do not get any Open DNS errors. If you mess up you will find a backup in /etc/named.conf-timestamp where timestamp is the current date and time you ran this script"
    
    echo $MHW
    echo " "
    echo " "
    echo "Backup file is /etc/named.conf-$(date +%Y%m%d)"
    echo " "

    save it however you want like named.patch chmod 755 then sh named.patch

    It paste an output of what you need to place in named.conf.


    Your code works GREAT . Only one thing the code

    Code:
    echo "options {
            directory "/var/named";
            version "not currently available";
            allow-recursion { trusted; };
            allow-notify { trusted; };
            allow-transfer { trusted; };
    };"

    should be replaced with

    Code:
    echo "options {
            directory \"/var/named\";
            version \"not currently available\";
            allow-recursion { trusted; };
            allow-notify { trusted; };
            allow-transfer { trusted; };
    
    };"

    otherwise named will report an error.


    Bye
    Stop SPAM & VIRUS :: ASSP Deluxe for cPanel http://www.grscripts.com
    █ ASSP Deluxe is supported by Fritz Borgstedt,ASSP main developer.

  4. #34
    Member DigiCrime's Avatar
    Join Date
    Nov 2002
    Posts
    388

    Default

    Thanks, I ran it on Core 2 and CentOS servers without a problem I havent tried any others yet but thanks for the correction

  5. #35
    Member This forum account has been confirmed by cPanel staff to represent a vendor. Radio_Head's Avatar
    Join Date
    Feb 2002
    Posts
    2,064

    Default

    me too on centos 4.2 , works perfect .
    Stop SPAM & VIRUS :: ASSP Deluxe for cPanel http://www.grscripts.com
    █ ASSP Deluxe is supported by Fritz Borgstedt,ASSP main developer.

  6. #36
    Member DigiCrime's Avatar
    Join Date
    Nov 2002
    Posts
    388

    Default

    With this, Nagios shows DNS as being down when its doing checks, im guessing because the servers IP is not in the host its checking... thats my guess, need to edit all my entries

  7. #37
    cPanel Partner NOC cPanel Partner NOC Badge myusername's Avatar
    Join Date
    Mar 2003
    Location
    chown -R us.us *yourbase*
    Posts
    712
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Does anyone see it as a possibility for cpanel to include support for this item by patching of this in a later build?

    Aside from the feature request option at bugzilla I was wondering if anyone had some insight on the matter before I do just that. IPs can change and this would be nice if it were dynamically corrected when they did vs manual editing across "x" number of servers.
    Last edited by myusername; 03-17-2006 at 08:40 PM.
    GlowHost.com | Professional Managed Web Hosting Since 2002.
    >> Fully Managed Dedicated, Cloud VDS, Reseller & Semi-Dedicated
    >> Cloud Servers for Enterprise

  8. #38
    Member manokiss's Avatar
    Join Date
    Mar 2002
    Posts
    536

    Default

    Hope someone help....that code is not helping, it just making dnsreport do not show the Fail warning, but the DNS continue open unless you put the "recursion no;· option, but with this option exim get skrewed so really dont know what is the solution, any idea?

  9. #39
    Member
    Join Date
    Feb 2005
    Location
    Georgetown, TX
    Posts
    104

    Default

    I have just added a post to another thread:
    http://forums.cpanel.net/showthread.php?p=242467

    It discusses something important that no one seems to have addressed yet regarding the limitations of the "allow-recursion" option.

    Please check it out.

    -- Matt

  10. #40
    Member
    Join Date
    Sep 2003
    Posts
    199

    Default

    I have added this to my named.conf. I can recieve email from other mail servers on the net but if I were to reply to them the other end user does not receive. But if the end user has an email on the same web server they can send and receive mail. It is just an error going to other hosts like comcast or other ISP. I can only send mail to local users on the same box. I hope I don't have to add ip's for every mail server on the web in order to send/receive. That is just plain silly. Anyone else run into this problem?

    Code:
    acl "trusted" {
    xxx.xxx.xxx.xxx;
    xxx.xxx.xxx.xxx;
    xxx.xxx.xxx.xxx;
    xxx.xxx.xxx.xxx;
    xxx.xxx.xxx.xxx;
    xxx.xxx.xxx.xxx;
    xxx.xxx.xxx.xxx;
    xxx.xxx.xxx.xxx;
    };
    
    options {
            directory "/var/named";
            version "not currently available";
            allow-recursion { trusted; };
            allow-notify { trusted; };
            allow-transfer { trusted; };
    
    };

  11. #41
    Member
    Join Date
    Apr 2004
    Posts
    320

    Default

    Hi,

    Sending e-mail and the settings of your DNS servers really have *nothing* to do with each other. It may be just a coincidence...

    Check your APF settings and your e-mail queue for further information...
    You may just block traffic with your current firewall settings...

    Regards,
    Bdzzld.

  12. #42
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    BTW, I've put together a perl script that's slightly different to the one posted by DigiCrimeas I found that missed out some of the ethernet devices:
    Code:
    #!/usr/bin/perl
    
    @ips = `ifconfig`;
    chomp @ips;
    
    print "\n\nacl \"trusted\" {\n";
    foreach my $line (@ips) {
    	if ($line =~ /inet addr:(\d+\.\d+\.\d+\.\d+)/) {
    		print "        $1;\n";
    	}
    }
    print "};\n\n";
    print "options {\n";
    print "        directory \"/var/named\";\n";
    print "        dump-file \"/var/named/data/cache_dump.db\";\n";
    print "        statistics-file \"/var/named/data/named_stats.txt\";\n";
    print "        version \"not currently available\";\n";
    print "        allow-recursion { trusted; };\n";
    print "        allow-notify { trusted; };\n";
    print "        allow-transfer { trusted; };\n";
    print "};\n\n"
    Replace the options section in named.conf with the output from the script.
    Last edited by chirpy; 07-25-2006 at 04:34 PM.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  13. #43
    Member
    Join Date
    Sep 2003
    Posts
    199

    Default

    Quote Originally Posted by chirpy
    BTW, I've put together a perl script that's slightly different to the one posted by DigiCrimeas I found that missed out some of the ethernet devices:
    Code:
    #!/usr/bin/perl
    
    @ips = `ifconfig`;
    chomp @ips;
    
    print "\n\nacl \"trusted\" {\n";
    foreach my $line (@ips) {
    	if ($line =~ /inet addr:(\d+\.\d+\.\d+\.\d+)/) {
    		print "        $1;\n";
    	}
    }
    print "};\n\n";
    print "options {\n";
    print "        directory \"/var/named\";\n";
    print "        version \"not currently available\";\n";
    print "        allow-recursion { trusted; };\n";
    print "        allow-notify { trusted; };\n";
    print "        allow-transfer { trusted; };\n";
    print "};\n\n"

    I tried running this script. Either I am executing it wrong or something but not working. Can you post the steps to get this to run?

  14. #44
    cPanel Partner NOC cPanel Partner NOC Badge DWHS.net's Avatar
    Join Date
    Jul 2002
    Location
    LA, Costa RIca
    Posts
    1,356

    Default

    Wow there is allot of back and forth on this issue.

    I see the script from chirpy and that looks great.

    But I use remote dns with the two differant class c's and hundreds of servers, is there a way to have all my i.p.'s allowed with this script?

    Thanks,

  15. #45
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    IIRC, you can simply use CIDR adressing, so adding a trusetd class C would only require a single line.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

Similar Threads & Tags
Similar threads

  1. open dns servers
    By outlaw web in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 12-03-2007, 03:52 AM
  2. Open DNS servers
    By vlee in forum cPanel and WHM Discussions
    Replies: 11
    Last Post: 10-05-2006, 07:57 AM
  3. Replies: 4
    Last Post: 05-28-2006, 09:55 AM
  4. NDC Fix for some servers
    By Beowulf in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-28-2003, 03:34 AM
  5. How to fix : Cannot open /var/log/sa/sa18: No such file or directory
    By isputra in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 09-25-2003, 08:35 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube