Centos7下dnscrypt-proxy安装
DNS劫持指的是“一些设备”会拦截DNS解析请求,并将错误的DNS信息返回给主机;DNS污染指的是“一些设备”会将错误的域名信息下发至公共的DNS服务器中(比如114),这样用户在进行DNS查询的时候将会得到错误的IP信息。针对这两个问题,可通过搭建基于TCP且加密的DNS代理服务器来解决。
1、安装依赖包libsodium
wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.10.tar.gz
tar -xvzf libsodium-1.0..tar.gz
cd libsodium-1.0./
CFLAGS="-O3 -fPIC" ./configure
make && make install
echo /usr/local/lib > /etc/ld.so.conf.d/usr_local_lib.conf
sudo ldconfig
2、安装dnscrypt-proxy
wget https://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-proxy-1.7.0.tar.gz
tar -xvzf dnscrypt-proxy-1.7..tar.gz
cd dnscrypt-proxy-1.7./src/libevent-modified/
CFLAGS="-O3 -fPIC" ./configure
make && make install
cd ../..
echo /usr/local/lib > /etc/ld.so.conf.d/usr_local_lib.conf
sudo ldconfig
./configure
make -j && make install
3、运行并加入开机自启动
[root@localhost ~]# /usr/local/sbin/dnscrypt-proxy -R yandex -E --local-address=0.0.0.0 -d
[root@localhost ~]# vi /etc/rc.d/rc.local
#添加如下一行
/usr/local/sbin/dnscrypt-proxy -R yandex -E --local-address=0.0.0.0 -d
[root@localhost ~]# chmod +x /etc/rc.d/rc.local
/usr/local/share/dnscrypt-proxy/dnscrypt-resolvers.csv中存放了已经支持dnscrypt查询的公共dns,上边表达式中的“-R yandex”代表的是这个文档中第一列的name。
4、验证
由以下运行结果可以看到,在解析facebook.com这个网址时,本机上的dnscrypt-proxy能够解析正确,而114和8.8解析出来的都是被墙篡改过的IP。
[root@localhost ~]# dig facebook.com +short @114.114.114.114
93.46.8.89
[root@localhost ~]# dig facebook.com +short @8.8.8.8
93.46.8.89
[root@localhost ~]# dig facebook.com +short @8.8.8.8
78.16.49.15
[root@localhost ~]# dig facebook.com +short @127.0.0.1
157.240.3.35
[root@localhost ~]# dig facebook.com +short @127.0.0.1
157.240.3.35
如果想用这个DNS代理的话,只需要将系统的DNS服务器配置为该服务器即可(该服务器上需要开放 UDP:53端口)。当然,以上只解决了DNS解析的问题,“一些设备”还有IP封锁等等机制来过滤相应网站。
Centos7下dnscrypt-proxy安装的更多相关文章
- centos7下使用yum安装mysql
CentOS7的yum源中默认好像是没有mysql的.为了解决这个问题,我们要先下载mysql的repo源. 1. 下载mysql的repo源 wget http://repo.mysql.com/m ...
- [转]Centos7下caffe的安装
Centos7下caffe的安装 原文地址:http://blog.csdn.net/s2392735818/article/details/49796017 版权声明:本文为博主原创文章,未经博 ...
- centos7下搜狗输入法的安装教程
相信用过centos自带的输入法的朋友都会感叹这也实在是太难用了吧,使用拼音打出来的词总是不能在前几个匹配到,即使是一些常用词也是如此,简直无法忍受跟个zz似的.吐槽完了,这里给出centos7下搜狗 ...
- centos7下使用yum安装pip
centos7下使用yum安装pip 首先安装epel扩展源: yum -y install epel-release 更新完成之后,就可安装pip: yum -y install python-pi ...
- Centos7 下的SVN安装与配置
Centos7 下的SVN安装与配置 1.关闭防火墙 临时关闭防火墙 systemctl stop firewalld 永久防火墙开机自关闭 systemctl disable firewalld 临 ...
- CentOS7 下源码安装 python3
CentOS 7 下源码安装 python3 在CentOS7下,默认安装的是python2.7:为满足项目要求,安装python3 的方法如下: 1. 首先安装python3.6可能使用的依 ...
- CentOS7下RabbitMQ服务安装配置
参考文档: CentOS7下RabbitMQ服务安装配置 http://www.linuxidc.com/Linux/2016-03/129557.htm 在linux下安装配置rabbitMQ详细教 ...
- centos7下使用yum安装redis
centos7下使用yum安装Redis 第一步:安装 yum –y install redis 第二步:启动 systemctl start redis.service 第三步:设置开机启动 sys ...
- CentOS7下NFS服务安装及配置固定端口
CentOS7下NFS服务安装及配置 系统环境:CentOS Linux release 7.4.1708 (Core) 3.10.0-693.el7.x86_64 软件版本:nfs-utils-1. ...
- CentOS7下使用YUM安装mariadb10
1:由于centos7 默认使用yum安装MySQL的话就会安装mariadb,只是安装的版本停留在mariadb5.x,版本比较低.如果我们需要安装mariadb10这里就需要删除mariadb-l ...
随机推荐
- Cannot instantiate the type AppiumDriver
I have added following jars in my projects build path: java-client-2.0.0 from http://appium.io/downl ...
- Yii源码阅读笔记(三十五)
Container,用于动态地创建.注入依赖单元,映射依赖关系等功能,减少了许多代码量,降低代码耦合程度,提高项目的可维护性. namespace yii\di; use ReflectionClas ...
- python学习道路(day11note)(协程,同步与异步的性能区别,url爬网页,select,RabbitMq)
1.协程 #协程 又称微线程 是一种用户的轻量级线程 程序级别代码控制 就不用加机器 #不同函数 = 不同任务 A函数切到B函数没有进行cpu级别的切换,而是程序级别的切换就是协程 yelied #单 ...
- Apache2 worker
http://www.php-internals.com/book/?p=chapt08/08-03-zend-thread-safe-in-php 在多线程系统中,进程保留着资源所有权的属性,而多个 ...
- 来回切换页面并关闭其他tab
要下班了,就先把这个方法copy上来.反正自己能看懂. public void checkSchemaDetail(String logext, String expectRes){ String c ...
- LoadRunner函数示例:lr_paramarr_random()
lr_paramarr_random()函数的作用为:从一个参数数组中随机抽取一个值并以字符串形式返回.其使用方式及返回方式如下: char * lr_paramarr_random( const c ...
- hadoop(2014/0619)
map-reduce :分解任务和合并任务的能力 hdfs: namenode and datanode namenode放置元数据 datanoe放置数据
- LeetCode Hamming Distance
原题链接在这里:https://leetcode.com/problems/hamming-distance/ 题目: The Hamming distance between two integer ...
- LeetCode Find All Duplicates in an Array
原题链接在这里:https://leetcode.com/problems/find-all-duplicates-in-an-array/ 题目: Given an array of integer ...
- 使用jsonp跨域请求后可以获得数据,但是进入error方法,返回parseerror
$.ajax({ url:url, dataType:'jsonp', jsonp: 'callback',//回调函数名字 jsonpCallback: 'success_jsonpCallback ...