Tianpu

树莓派搭建无污染 DNS

  •  
  •   Tianpu · Mar 8, 2015 · 7853 views
    This topic created in 4120 days ago, the information mentioned may be changed or developed.
    源DNS:bind搭建或者使用其它公共DNS

    自己搭建:
    yum install bind
    nano /etc/named.conf
    acl goodclients {
    2.2.0.0/16;
    3.3.3.3;
    localhost;
    localnets; #允许的IP
    };
    options {
    listen-on port 53 { 1.2.3.4; }; #自己的服务器IP
    directory "/var/named";
    dump-file "/var/named/data/cache_dump.db";
    statistics-file "/var/named/data/named_stats.txt";
    memstatistics-file "/var/named/data/named_mem_stats.txt";
    allow-query { goodclients; };
    allow-query-cache { goodclients; };
    recursion yes;
    dnssec-enable yes;
    dnssec-validation yes;
    dnssec-lookaside auto;
    bindkeys-file "/etc/named.iscdlv.key";
    managed-keys-directory "/var/named/dynamic";
    };
    controls { };
    logging {
    channel default_debug {
    file "data/named.run";
    severity dynamic;
    };
    channel querylog {
    file "data/named.log" versions 5 size 32m;
    severity debug 3;
    print-category yes;
    print-time yes;
    print-severity yes;
    };
    category queries {
    querylog;
    };
    };
    zone "." IN {
    type hint;
    file "named.ca";
    };
    include "/etc/named.rfc1912.zones";
    include "/etc/named.root.key";


    本地DNS:
    apt-get install unbound
    nano /etc/unbound/unbound.conf
    server:
    verbosity: 1
    num-threads: 2
    interface: 192.168.1.2 #树莓派IP
    do-ip4: yes
    do-ip6: no
    do-udp: yes
    do-tcp: yes
    tcp-upstream: yes
    do-daemonize: yes
    access-control: 192.168.1.0/24 allow
    forward-zone:
    name: "."
    forward-addr: 1.2.3.4 #自己搭建的DNS
    forward-addr: 8.8.8.8

    可以正常查询到twitterIP,但是访问不了
    2 replies    2015-06-05 10:28:19 +08:00
    xiaozhizhu1997
        1
    xiaozhizhu1997  
       Mar 8, 2015
    推、FB之类的光防污染没用,还有IP地址封锁。
    防污染主要是应对edgecast之类的CDN,这种找不全域名的,直接自动反污染,非常有效。
    alairs
        2
    alairs  
       Jun 5, 2015
    没污染是没污染,但没多大用啊
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2736 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 56ms · UTC 04:16 · PVG 12:16 · LAX 21:16 · JFK 00:16
    ♥ Do have faith in what you're doing.