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

Bash 脚本——一键建立 DNS

  •  
  •   ZGLHHH · Feb 16, 2016 · 4735 views
    This topic created in 3914 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
    ryd994
    Feb 16, 2016 via Android
    1
    不开防火墙,公网 DNS ,不限频率,你这是不要命了啊
    壮士,请受我一拜
    873681136
    873681136
    Feb 16, 2016 via iPhone
    2
    我想知道楼主敢用在实际环境吗
    9hills
    9hills
    Feb 16, 2016 via iPhone
    3
    壮士你好
    cielpy
    cielpy
    Feb 16, 2016
    4
    开放 53 端口分分钟就被认证了。
    demo
    demo
    Feb 16, 2016
    5
    禁用防火墙,真牛逼
    maskerTUI
    maskerTUI
    Feb 16, 2016 via Android
    6
    service iptables stop
    chkconfig iptables off
    看到这两行代码我惊呆了(⊙o⊙)!
    evlos
    evlos
    Feb 16, 2016
    7
    #CentOS6
    service iptables stop
    chkconfig iptables off
    #CentOS7
    systemctl disable firewalld
    systemctl stop firewalld

    666666
    7654
    7654
    Feb 16, 2016
    8
    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
    RealLiuSha
    Feb 16, 2016
    9
    这是要干啥啊 干啥啊
    AstroProfundis
    AstroProfundis
    Feb 16, 2016
    10
    带宽跑满然后流量耗尽机器死掉
    如果在这之前还没被服务商禁用的话...
    iptux
    iptux
    Feb 16, 2016 via Android
    11
    \cp 这么用是有什么讲究么?
    873681136
    873681136
    Feb 16, 2016 via iPhone
    12
    用软链接的方法不是更好?还可以差量升级呢
    Delbert
    Delbert
    Feb 16, 2016 via iPad
    13
    @iptux 使用没有被 alias 过的 cp 命令。
    strwei
    strwei
    Feb 18, 2016
    14
    防火墙,呵呵哒
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1391 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 62ms · UTC 18:57 · PVG 02:57 · LAX 10:57 · JFK 13:57
    ♥ Do have faith in what you're doing.