前言

感觉像打游戏这样
慢慢把技能点点亮了
但是自己又有点执念
觉得只信任自己掌握的东西

前期准备

  1. 一台具有固定公网 IPVPS

  2. 一个域名

域名解析

  • VPS 必须放通 UDP/53 端口

进入你的域名管理后台设置域名指向

类型 名称 地址
A log VPS 主机 IP 地址
NS dnslog dnslog.domain.site

DNSLog-GO

项目地址

感谢lanyi1998大佬的项目

1
https://github.com/lanyi1998/DNSlog-GO

下载项目

  • VPS 基本上都是 Linux
1
2
3
4
# 拉取项目
wget https://github.com/lanyi1998/DNSlog-GO/releases/download/1.5.6/dnslog-linux.zip
# 解压项目
unzip ./dnslog-linux.zip -d ./dnslog

编辑配置文件

1
2
cd ./dnslog
sudo vim ./config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
HTTP:
# Http Web 监听端口
port: 8080
# {"token":"用户对应子域名"} [以,进行分割]
# 用户 admin 对应的 dnslog 子域名是 admin.domain.site
user: { "admin": "admin" }
# 是否关闭 Web 页面
consoleDisable: false

Dns:
# 自建 DNSLog 域名
domain: domain.site

启动 DNSLog

1
2
3
4
# 设置后台运行
screen -S dnslog
# 启动 DNSLog
sudo ./dnslog-linux

搭建成功

  1. 关闭 Ubuntu 自启 DNS 服务之后
  2. 登录 http://[VPS_IP地址]:[DNSLog_服务端口]
  3. 输入 DNSLog Token 进行登录

参加 & 引用

https://blog.csdn.net/qq_32262243/article/details/131726465
https://github.com/lanyi1998/DNSlog-GO
https://www.sklinux.com/posts/devops/ubuntu默认dns端口/