markdown 建立结 - 旋转变压器上,Ubuntu的18.04

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 建立结 - 旋转变压器上,Ubuntu的18.04相关的知识,希望对你有一定的参考价值。

## Latest 2.4.0
```
https://software.opensuse.org//download.html?project=home%3ACZ-NIC%3Aknot-resolver-latest&package=knot-resolver
```



## Go to this site first

Source: https://software.opensuse.org//download.html?project=home%3ACZ-NIC%3Aknot-resolver-latest&package=knot-resolver

```
sh -c "echo 'deb http://download.opensuse.org/repositories/home:/CZ-NIC:/knot-resolver-latest/xUbuntu_18.04/ /' > /etc/apt/sources.list.d/home:CZ-NIC:knot-resolver-latest.list"

wget -nv https://download.opensuse.org/repositories/home:CZ-NIC:knot-resolver-latest/xUbuntu_18.04/Release.key -O Release.key

apt-key add - < Release.key

apt-get update -y 
apt-get install knot-resolver

```

## Edit /etc/knot-resolver/kresd.conf

```
-- vim:syntax=lua:
-- Refer to manual: http://knot-resolver.readthedocs.org/en/latest/daemon.html#configuration

-- Load useful modules
modules = {
	'policy',   -- Block queries to local zones/bad sites
	'hints',    -- Load /etc/hosts and allow custom root hints
	'stats',    -- Track internal statistics
	'predict',  -- Prefetch expiring/frequent records
	'daf'
}

-- See kresd.systemd(7) about configuring network interfaces when using systemd
-- Listen on localhost (default)


-- net = { net.ens160 }
net.tls('/etc/letsencrypt/live/dns.jp.blahdns.com/fullchain.pem','/etc/letsencrypt/live/dns.jp.blahdns.com/privkey.pem')
net.listen('::', 853)
net.listen('0.0.0.0', 853)


-- Cache size
cache.size = 100 * MB

daf.add 'src = 0.0.0.0/24 forward 127.0.0.1@53'

policy.add(policy.all(policy.STUB('127.0.0.1')))

--Disallow ANY queries
 policy.add(function (req, query)
        if query.stype == kres.type.ANY then
                return policy.DROP
        end
 end)

-- Prefetch learning (20-minute blocks over 24 hours)
predict.config (20, 72)


```
## Open port in iptables or ufw
* allow port tcp 853 by default

## Start the service
```
/usr/sbin/kresd -c /etc/knot-resolver/kresd.conf
```

> Credit: made by @ookangzheng @blahdns.com

以上是关于markdown 建立结 - 旋转变压器上,Ubuntu的18.04的主要内容,如果未能解决你的问题,请参考以下文章

永磁同步电机关注重点

与科学记数法 kableExtra table R markdown html 结合时,十进制后的数字不一致

markdown 甜甜圈旋转器

markdown 将旋转器与覆盖层结合在一起

变压器容量,KVA和KW的区别

电源硬件设计----电源基础知识