Publicly available doh servers

 

Who runs it Base URL Comment
Google https://dns.google/dns-query Full RFC 8484 support
Cloudflare https://cloudflare-dns.com/dns-query Supports both -04 and -13 content-types
Quad9 Recommended: https://dns.quad9.net/dns-query 
Secured: https://dns9.quad9.net/dns-query 
Unsecured: https://dns10.quad9.net/dns-query
Secured provides: Security blocklist, DNSSEC, no EDNS Client-Subnet 
Unsecured provides: No security blocklist, no DNSSEC, no EDNS Client-Subnet 
Recommend is currently identical to secure.
CleanBrowsing https://doh.cleanbrowsing.org/doh/family-filter/ anycast DoH server with parental control (restricts access to adult content + enforces safe search)
@chantra https://dns.dnsoverhttps.net/dns-query "toy server" which runs doh-proxy
@jedisct1 https://doh.crypto.sx/dns-query a server which runs another project called doh-proxy, written in Rust.
PowerDNS https://doh.powerdns.org Based on dnsdist-doh branch
blahdns.com Japan: https://doh-jp.blahdns.com/dns-query
Germany: https://doh-de.blahdns.com/dns-query
Run on Go implementation, knot-resolver with DNSSEC and ads block
NekomimiRouter.com https://dns.dns-over-https.com/dns-query Runs Go implementation. Does recursion itself with no upstream servers. Toy server may fail, please report if fails
SecureDNS.eu https://doh.securedns.eu/dns-query No Logging & DNSSEC
Rubyfish.cn https://dns.rubyfish.cn/dns-query East China Zone, Based on https://github.com/m13253/dns-over-https
Commons Host https://commons.host ~20 PoPs worldwide, Node.js/playdohover Knot Resolver.
DnsWarden Adblocking DNS: https://doh.dnswarden.com/adblock 
Uncensored DNS: https://doh.dnswarden.com/uncensored
No query/IP logging with DNSSEC enabled. 
Blocks ads and trackers in Adblocking DNS.
No filtering in Uncensored DNS.
aaflalo.me Server US: https://dns-gcp.aaflalo.me/dns-query 
Server EU: https://dns.aaflalo.me/dns-query
Runs on Star Brilliant's dns-over-https 
Both servers check for DNSSEC and block advertising
Foundation for Applied Privacy https://doh.appliedprivacy.net/query No query/IP logging, no filtering, QNAME minimization, no EDNS client subnet, TLS 1.3, DNSSEC, RFC7706, RFC8198; https://appliedprivacy.net/services/dns/
captnemo.in https://doh.captnemo.in/dns-query Runs dnss with local unbound resolver running DNSCrypt with DNSSEC support as the upstream. Privacy Policy. More details at https://captnemo.in/doh/. No logging or filtering. Runs in Bangalore, India
Tiarap https://doh.tiar.app/dns-query Based in Singapore, No logging, block Ad/Ad-tracking/Malware, No ECS, DNSSEC
DNS.SB https://doh.dns.sb/dns-query No Logging, DNSSEC enabled
FAELIX https://rdns.faelix.net/ No logging, based on dnsdist-doh RC querying our powerdns-recursor resolvers, multiple nodes in UK and CH, more info

Supported in browsers and clients

Name Version Comments
Firefox 62 temporary docs
Bromite 67.0.3396.88 How to enable DoH
curl 7.62.0 See DOH-implementation
OkHttp 3.11 See Providers
curl-doh n/a basic stand-alone DoH client that uses curl
Chrome 66 https://bugs.chromium.org/p/chromium/issues/detail?id=799753

4.2.2.2: The Story Behind a DNS Legend

Chances are that if you're a network operator you know the IP address 4.2.2.2. It's an easy to type and easy to remember address, which since 1998 has been a "beefy" DNS service responding to the public Internet. Since you need DNS before you can use anything other than IP addresses on the Internet, it can come in handy for testing or initial configuration.

Before Google started doing public DNS service on 8.8.8.8, and because 4.2.2.2 is typically pretty fast, many people have used it as their standard DNS server. Since the most basic test of Internet connectivity you can do is to ping an IP address (with DNS disabled), a "ping -n 4.2.2.2" can tell you if your networking problem is at a higher level or a lower level right away.

Is this just an accident, or was this a deliberate choice? Was it intentionally set up as a public DNS service, or an accident. I've wondered this for years. But just recently I was investigating a networking oddness reported by Kyle who uses this, and I decided to try to dig deep and find out the story behind whatI imagine is one of the most famous IP addresses on the public Internet.

Acknowledgements

First of all, I want to make it clear that this story doesn't involve me. I wasn't there, I am only collecting information I have gathered from others who were.

The bulk of this background is thanks to respondants on the NANOG mailing list, in particular John Orthoefer and Tony Tauber for the "I was there" level of information. See the bottom of this story for their words.

If you were involved and have anything further to add to this story, please contact me with more details at jafo@tummy.com.

What is 4.2.2.2?

I'll get to the story in a bit, but first I want to start from the basics. Skip this and the next section if you just want to know the story behind the DNS server.

4.2.2.2 is one of the easiest to type of a collection of 6 DNS servers at 4.2.2.1 through 4.2.2.6 (originally only 1-3). The answer queries made by the general public, which is unusual in the last several years. You see, DNS resolvers can be used to by someone on a fairly slow network line to generate a much larger amount of traffic directed at another location. This is called an "amplifier".

This IP space is currently run by Level 3 (headquartered just down the road from us in Broomfield), and actually is a large number of machines. These machines are spread out over Level 3's network and your closest is located by a mechanism called "Anycast".

John O. in an e-mail says he recalls that originally the intention was to use .1, .2, and then .3 in that order. The .2 IP was just latched onto because it just rolls off the keyboard easier, I suspect.

Should I Use 4.2.2.2?

Unless you are a Level-3 customer, absolutely not. Google now has established public DNS servers at 8.8.8.8 which you should use. 8.8.4.4 can additionally be used, but 8.8.8.8 is pretty easy. :-)

I'll back this up by saying that I never used 4.2.2.2, I can't remember when I've ever used it, even for testing. But, that's easy for me to say; tummy.com has permanent IP space from an allocation back in 1993, and those are IPs I know well. So when I need to test network connectivity, or DNS lookups, I'll use them.

I realize that not everyone has such IPs that are right in mind that they can use for testing. Further, our DNS servers don't answer recursive queries from the public, so if you need a DNS server to load web pages to find out the IP addresses of your ISP's DNS servers, or Google's DNS service, 4.2.2.2 is probably a good choice. It's also a compelling choice if you just need to send out a ping to see if you can reach the Internet, if you don't have IPs you already know like I do.

However, some people set up 4.2.2.[1-6] as their standard DNS servers. Don't do this unless you are connected to Level 3. One story I came across by "chimpoko" is that he called an ISP and they told him to that 4.2.2.2 is their DNS server.

According to Richard Golodner, Cisco support also tells people to use it for testing,

The best reason why not is that Level 3 is under no obligation to provide this service to the public and there are several reports I found that they're trying to discourage people from using it.

Your ISP's DNS servers are the best choice for use as your DNS servers. If you can't do that for some reason (say, they are doing something evil with DNS), using Google's DNS service, or setting up your own recursor (install pdns-recursor and use 127.0.0.1) is a good second choice.

Personally, I set up pdns-recursor on my laptop and my home DHCP/office DHCP servers. At our facility we have several recursors set up with high availability (for speedy lookups even during maintenance) and then a few secondary resolvers in case the primary ones have issues.

Why 4.2.2.2?

This was originally set up at BBN (one of the early Internetworking pioneers) by Brett McCoy and John Orthoefer ("but most of the credit/blame goes to Brett") in 1998.

Because they were early, they got a low starting octet of 4 (0, 1, and 2 were reserved, and 3 was taken by GE (in 1994, I don't know who it was before that). IANA says BBN got 4.0.0.0/8 in December 1992, but John O. (in an e-mail) says he's 99.9% sure they had it before that. Through the years 4/8 has passed around, finally ending up at Level 3. So it starts with 4 because it's easy to remember, and until you can do DNS resolution, all you can use is IP addresses.

When originally set up, they were hoping to put it on 4.4.4.4, because it's simple to remember. 4.0/16 and 4.1/16 were already used. John Hawkinson had set aside 4.2/16 ("under the label "Numerology" since he had the wisdom to see that the numbers in themselves could be valuable").

So they "got/grabbed" the first 3 IP addresses 4.2.2.1 through .3 as DNS servers so there were multiple options in case one was down.

John Orthoefer said they initially had issues with complaints that these DNS servers weren't geographically diverse enough, since they were on the same /24 block of addresses. Anycast wasn't that well known at the time (not that it's exactly a rock star today). The idea that 4.2.2.1 and 4.2.2.2 could be coming from completely different areas was unusual.

How did it get to be so well known?

Despite a message I ran across from someone claiming to be responsible for it's popularity, I'm not sure we can ever really know who was responsible for the spreading of this word. However, it was clearly intended from the beginning to be an easy to remember and type address when this cluster was originally set up for BBN.

Tony Tauber indicates that John Hawkinson was responsible for it being an easy IP. "He really wanted 4.4.4.4." John Orthoefer says that Brett McCoy went looking for an easy to remember IP and that "jhawk" had the superblock reserved.

My opinion is that among the reasons it is so well known are that it was designed from the very beginning to be memorable, and they folks setting up this service had the foresight to realize that having it on an easy IP was valuable. And they were lazy, never underestimate the power of avoiding headaches: "We figured trying to filter it was larger headache than just making it public."

So, a public service with an easy to remember and type IP address, which was then promoted heavily for use within BBN? How could it not spread like wildfire? We system and network admins are, out of necessity, lazy. It's a survival trait, we usually have so much to do that we have to be lazy when we can afford to.

Why was it set up?

John Orthoefer says that it was done as part of the build-out for their ISP branch: BBN Planet. Before that the BBN primary DNS server was NIC.near.net (which "predates [planet] by 10 years"). It was set up as a series of Anycast servers because adding more unicast servers and trying to get customers to switch was "all but impossible".

So that's the story

I hope you enjoyed it as much as I did. Thanks again to John Orthoefer and Tony Tauber for their time in recounting this little bit of history. I urge you to read their messages (linked in the references below) for some more details and stories related to 4.2.2.2.

Contributions

  • John Orthoefer, Tony Tauber, and Richard Golodner for background details in response to my NANOG post.
  • Paul S. R. Chisholm of Google suggested using 8.8.4.4, and testing web connectivity using http://18.62.0.96/. See Testing your new settings for more information.

References

from https://www.tummy.com/articles/famous-dns-server/

JJQQKK上网助手2.40,自带翻墙VPN

JJQQKK上网助手,通过两种方式科学上网:

  • 集成开发版Chrome浏览器(Chromium),内置代理.
  • 自带VPN,启动之后加密所有网络活动.

JJQQKK支持Windows和macOS。

操作系统版本要求:

  • Windows: 32/64位的Windows 10/8/7
  • macOS: 最低要求10.12

下载JJQQKK

Windows安装包

下载地址一

载地址二 

运行msi安装程序,安装之后双击桌面图标,启动程序。

首次使用,请务必安装OpenVPN驱动。每个步骤都采用默认设置即可。

通过桌面任务栏图标操作JJQQKK。

 

macOS安装包

下载地址一

下载地址二

macOS用户安装pkg之后,系统自动运行JJQQKK,通过顶端任务栏图标使用JJQQKK。

关于Chromium浏览器

Chromium是Google為發展自家的瀏覽器Google Chrome而開啟的計畫,以BSD授權條款等數種授權發行並開放原始碼。Chromium与Google Chrome共享大部分程式碼和功能,但功能和商標之間有一些細微差別。

Chromium的更新速度很快,每隔數小時即有新的開發版本發佈,每次的更新幅度不一定相同,可能增加新功能,或者單純修正問題,由於新功能會先 在Chromium上測試,等待認證後才會應用在Google Chrome上,所以Chromium相當於Google Chrome的先行版。

如需手工下载Chromium,请从Releases页面下载最新版本。

避免失联

电邮:hi@jjqqkk.icu

可通过电邮获得最新软件下载地址。

拍照分享

from https://github.com/jjqqkk/chromium

-------

https://github.com/jjqqkk/chromium/releases/download/77.0.3833.0/Chromium-mac-77.0.3833.0.zip

启用iptables后无法解析域名和ping问题的解决

常规情形下,服务器是不会开启iptables的,原因比较简单:一是外部请求需要经过代理或者中转服务器,后端服务器不会直接暴露;二是外层网络安全组已经配置访问规则,安全组正常工作的情况下,iptables的角色重复。

面向终端用户的服务器基本上要求开启iptables。配置过程中就不说被自己踢下去这样的坑了,最近几次遇到的坑是:开启iptables后,无法访问外网,也无法ping通外网,关闭后一切正常。主意到这个现象是半年前在一台服务器上开启iptables,过了几天发现解析域名异常。解析域名问题第一反应当然是排查DNS。经过配置DNS,提工单找技术支持等方案折腾后,某天灵感闪现,上网一查果然是iptables的问题。

本人最常用的iptables配置是这样:

iptables -F
iptables -P INPUT ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p tcp -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp -m multiport --dports 80,443 -j ACCEPT
配置其他规则
iptables -P INPUT DROP

上述配置在不会主动访问外网(需解析域名的)url服务器上没有问题。此时如果在服务器上执行curl www.baidu.com或者ping www.baidu.com,会发现命令卡住无返回。原因在于iptables默认的策略是DROP,解析域名和ping用到的udp和icmp包在iptables中均被丢弃掉了。

解决dns解析的问题,需要加上如下规则:

iptables -A INPUT -p udp --dport 53 -j ACCEPT
iptables -A INPUT -p udp --sport 53 -j ACCEPT

ping通外网,或者让外网ping通,需要加上如下规则:

iptables -A INPUT -p imcp -j ACCEPT

手动释放缓存

 

/proc是一个虚拟文件系统,我们可以通过对它的读写操作做为与kernel实体间进行通信的一种手段。也就是说可以通过修改/proc中的文件,来对当前kernel的行为做出调整。那么我们可以通过调整/proc/sys/vm/drop_caches来释放内存。操作如下:

cat /proc/sys/vm/drop_caches
0
首先,/proc/sys/vm/drop_caches的值,默认为0。

sync
手动执行sync命令(描述:sync 命令运行 sync 子例程。如果必须停止系统,则运行sync 命令以确保文件系统的完整性。sync 命令将所有未写的系统缓冲区写到磁盘中,包含已修改的 i-node、已延迟的块 I/O 和读写映射文件)

echo 3 > /proc/sys/vm/drop_caches
# cat /proc/sys/vm/drop_caches

3.
将/proc/sys/vm/drop_caches值设为3

# free -m
total used free shared buffers cached
Mem: 249 66 182 0 0 11
-/+ buffers/cache: 55 194
Swap: 511 0 511

再来运行free命令,会发现现在的used为66MB,free为182MB,buffers为0MB,cached为11MB。那么有效的释放了buffer和cache。

有关/proc/sys/vm/drop_caches的用法在下面进行了说明
/proc/sys/vm/drop_caches (since Linux 2.6.16)
Writing to this file causes the kernel to drop clean caches,dentries and inodes from memory, causing that memory to become free.
To free pagecache, use echo 1 > /proc/sys/vm/drop_caches;
to free dentries and inodes, use echo 2 > /proc/sys/vm/drop_caches;
to free pagecache, dentries and inodes, use echo 3 > /proc/sys/vm/drop_caches.
Because this is a non-destructive operation and dirty objects are not freeable, the user should run sync first.

三、我的意见
上述文章就长期以来很多用户对Linux内存管理方面的疑问,给出了一个比较“直观”的回复,我更觉得有点像是核心开发小组的妥协。对于是否需要使用这个值,或向用户提及这个值,我是有保留意见的:

  • man可以看到,这值从2.6.16以后的核心版本才提供,也就是老版的操作系统,如红旗DC 5.0、RHEL 4.x之前的版本都没有;
  • 若对于系统内存是否够用的观察,我还是原意去看swap的使用率和si/so两个值的大小;

用户常见的疑问是,为什么free这么小,是否关闭应用后内存没有释放?但实际上,我们都知道这是因为Linux对内存的管理与Windows不同,free小并不是说内存不够用了,应该看的是free的第二行最后一个值:-/+ buffers/cache: 58 191,这才是系统可用的内存大小。

实际项目中告诉我们,如果因为是应用有像内存泄露、溢出的问题,从swap的使用情况是可以比较快速可以判断的,但free上面反而比较难查看。相反,如果在这个时候,我们告诉用户,修改系统的一个值,“可以”释放内存,free就大了。用户会怎么想?不会觉得操作系统“有问题”吗?所以说,我觉得既然核心是可以快速清空buffer或cache,也不难做到(这从上面的操作中可以明显看到),但核心并没有这样做(默认值是0),我们就不应该随便去改变它。一般情况下,应用在系统上稳定运行了,free值也会保持在一个稳定值的,虽然看上去可能比较小。

当发生内存不足、应用获取不到可用内存、OOM错误等问题时,还是更应该去分析应用方面的原因,如用户量太大导致内存不足、发生应用内存溢出等情况,否则,清空buffer,强制腾出free的大小,可能只是把问题给暂时屏蔽了。

我觉得,排除内存不足的情况外,除非是在软件开发阶段,需要临时清掉buffer,以判断应用的内存使用情况;或应用已经不再提供支持,即使应用对内存的时候确实有问题,而且无法避免的情况下,才考虑定时清空buffer。(可惜,这样的应用通常都是运行在老的操作系统版本上,上面的操作也解决不了)。而生产环境下的服务器可以不考虑手工释放内存,这样会带来更多的问题。记住内存是拿来用的,不是拿来看的。不像windows。

无论你的真实物理内存有多少,他都要拿硬盘交换文件来读。这也就是windows为什么常常提示虚拟空间不足的原因,你们想想多无聊,在内存还有大部分的时候,拿出一部分硬盘空间来充当内存。硬盘怎么会快过内存,所以我们看linux,只要不用swap的交换空间,就不用担心自己的内存太少。如果常常swap用很多,可能你就要考虑加物理内存了,这也是linux看内存是否够用的标准哦。当然这仅代表我个人意见,也欢迎大家来交流讨论。

下面是一个内存释放的脚本,分享给大家:
# vim /root/satools/freemem.sh

将脚本添加到crond任务,定时执行。
# echo “*/30 * * * * root /root/satools/freemem.sh” >> /etc/crondtab

使用 InstantClick 加速网站访问速度

InstantClick是一个JavaScript库,可以显着加快您的网站速度,在大多数情况下可以有效地实现导航。

为什么使用InstantClick

  • 尽管现代互联网的带宽很大,但网站的速度并不快,这是因为加载网页的最大瓶颈就是延迟。

它是如何工作的

  • 今天的互联网架构延迟是不可避免的,所以 InstantClick 通过预加载你可能点击的链接来尽可能缩短所需要的时间。
  • 在访问者点击链接之前,他们将鼠标悬停在该链接上。在这两个事件之间,通常经过200毫秒到300毫秒(在这里自己测试)。InstantClick利用该时间来预加载页面,以便在您单击时页面已经存在。
  • 在移动设备上,预加载从“touchstart”开始,让300毫秒(Android)到450毫秒(iOS)预加载页面。

如何使用

  ······
  <!-- 引入 InstantClick -->
  <script src="instantclick.min.js" data-no-instant></script>
  <script data-no-instant>InstantClick.init();</script>
  <!-- 到这里结束 -->
  </body>
  </html>
  • 然后就可以开始体验超快的网站访问速度了。

以上就是使用 InstantClick 让网站访问更快的食用方法啦。

用 PHP实现的dns,LibDNS

DNS implementation in pure PHP.

LibDNS

DNS protocol implementation in pure PHP

Status

This library is currently undergoing a ground-up rewrite. The old codebase has been archive to the 2.x branch. The current master is version 3, a completely new API which is simpler and should be easier to work with, as well as improving performance and extensibility. V3 also includes much more complete list of IANA-registered record types, classes and other elements.

The v3 API has now largely stabilised and work on migrating to the new API is encouraged as soon as possible. It is unlikely there will be any more releases from the 2.x branch.

A migration guide will be produced in line with the first RC, but the code in the examples directory can be used to infer most of the required changes.

from https://github.com/DaveRandom/LibDNS