当前位置:网站首页>DNS Service Setup
DNS Service Setup
2022-06-23 02:45:00 【buiu】
Environmental Science
centos7
Expected results
dns The server : 10.122.1.84
Allow the requested scope : 10.122.0.0/16
build dns service
Installation services
yum -y install bind yum -y install bind-utils
Edit profile
vim /etc/named.conf
options {
listen-on port 53 { 10.122.1.84; };
//listen-on-v6 port 53 { 10.122.1.84; };
directory "/var/named"; # Address file location
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";
recursing-file "/var/named/data/named.recursing";
secroots-file "/var/named/data/named.secroots";
allow-query { 10.122.0.0/16; };
.......
.......
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";named-checkconf Confirm the configuration file syntax
If you want to do some website assignments , Add a new configuration file and add it in /etc/named.rfc1912.zones Import , Or not
vim /etc/named.rfc1912.zones # Because the main configuration file is for /etc/named.rfc1912.zones the include, So you can make additional configuration here , You can also edit in the new configuration file and then in the main configuration file include
zone "hello.com" IN{ # Forward configuration
type master;
file "hello.com.zone";
allow-update{none;};
};
zone "1.122.10.in-addr.arpa" IN { # Reverse configuration
type master;
file "hello.com.local";
allow-update{none;};
};
cd /var/named
cp -p named.localhost hello.com.zone
vim hello.com.zone
$TTL 1D
@ IN SOA @ rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 10.122.1.85
www IN A 10.122.1.85 # take www.hello.com Point to 10.122.1.85
ftp IN A 10.122.1.85 # take ftp.hello.com Point to 10.122.1.85
AAAA ::1
cp -p hello.com.zone hello.com.local
vim hello.com.local
$TTL 1D
@ IN SOA @ rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 10.122.1.84
85 IN PTR www.hello.com # take 10.122.1.85 Point to www.hello.com
AAAA ::1
systemctl restart named- Client test
- modify /etc/resolv.conf Do a temporary test
- Test forward and reverse dns
[email protected] ~# nslookup 10.122.1.85 85.1.122.10.in-addr.arpa name = www.hello.com.1.122.10.in-addr.arpa. [email protected] ~# nslookup www.hello.com Server: 10.122.1.84 Address: 10.122.1.84#53 Name: www.hello.com Address: 10.122.1.85
utilize ansible Batch modify the network card configuration so that dns Completion and effectiveness
ansible all -m lineinfile -a 'path=/etc/sysconfig/network-scripts/ifcfg-ens192 regexp=^DNS1 line="DNS1=10.122.1.84"' ansible all -m shell -a 'systemctl restart network'
边栏推荐
- method
- For Xiaobai who just learned to crawl, you can understand it after reading it
- Push RTMP stream using ffmpeg
- Optimization method of live weak network
- Delta oscillation in EEG
- Ansible practice of Nepal graph
- Goframe framework (RK boot): Based on cloud native environment, distinguish configuration files (config)
- February 2, 2022: the closest binary search tree value II. Given a non empty two
- Application and challenge of ten billion level map data in Kwai security intelligence
- How does the easyplayer streaming video player set up tiling?
猜你喜欢

Interviewer: what is the difference between SSH and SSM frameworks? How to choose??

C language series - Section 4 - arrays

Docker installs mysql5.7 and mounts the configuration file

Reptile lesson 1

Soft exam information system project manager_ Information system comprehensive testing and management - Senior Information System Project Manager of soft test 027

How to design API return codes (error codes)?

Application and challenge of ten billion level map data in Kwai security intelligence

Quick sorting C language code + auxiliary diagram + Notes

Vulnhub DC-5

5g spectrum
随机推荐
Salesforce fileUpload (I) how to configure the file upload function
How to make a borrowing card
6. template for integer and real number dichotomy
How to make word notes beautiful
Easygbs adds websocket message push, which can quickly locate video playback faults
Get the structure of the class through reflection, little chestnut
An article shows you the difference between high fidelity and low fidelity prototypes
[data preparation and Feature Engineering] perceived data
[target tracking] open source | polytrack: use boundary polygons to quickly track and segment multiple targets, instead of bounding box and mask tracking
Performance test -- Jenkins environment construction for 15jmeter performance test
Microservice Optimization: internal communication of microservices using grpc
HTTP cache
Unity official case nightmare shooter development summary < I > realization of the role's attack function
Detailed explanation of online reputation management
2021-11-11
Custom shapes for ugui skill learning
Supervisor multi process management exception automatic restart visual management
862. triple sorting
Push RTMP stream using ffmpeg
Deep learning environment configuration (I) installation of CUDA and cudnn