当前位置:网站首页>Detailed explanation of the implementation method of DNS separation and resolution
Detailed explanation of the implementation method of DNS separation and resolution
2022-07-25 11:21:00 【Brother Xing plays with the clouds】
DNS Separation analysis of , It refers to providing different domain name resolution records according to different clients . When clients from different addresses request to resolve the same domain name , Provide different parsing results . That is, when internal and external customers request to access the same domain name , Can resolve different IP Address , Load balancing .
Experimental environment :
DNS The server :RedHat 6.5 System Extranet IP The address is 12.0.0.1 Intranet IP The address is 192.168.10.1 Intranet clients :Windows 7 System IP The address is 192.168.10.10 Internet clients :Windows 7 System IP The address is 12.0.0.10
The premise of the experiment :DNS The server Dual network cards are required , install bind Software
The system installs a network card by default , Add another network card , use ifconfig Command view
Restart network service
ifconfig Command to view intranet and Intranet IP Set up
Yum install bind Software
The experimental steps :
The first 1 Step : modify bind The main configuration file of the service program (/etc/named.conf)
Set the listening port and allow query host parameters to any. Because of the configuration DNS The implementation method of separation and parsing is explained in detail Function and DNS There is a conflict in the root server configuration parameters , You need to delete the root domain information .
vim /etc/named.conf # Edit the main configuration file options { listen-on port 53 { any; }; # Set listening address and port listen-on-v6 port 53 { ::1; }; directory "/var/named"; 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; }; # Allow to use DNS Address of service recursion yes;
-
zone "." IN { # Delete the root domain information type hint; file "named.ca"; };
The first 2 Step : Edit area profile (/etc/named.rfc1912.zone)
Because the area profile is enabled differently for different client addresses zone Zone setup , Use separate data files , So clear the original data in the configuration file .
The main use of “” Configuration statements and ” configuration option , According to different client addresses “benet.com” The query of the domain corresponds to different data files , Thus different analytical results are obtained .
The first 3 Step : Create regional data configuration file (/var/named)
Create two different regional data files through template files , Corresponding to the client domain name request of Intranet and Intranet , The name should be consistent with the name specified in the area configuration file above .
cd /var/named # Toggle directory
cp -p named.localhost benet.com.zone.lan # Preserve the properties of the file , Establish intranet user data file
cp -p named.localhost benet.com.zone.wan # Preserve the properties of the file , Establish an external user data file vim /var/named/benet.com.zone.lan # Edit intranet user data file
$TTL 1D
@ IN SOA benet.com. admin.benet.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS benet.com.
A 192.168.10.1 # Server intranet IP Address
www IN A 192.168.10.80 # Intranet address record (www.benet.com)
mail IN A 192.168.10.25 # Intranet address record (mail.benet.com)vim benet.com.zone.wan # Edit Internet user data file
$TTL 1D
@ IN SOA benet.com. admin.benet.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS benet.com.
A 12.0.0.1 # Server extranet IP Address
www IN A 12.0.0.20 # Internet address record (www.benet.com)
mail IN A 12.0.0.45 # Internet address record (mail.benet.com)The first 4 Step : start-up named service
service named startThe first 5 Step : Turn off the firewall
service iptables stopThe first 6 Step : The verification results
The intranet client will DNS The address is set to the intranet of the server IP, The Internet client will DNS Set the address to the external network of the server IP, And then use nslookup Command to resolve the domain name .
边栏推荐
- HCIA experiment (10) nat
- 上周热点回顾(7.18-7.24)
- PostgreSQL stepping on the pit | error: operator does not exist: UUID = character varying
- 【flask高级】结合源码详解flask的运行机制(出入栈)
- Learn NLP with Transformer (Chapter 2)
- I, AI doctoral student, online crowdfunding research topic
- 让运动自然发生,FITURE打造全新生活方式
- Nowcodertop7-11 - continuous updating
- Hcip experiment (02)
- Signal integrity (SI) power integrity (PI) learning notes (XXXIV) 100 rules of thumb for estimating signal integrity effects
猜你喜欢
Learn NLP with Transformer (Chapter 3)

同事看了我的代码惊呼:居然是这么在Unity中用单例的

Reinforcement Learning 强化学习(三)

Reinforcement learning (III)
![[flask advanced] deeply understand the application context and request context of flask from the source code](/img/67/88c21967da28d09694568ebdaae44c.png)
[flask advanced] deeply understand the application context and request context of flask from the source code

企业实践开源的动机

Redis sentry, high availability executor

Reinforcement Learning 强化学习(四)

【flask高级】从源码深入理解flask的应用上下文和请求上下文

SQL语言(三)
随机推荐
【高并发】如何实现亿级流量下的分布式限流?这些理论你必须掌握!!
SQL语言(六)
SQL语言(一)
A troubleshooting record of DirectShow playback problems
[树] 100. 相同的树
HCIA experiment (09)
【Servlet】请求的解析
The University of Gottingen proposed clipseg: a model that can perform three segmentation tasks simultaneously using text and image prompts
HDD杭州站全程体验有感
Google Earth engine -- Statistics on the frequency of land classification year by year
Understand the life cycle and route jump of small programs
倍增Floyd「建议收藏」
HCIP (01)
How to optimize the performance when the interface traffic increases suddenly?
HCIA experiment (06)
BeautifulSoup的一些用法
Openstack skyline component installation
Learn NLP with Transformer (Chapter 2)
HCIA experiment (08)
Some usages of beautifulsoup