git源:
1 |
https://github.com/Corollarium/localtls |
安装主要依赖和插件我是centos7
1 2 3 |
apt install mosh python3-pip certbot pip3 install dnslib cherrypy |
1.Running the DNS server
1 |
python3 dnsserver.py --domain 9l988.com --soa-master=dns11.hichina.com --soa-email=tuobalongshen@126.com --ns-servers=dns11.hichina.com,dns12.hichina.com --log-level ERROR --http-port 80 --http-index /somewhere/index.html |

测试
1 2 3 4 5 |
dig @localhost +nocmd 192-168-66-183.9l988.com ANY +multiline +noall +answer root@ubuntu:~# dig @localhost +nocmd 192-168-66-183.9l988.com ANY +multiline +noall +answer 192-168-66-183.9l988.com. 86400 IN A 192.168.66.183 root@ubuntu:~# |
2.Slave ns
1 |
python3 dnsserver.py --domain 9l988.com --soa-master=dns11.hichina.com --soa-email=tuobalongshen@126.com --ns-servers=dns11.hichina.com,dns12.hichina.com --log-level ERROR --domain-ipv4=192.168.66.198 --domain-ipv6=192.168.66.198 |

续订密钥
根据Let’s Encrypt的建议,您应该每月更新一次密钥。使用适当的域运行此命令:
1 2 |
#为通配符泛域名生成证书(wildcard) python3 certbotdns.py wildcard yourdomain.net email@yourdomain.net |
如果您希望为单个域生成证书
1 |
python3 certbotdns.py naked yourdomain.net email@yourdomain.net |
定时任务更新证书
1 2 3 4 5 |
这是一个cron行,每月运行一次: 0 0 1 * * python3 /path/to/certbotdns.py wildcard yourdomain.net email@yourdomain.net 0 0 1 * * python3 /path/to/certbotdns.py naked yourdomain.net email@yourdomain.net |
1 |
- 本文固定链接: https://www.yoyoask.com/?p=4644
- 转载请注明: shooter 于 SHOOTER 发表