Sunday, April 24, 2016

Setting up a Cache-only DNS Nameserver


  • Different DNS Server Roles
    • Primary (master) Nameserver
    • Secondary (slave) Nameserver
    • Cache only Nameserver
  • Resource Records
    • A: name to IP address
    • AAAA: name to IPV6 address
    • CNAME: Canonical Name; Alias
    • PTR: Reverse DNS Resolution
    • NS: Name Server; which name server is authoritative
    • SOA: Start of authority; generic information about a domain
    • MX: Mail Exchange that is responsible for this domain
    • TXT: Supplies additional data, such as data that is used by sender policy framework networks and related
    • SRV: Hosts that provide a specific service

  • Setting up a Cache-only DNS Nameserver
    • yum -y install unbound
      • systemctl enable unbound
      • systemctl start unbound
    • vim /etc/unbound/unbound.conf
      •  interface: 0.0.0.0        <-- allow all interface
      •  access-control: 0.0.0.0/0 allow <-- allow everybody to queries
      • forward-zone:
        • name: "."   <-- forward zone for root
        • forward-addr: 8.8.8.8. <-- DNS forward server
      • Check config
        • unbound-checkconf <-- check for syntax error only.
[root@server1 ~]# unbound-checkconf
unbound-checkconf: no errors in /etc/unbound/unbound.conf

    • restart unbound
      • systemctl restart unbound
    • check status
      • systemctl status -l unbound
    • Add DNS to firewalld
      • firewall-cmd --permanent --add-service=dns
      • firewall-cmd --reload



No comments:

Post a Comment