Code Monkey home page Code Monkey logo

dns-sdwzzx_dns's Introduction

#Principle

Access to blocked sites , DNS will return an access IP.

#Installation

  • 1.yum install bind -y

  • 2.Replace the same file server directory file /etc/named.conf for the project root directory

  • 3.Replace the file server directory for the project directory named.rfc1912.zones /etc/named.rfc1912.zones inside named.rfc1912.zones file

  • 4.Under this item, the directory named all files uploaded to the server directory /var/named/under

  • 5.run: service named start

#DNS server security

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

#原理

访问某些被封锁的网站,DNS将返回一个可以访问的IP.

#优点 较hosts来说,用户只要改个DNS即可省去频繁更新hosts文件的烦恼.

#缺点

  • 1.信任问题,DNS服务器既可以返回正确的IP,也可以返回错误的IP,如恶意劫持域名,甚至利用DNS指向钓鱼网站.

  • 2.服务器必须位于国内,但是考虑到国内环境,如果DNS服务做的众人皆知,恐怕离查水表不远了,如HelloDNS.

#那么... 那么,希望通过本项目,建立一个又一个的DNS节点~~~~

#快速搭建DNS

  • 1.yum install bind -y

  • 2.替换服务器目录文件 /etc/named.conf 为本项目 根目录的同名文件

  • 3.替换服务器目录文件 /etc/named.rfc1912.zones 为本项目 目录 named.rfc1912.zones 下 named.rfc1912.zones文件

  • 4.把本项目 目录 named 下所有文件上传至服务器目录 /var/named/ 下

  • 5.启动: service named start

#DNS服务器安全 配置防火墙防止DDos攻击及放大攻击

添加规则: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

说明:利用recent和state模块限制单IP在2s内只能与本机建立18个新连接。被限制一分钟后即可恢复访问

保存规则:service iptables save

参看规则是否生效:

iptables -L -n

重启iptables

service iptables restart

#参考书籍 linux服务范例速查大全 刘丽霞 邱晓华 编著 清华大学出版社 第一版

linux网络服务配置详解 何世晓 编著 清华大学出版社 第一版

#参考途径 www.baidu.com

www.google.com

#查询IP的ISP www.whatismyip.com/ip-address-lookup

#感谢名单

@ codexss @ tonyxue

dns-sdwzzx_dns's People

Contributors

zmaplex avatar realityone avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.