In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
The purpose of the experiment is to get different addresses by resolving the same domain name according to visitors from different regions.
Lab Environment Preparation in VMware:
1. Linux as the gateway is the premise (a CentOS is required) 2. The domain name resolution host of the internal local area network is WIN7 -13. The domain name resolution host of the external wide area network is WIN7 -2.
CentOS 7 as a gateway requires two network cards (one internal and one external)
The procedure is as follows: Open CentOS 7 in VMware. First, right-click on the main interface and select Open Terminal. Enter: yum install bind -y.(You need to install this service first in the networked state here) Right-click the network adapter in the lower right corner, select Settings, click Add Network Adapter, then select Host-only mode for both network cards, return to the terminal interface and enter: init6 (restart to identify the two network cards, in case of problems with the service startup later) After booting again, enter the terminal interface and enter: ifconfig (you can see two network cards ens33 and ens36 at this time)
In the experiment, we use ens33 as the internal network card and ens36 as the external network card.
First configure the network card ens33 Input: cd /etc/sysconfig/network-scripts Input: ls (see the configuration file of ens33 network card) Input: vim ifcfg-ens33 (configure the network card) Specific modifications are as follows:
After modification, press Esc to exit insertion mode Input: wq (Save Exit)
Because the newly added ENS36 NIC does not have a configuration file, we need to copy the ENS33 NIC configuration file in this directory and name it ENS36, and then configure it
Input: cp -p ifcfg-ens33 ifcfg-ens36 (copy ens33 configuration file and name ens36) Input: vim ifcfg-ens36 (modify ens36 network card configuration file) Specific modifications are shown in the following figure:
After modification, press Esc to exit insertion mode Input: wq (save exit) Input: service network restart (restart network service) Input: ifconfig (check network card, at this time two network card IP has been configured successfully)
In WIN 7-1, go to Network Center and change the network adapter settings IPv4:
IP address: 192.168.100.100 Subnet mask: 255.255.255.0 Default gateway: 192.168.100.1 DNS resolution address: 192.168.100.1 Click OK to exit, and a connection prompt will pop up automatically, indicating that the configuration is successful.
In WIN 7-2, go to Network Center and change the network adapter settings IPv4:
IP address: 12.0.0.12 Subnet mask: 255.0.0.0 Default gateway: 12.0.0.1 DNS resolution address: 12.0.0.1 Click OK to exit. At this time, a connection prompt will pop up automatically, indicating that the configuration is successful.
Enter ping 12.0.0.1 in WIN7 -1, which can be pinged directly. Enter ping 192.168.100.1 in WIN7 -2, which can also be pinged directly.
At this point, keep both sides ping.
Back to CentOS 7:
Input: vim /etc/named.conf (modify the main configuration file) Listen to all addresses, listen to all network cards in braces after port 53, change to any in braces after allow-query Input: wq (save exit)
The following root domain servers that begin with "zone" in this configuration file need to be followed
It contains the "named.ca" zone data profile
Input: cd /var/named/(enter this directory) Input: ls (see details) Input: vim /etc/named.rfc1912.zones (modify the zone configuration file) Write as follows:
Input: wq (save exit), which includes: 1. match network segment host for communication 2. zone data configuration file indicates resolution 3. root resolution Input: cp-p named. localhostkgc.com.lan Input: vim kgc.com.lan Input: wq (save exit) Modify the content as follows:
Input: cp -p kgc.com.lan kgc.com.wan Input: vim kgc.com.wan Input: wq (save exit) Modify content as shown in the following figure:
Input: systemctl start named Input: systemctl status named
Input: systemctl stop firewall.service Input: setenforce 0
local area network host WIN7-1 domain name resolution steps are as follows:
Enter: nslookup www.kgc.com Get: 192.168.100.88 Enter: nslookup smtp.kgc.com Get: 192.168.100.99
WAN host WIN7-2 domain name resolution steps are as follows:
Enter: nslookup www.kgc.com Get: 12.0.0.1 Enter: nslookup smtp.kgc.com Get: 12.0.0.1
Summary: 1. The final result of the experiment is: different IPs are resolved for the same domain name, which is separation resolution. 2. The host of the WAN does not know the private network address in the local area network, but the private network address in the local area network can be directly seen.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.