• 一个简单的dns服务器


    options {
    	listen-on port 53 { any; };
    	listen-on-v6 port 53 { any; };
    	directory 	"/srv/app/named";
    	dump-file 	"/srv/app/named/data/cache_dump.db";
    	statistics-file "/srv/app/named/data/named_stats.txt";
    	memstatistics-file "/srv/app/named/data/named_mem_stats.txt";
    	recursing-file  "/srv/app/named/data/named.recursing";
    	secroots-file   "/srv/app/named/data/named.secroots";
    	allow-query     { any; };
            forward only;
            forwarders { 1.2.4.8; 180.76.76.76; 114.114.114.114; 192.168.59.241; };
    	recursion  yes;
            max-cache-ttl  600;
            max-ncache-ttl 600;
            version "[no version.]";
            minimal-responses yes;
    	dnssec-enable  no;
    	dnssec-validation  no;
    	bindkeys-file "/etc/named.iscdlv.key";
    	managed-keys-directory "/srv/app/named/dynamic";
    	pid-file "/run/named/named.pid";
    	session-keyfile "/run/named/session.key";
    };
    
    
    logging {
        channel defaults {
            file "/srv/logs/named/default.log";
            severity dynamic;
            print-time yes;
            print-category yes;
            print-severity yes;
        };
        channel securitys {
            file "/srv/logs/named/securitys.log";
            severity dynamic;
            print-time yes;
            print-category yes;
            print-severity yes;
        };
        channel gsquery {
            file "/srv/logs/named/query.log"   versions 3 size 5m;
            severity error;
            print-time yes;
            print-category yes;
            print-severity yes;
        };
        category queries { gsquery; };
        category security { securitys; };
        category default { defaults; };
        category general { defaults; };
    };
    
    zone "." IN {
    	type hint;
    	file "named.ca";
    };
    
    include "/etc/named.ntp.zones";
    include "/etc/named.tophc.zones";
    include "/etc/named.rfc1912.zones";
    include "/etc/named.root.key";
    
    $ORIGIN tophc.top.
    $TTL 120
    @		IN SOA ns1.tophc.top. 1@3.com. (
    			2019052810 ; serial
    			21600 ; refresh
    			3600 ; retry
    			604800 ; expiry
    			120 ; minimum ttl
    		)
    
    ; Nameservers
    
    tophc.top.	86400 IN NS  ns1.tophc.top.
    tophc.top.      86400 IN TXT "v=spf1 include:tophc.top -all"
           
    ; Mailservers
    tophc.top.	86400 IN MX  10  mail.xxxx.xxxx.
    mail            120   IN A   xxxx
    
    ; Reverse DNS Records (PTR)
    
    ; CNAME
    smtp    120 IN CNAME mail
    imap    120 IN CNAME mail
    pop3    120 IN CNAME mail
    
    
    ; DNS RECORDS
    ns1	120 IN A xxxx
    ; HOST RECORDS
    ftp	120 IN A xxxx
    
  • 相关阅读:
    并发编程(线程)
    并发编程(进程)
    并发编程(操作系统的介绍)
    模块与包
    网络编程
    Django项目的创建与管理和pycharm与Github的秘密
    python解释器配置和python常用快捷键
    代码的调试.运行
    57. 三数之和
    1347. 尾随零
  • 原文地址:https://www.cnblogs.com/lizhaojun-ops/p/11712514.html
Copyright © 2020-2023  润新知