• DNS解析工具使用案例


             DNS解析工具使用案例

                                   作者:尹正杰 

    版权声明:原创作品,谢绝转载!否则将追究法律责任。

    一.Windows操作系统下是有DNS缓存记录的

    1>.查看本地的DNS缓存信息

    ipconfig /displaydns

    2>.清空DNS缓存记录

    ipconfig /flushdns

    二.whois查询工具

    1>.在CentOS操作系统下安装

    [root@k8s101.yinzhengjie.com ~]# yum -y install whois
    已加载插件:fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirrors.huaweicloud.com
     * extras: mirrors.bfsu.edu.cn
     * updates: mirrors.huaweicloud.com
    base                                                                                                                                                        | 3.6 kB  00:00:00     
    extras                                                                                                                                                      | 2.9 kB  00:00:00     
    updates                                                                                                                                                     | 2.9 kB  00:00:00     
    正在解决依赖关系
    --> 正在检查事务
    ---> 软件包 whois.x86_64.0.5.1.1-2.el7 将被 安装
    --> 解决依赖关系完成
    
    依赖关系解决
    
    ===================================================================================================================================================================================
     Package                                  架构                                      版本                                             源                                       大小
    ===================================================================================================================================================================================
    正在安装:
     whois                                    x86_64                                    5.1.1-2.el7                                      base                                     72 k
    
    事务概要
    ===================================================================================================================================================================================
    安装  1 软件包
    
    总下载量:72 k
    安装大小:222 k
    Downloading packages:
    whois-5.1.1-2.el7.x86_64.rpm                                                                                                                                |  72 kB  00:00:00     
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      正在安装    : whois-5.1.1-2.el7.x86_64                                                                                                                                       1/1 
      验证中      : whois-5.1.1-2.el7.x86_64                                                                                                                                       1/1 
    
    已安装:
      whois.x86_64 0:5.1.1-2.el7                                                                                                                                                       
    
    完毕!
    [root@k8s101.yinzhengjie.com ~]# 
    [root@k8s101.yinzhengjie.com ~]# yum -y install whois

    2>.查询域名的归属者信息

    [root@k8s101.yinzhengjie.com ~]# whois yinzhengjie.com
       Domain Name: YINZHENGJIE.COM
       Registry Domain ID: 2518910439_DOMAIN_COM-VRSN
       Registrar WHOIS Server: grs-whois.hichina.com
       Registrar URL: http://www.net.cn
       Updated Date: 2020-04-26T04:11:59Z
       Creation Date: 2020-04-26T04:04:26Z
       Registry Expiry Date: 2025-04-26T04:04:26Z
       Registrar: Alibaba Cloud Computing (Beijing) Co., Ltd.
       Registrar IANA ID: 420
       Registrar Abuse Contact Email: DomainAbuse@service.aliyun.com
       Registrar Abuse Contact Phone: +86.95187
       Domain Status: ok https://icann.org/epp#ok
       Name Server: DNS17.HICHINA.COM
       Name Server: DNS18.HICHINA.COM
       DNSSEC: unsigned
       URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/
    >>> Last update of whois database: 2020-12-29T22:11:52Z <<<
    
    For more information on Whois status codes, please visit https://icann.org/epp
    
    NOTICE: The expiration date displayed in this record is the date the
    registrar's sponsorship of the domain name registration in the registry is
    currently set to expire. This date does not necessarily reflect the expiration
    date of the domain name registrant's agreement with the sponsoring
    registrar.  Users may consult the sponsoring registrar's Whois database to
    view the registrar's reported date of expiration for this registration.
    
    TERMS OF USE: You are not authorized to access or query our Whois
    database through the use of electronic processes that are high-volume and
    automated except as reasonably necessary to register domain names or
    modify existing registrations; the Data in VeriSign Global Registry
    Services' ("VeriSign") Whois database is provided by VeriSign for
    information purposes only, and to assist persons in obtaining information
    about or related to a domain name registration record. VeriSign does not
    guarantee its accuracy. By submitting a Whois query, you agree to abide
    by the following terms of use: You agree that you may use this Data only
    for lawful purposes and that under no circumstances will you use this Data
    to: (1) allow, enable, or otherwise support the transmission of mass
    unsolicited, commercial advertising or solicitations via e-mail, telephone,
    or facsimile; or (2) enable high volume, automated, electronic processes
    that apply to VeriSign (or its computer systems). The compilation,
    repackaging, dissemination or other use of this Data is expressly
    prohibited without the prior written consent of VeriSign. You agree not to
    use electronic processes that are automated and high-volume to access or
    query the Whois database except as reasonably necessary to register
    domain names or modify existing registrations. VeriSign reserves the right
    to restrict your access to the Whois database in its sole discretion to ensure
    operational stability.  VeriSign may restrict or terminate your access to the
    Whois database for failure to abide by these terms of use. VeriSign
    reserves the right to modify these terms at any time.
    
    The Registry database contains ONLY .COM, .NET, .EDU domains and
    Registrars.
    [root@k8s101.yinzhengjie.com ~]# 
    [root@k8s101.yinzhengjie.com ~]# whois yinzhengjie.com 

    3>.

    二.dig工具

    1>.在Linux操作系统下安装dig工具

      CentOS Linux发行版本:
        [root@dns53.yinzhengjie.com ~]# yum -y install bind-utils   Ubuntu发行版本:     [root@dns53.yinzhengjie.com ~]# apt-get -y install dnsutils

    2>.使用默认的DNS服务器查询解析记录

    [root@docker201.yinzhengjie.com ~]# dig www.baidu.com
    
    ; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.3 <<>> www.baidu.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32298
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 5, ADDITIONAL: 6
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;www.baidu.com.            IN    A
    
    ;; ANSWER SECTION:
    www.baidu.com.        1176    IN    CNAME    www.a.shifen.com.
    www.a.shifen.com.    278    IN    A    39.156.66.14
    www.a.shifen.com.    278    IN    A    39.156.66.18
    
    ;; AUTHORITY SECTION:
    a.shifen.com.        1176    IN    NS    ns2.a.shifen.com.
    a.shifen.com.        1176    IN    NS    ns3.a.shifen.com.
    a.shifen.com.        1176    IN    NS    ns4.a.shifen.com.
    a.shifen.com.        1176    IN    NS    ns1.a.shifen.com.
    a.shifen.com.        1176    IN    NS    ns5.a.shifen.com.
    
    ;; ADDITIONAL SECTION:
    ns4.a.shifen.com.    1176    IN    A    14.215.177.229
    ns5.a.shifen.com.    1176    IN    A    180.76.76.95
    ns2.a.shifen.com.    1176    IN    A    220.181.33.32
    ns3.a.shifen.com.    1176    IN    A    112.80.255.253
    ns1.a.shifen.com.    1176    IN    A    110.242.68.42
    
    ;; Query time: 0 msec
    ;; SERVER: 172.200.1.53#53(172.200.1.53)
    ;; WHEN: 四 12月 31 22:02:34 CST 2020
    ;; MSG SIZE  rcvd: 271
    
    [root@docker201.yinzhengjie.com ~]# 
    [root@docker201.yinzhengjie.com ~]# dig www.baidu.com

    3>.查询NS记录

    [root@docker201.yinzhengjie.com ~]# dig -t ns www.baidu.com
    
    ; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.3 <<>> -t ns www.baidu.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42792
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;www.baidu.com.            IN    NS
    
    ;; ANSWER SECTION:
    www.baidu.com.        1006    IN    CNAME    www.a.shifen.com.
    
    ;; AUTHORITY SECTION:
    a.shifen.com.        600    IN    SOA    ns1.a.shifen.com. baidu_dns_master.baidu.
    com. 2012310014 5 5 2592000 3600
    ;; Query time: 15 msec
    ;; SERVER: 172.200.1.53#53(172.200.1.53)
    ;; WHEN: 四 12月 31 22:05:24 CST 2020
    ;; MSG SIZE  rcvd: 126
    
    [root@docker201.yinzhengjie.com ~]# 
    [root@docker201.yinzhengjie.com ~]# dig -t ns www.baidu.com

    4>.

     

    5>.

    三.

    四.

    五.

  • 相关阅读:
    ubuntu 解决“无法获得锁 /var/lib/dpkg/lock -open (11:资源暂时不可用)”的方法
    解决VMware安装ubuntu16.04后无法全屏的问题
    力推:无限制下载神器aria2
    使用Pangolon在同一副图中,画出两个轨迹,比较误差
    Pangolin中opengl的混合(gl_blend)
    Ubuntu 16.04: How to install OpenCV
    ubuntu16.04下安装Eigen
    ubuntu16.04下安装Sophus
    svn删除账户信息
    javaweb乱码(tomcat服务器)
  • 原文地址:https://www.cnblogs.com/yinzhengjie/p/14209588.html
Copyright © 2020-2023  润新知