爱意满满的作品展示区。
ZGLHHH

Bash 脚本——一键建立 DNS

  •  
  •   ZGLHHH · Feb 16, 2016 · 4281 views
    This topic created in 3738 days ago, the information mentioned may be changed or developed.
    该脚本适用于 CentOS
    仅方便使用 https://github.com/zyqf/DNS 建立 DNS

    #!/bin/bash
    #by HuanMeng
    #Blog: https://ihuanmeng.com
    githuburl='https://github.com/zyqf/DNS.git'
    gitclonedir='/root/github/'
    yum install bind git -y;
    mkdir ${gitclonedir}
    cd ${gitclonedir}
    git clone ${githuburl}
    \cp DNS/named.conf /etc/named.conf -f
    \cp DNS/named.rfc1912.zones/named.rfc1912.zones /etc/named.rfc1912.zones -f
    \cp DNS/named/* /var/named/ -r -f
    #CentOS6
    service iptables stop
    chkconfig iptables off
    #CentOS7
    systemctl disable firewalld
    systemctl stop firewalld
    service named restart
    ifconfig
    14 replies    2016-02-18 17:07:30 +08:00
    ryd994
        1
    ryd994  
       Feb 16, 2016 via Android
    不开防火墙,公网 DNS ,不限频率,你这是不要命了啊
    壮士,请受我一拜
    873681136
        2
    873681136  
       Feb 16, 2016 via iPhone
    我想知道楼主敢用在实际环境吗
    9hills
        3
    9hills  
       Feb 16, 2016 via iPhone
    壮士你好
    cielpy
        4
    cielpy  
       Feb 16, 2016
    开放 53 端口分分钟就被认证了。
    demo
        5
    demo  
       Feb 16, 2016
    禁用防火墙,真牛逼
    maskerTUI
        6
    maskerTUI  
       Feb 16, 2016 via Android
    service iptables stop
    chkconfig iptables off
    看到这两行代码我惊呆了(⊙o⊙)!
    evlos
        7
    evlos  
       Feb 16, 2016
    #CentOS6
    service iptables stop
    chkconfig iptables off
    #CentOS7
    systemctl disable firewalld
    systemctl stop firewalld

    666666
    7654
        8
    7654  
       Feb 16, 2016
    iptables -A INPUT -p udp --dport 53 -m recent --set --name dnslimit
    iptables -A INPUT -p udp --dport 53 -m recent --update --seconds 2 --hitcount 18 --name dnslimit -j DROP
    service iptables save
    为什么不按照 github 上的 DNS server security 操作呢,感觉恶意满满
    RealLiuSha
        9
    RealLiuSha  
       Feb 16, 2016
    这是要干啥啊 干啥啊
    AstroProfundis
        10
    AstroProfundis  
       Feb 16, 2016
    带宽跑满然后流量耗尽机器死掉
    如果在这之前还没被服务商禁用的话...
    iptux
        11
    iptux  
       Feb 16, 2016 via Android
    \cp 这么用是有什么讲究么?
    873681136
        12
    873681136  
       Feb 16, 2016 via iPhone
    用软链接的方法不是更好?还可以差量升级呢
    Delbert
        13
    Delbert  
       Feb 16, 2016 via iPad
    @iptux 使用没有被 alias 过的 cp 命令。
    strwei
        14
    strwei  
       Feb 18, 2016
    防火墙,呵呵哒
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   984 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 127ms · UTC 20:46 · PVG 04:46 · LAX 13:46 · JFK 16:46
    ♥ Do have faith in what you're doing.