如何建立在C / C自定义简单的DNS服务器++ [英] How to Build a custom simple DNS server in C/C++

查看:148
本文介绍了如何建立在C / C自定义简单的DNS服务器++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要建立在C / C自定义简单的非授权缓存DNS服务器++。任何指导?链接?样品?
谢谢!

I need to build a custom simple non-authoritative caching DNS server in C/C++. Any guidance? Links? Samples? Thanks!

推荐答案

有作为一个简单的cacheing DNS服务器没有这样的事,特别是如果你想体面的安全性。最近的DNS攻击表明,在递归DNS服务器cacheing功能特别容易受到伤害。

There's no such thing as a "simple" cacheing DNS server, particularly if you want decent security. Recent DNS attacks have shown that the cacheing function in recursive DNS servers is particularly vulnerable.

重新评价你是否真的需要自己的地方cacheing。如果不这样做,你可能过修改现有的DNS代理code(如的dnsmasq')更好。

Re-evaluate whether you actually need local cacheing of your own. If you don't, you're probably better off modifying existing DNS proxy code (such as 'dnsmasq').

如果你想推出自己动手,也有不错的库,如 LDNS 可以提供访问底层的DNS数据包。

If you do want to roll-your-own, there are good libraries such as ldns which can provide the access to the underlying DNS packets.

我用 LDNS 自己连同的libevent 来实现我在前面提到的起毛DNS服务器问题。

I'm using ldns myself in conjunction with libevent to implement the Fuzzing DNS server I mentioned in an earlier question.

这篇关于如何建立在C / C自定义简单的DNS服务器++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆