Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux-Centos7 DNS separate resolution (wide area network and local area network with different addresses of the same domain name)

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

DNS separation parsing comprehension diagram and experimental diagram

Linux can only be used as a gateway for separation and resolution.

External wide area network area

Area Analysis of Internal Local area Network

Parse the same domain name to get different addresses according to visitors from different regions

NAT address translation

My private address is translated by making a label port.

Cheng public network address, which is used by all our own hosts.

The public network address can go out, but how can you tell which host to give when you come back?

PAT mode is a mode of address translation, port ~ ~

1. We are a simulation experiment, we need VM virtual machine, Centos7, two hosts, one win10-1 as the host of the wide area network, and one win10-2 as the host of the area network. Add a network card to Centos7 and set it to host-only mode

3. Check whether the network card is on, and set the VMnet8 network card to host-only mode.

4. Set the other two hosts to host-only mode

5. Restart our host and check to see if there is this newly added network card

6. Remember to restart our two hosts and Centos77. Enter our ens33 network card to modify the configuration information

8. Enter the ens36 in the newly added network card we just added

Delete the mac address and change it to the public network address 12.0.0.1

9. Restart the network service to view the Nic information

Systemctl restrt network

10. Set the ip address and default gateway for win10-1

11. Set the ip address and default gateway for win10-2

twelve。 Test internal URLs with ping in win10-1 and external URLs with ping in win10-2

13. To Centos7 configuration master profile

Vim / etc/named.conf

14. Configure the zone data profile (pay attention to the format)

Vim / etc/named.rfc1912.zones

After the configuration is complete, delete the root domain server parsing code of the main configuration file. 15. Configure the data area data profile

Cd / var/named

Cp-p named.localhost kgc.com.lan

Vim kgc.com.lan

16. Configure the second data zone data profile

Cp-p kgc.com.lan kgc.com.wan

Vim kgc.com.wan

17. Turn off the firewall, turn off the enhancements, turn on the service, and view the service status

18. Can the host to the win 10-1 LAN resolve to the address?

19. Can the host to the win 10-2 wide area network resolve to the address

That's all we have. Thank you for watching.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report