当前位置:网站首页>"Play with Lighthouse" lightweight application server self built DNS resolution server
"Play with Lighthouse" lightweight application server self built DNS resolution server
2022-04-23 13:06:00 【you and me】
Abstract
Recently bought several lightweight application servers , I don't know what to do , Just build your own DNS Parse the server .
build DNS Resolution server , Not belong DNS The server : such as 114.114.114.114 What? , It's a server that can help you resolve your domain name .
Text
One 、 Buy a lightweight application server and install centos7 operating system
To configure
1. First we need to install bind
yum -y install bind*
2. Modify master profile
cp /etc/named.conf /etc/named.conf.bak # Backup , Generally, backup is not required
nano /etc/named.conf
It is amended as follows :
options {
listen-on port 53 { any; }; // Listen on the host 53 On port .any On behalf of listening to all hosts
directory "/var/named"; // If there is a standard to positive and negative solution at the bottom of this file zone file File name , Which directory should the file name be placed in
// The following three items are statistics about the service
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { any; }; // Who can treat my DNS The server makes a query request .any On behalf of anyone
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
forwarders { // Designated upper level DNS The server
192.168.1.1;
};
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
3. Custom domain name resolution configuration
nano /etc/named.rfc1912.zones
# Add the following... On the last side , For example, I want to analyze miku.cool And all subdomains
zone "miku.cool" IN { // Define the primary domain name to be resolved
type master;
file "miku.cool.zone"; // The specific configuration files related to resolution are saved in /var/named/miku.cool.zone In file
};
4. Customize miku.cool.zone file
nano /var/named/miku.cool.zone
# Add the following
$TTL 86400
@ IN SOA ns1.miku.cool. root (
1 ; serial
1D ; refresh
1H ; retry
1W ; expire
0 ) ; minimum
@ IN NS ns1.miku.cool.
ns IN A 192.168.1.1
www IN A 192.168.1.113
among ns1.miku.cool It is the present. DNS Name of the server . therefore ns1.miku.cool Be sure to resolve to itself .
www IN A 192.138.1.113 // Delegate www.miku.cool Resolved to 192.168.1.113 Server . hold www Switch to @ Is to resolve to miku.cool, Other similar .
5. Modify the permissions
chown root:named /var/named/miku.cool.zone # This step must be done
6. Restart the service
service named restart
# perhaps
systemctl restart named.service
Add domain name resolution
If we need to add a domain name resolution , such as miku.city, be :
nano /etc/named.rfc1912.zones
// Add the following paragraph
zone "miku.city" IN {
type master;
file "miku.city.zone";
};
cp -a miku.cool.zone miku.city.zone
nano miku.city.zone
// Replaced by the following , Because of us ns1.miku.cool It is already our parsing server , So there's no need to modify
$TTL 86400
@ IN SOA ns1.miku.cool. root (
1 ; serial
1D ; refresh
1H ; retry
1W ; expire
0 ) ; minimum
@ IN NS ns1.miku.cool.
ns IN A 192.168.1.1
www IN A 192.168.1.114
@ IN A 192.168.1.114
After configuration, restart the service
service named restart
# perhaps
systemctl restart named.service
Be careful : If there's a problem, close it selinux, Then firewall rules or something
The end
The above is all self built DNS Parse the contents of the server , Welcome friends to exchange and discuss .
版权声明
本文为[you and me]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231300586940.html
边栏推荐
- SQL exercise question 1
- MySQL -- 16. Data structure of index
- Teach you to quickly develop a werewolf killing wechat applet (with source code)
- 进程虚拟地址空间区域划分
- Wonderful review | the sixth issue of "source" - open source economy and industrial investment
- Community version Alibaba MQ ordinary message sending subscription demo
- Subscribe to Alibaba demo send business messages
- Packet capturing and sorting -- TCP protocol [8]
- Navicat远程连接数据库 出现 1130- Host xxx is not allowed to connect to this MySQL server错误
- HQL find the maximum value in a range
猜你喜欢
There is no need to crack the markdown editing tool typora
About the 'enum' enumeration type and structure.
The quill editor image zooms, multiple rich text boxes are used on one page, and the quill editor upload image address is the server address
Servlet监听器&过滤器介绍
Mysql8 installation
The El table horizontal scroll bar is fixed at the bottom of the visual window
AUTOSAR from introduction to mastery 100 lectures (51) - AUTOSAR network management
Summary of JVM knowledge points - continuously updated
Kernel error: no rule to make target 'Debian / canonical certs pem‘, needed by ‘certs/x509_ certificate_ list‘
Free and open source charging pile Internet of things cloud platform
随机推荐
STM32 is connected to the motor drive, the DuPont line supplies power, and then the back burning problem
The El table horizontal scroll bar is fixed at the bottom of the visual window
pyqt5 将opencv图片存入内置SQLlite数据库,并查询
AUTOSAR from introduction to mastery 100 lectures (51) - AUTOSAR network management
HQL statement tuning
Translation of attention in natural language processing
31. Next arrangement
nodeJs + websocket 循环小案例
Timing role in the project
初鉴canvas,展示个小小的小案例
AUTOSAR from introduction to mastery 100 lectures (52) - diagnosis and communication management function unit
Common problems of unity (1)
Byte jump 2020 autumn recruitment programming question: quickly find your own ranking according to the job number
[Technical Specification]: how to write technical documents?
Pyqt5 store opencv pictures into the built-in sqllite database and query
World Book Day: I'd like to recommend these books
Summary of JVM knowledge points - continuously updated
These vscode extensions are my favorite
Proteus 8.10 installation problem (personal test is stable and does not flash back!)
Wu Enda's programming assignment - logistic regression with a neural network mindset