DNS Best Practices. Mike Jager Network Startup Resource Center mike@nsrc.org



Similar documents
Use Domain Name System and IP Version 6

Building Nameserver Clusters with Free Software

BEST PRACTICES FOR IMPROVING EXTERNAL DNS RESILIENCY AND PERFORMANCE

Security of IPv6 and DNSSEC for penetration testers

A S B

page 1 DNS Rate Limiting W. Matthijs Mekking matthijs@nlnetlabs.nl 28 Feb 2013 Stichting NLnet Labs

F5 Intelligent DNS Scale. Philippe Bogaerts Senior Field Systems Engineer mailto: Mob.:

CSE331: Introduction to Networks and Security. Lecture 12 Fall 2006

Cisco Configuring Commonly Used IP ACLs

Deploying IP Anycast. Core DNS Services for University of Minnesota Introduction and General discussion

Computer Security CS 426 Lecture 36. CS426 Fall 2010/Lecture 36 1

DOMAIN NAME SECURITY EXTENSIONS

Securing E-Commerce. Agenda. The Security Problem IC Security: Key Elements Designing and Implementing _06_2000_c1_sec3

DDoS attacks in CESNET2

FAQ (Frequently Asked Questions)

Acquia Cloud Edge Protect Powered by CloudFlare

CloudFlare advanced DDoS protection

FIREWALL AND NAT Lecture 7a

The Continuing Denial of Service Threat Posed by DNS Recursion (v2.0)

OLD VULNERABILITIES IN NEW PROTOCOLS? HEADACHES ABOUT IPV6 FRAGMENTS

PowerLink Bandwidth Aggregation Redundant WAN Link and VPN Fail-Over Solutions

This Lecture. The Internet and Sockets. The Start If everyone just sends a small packet of data, they can all use the line at the same.

Lesson 13: DNS Security. Javier Osuna GMV Head of Security and Process Consulting Division

Chapter 8 Security Pt 2

DDoS Protection. How Cisco IT Protects Against Distributed Denial of Service Attacks. A Cisco on Cisco Case Study: Inside Cisco IT

DDoS Mitigation Techniques

A Survey of cctld DNS Vulnerabilities. ITU cctld Workshop March 3, 2003

How to launch and defend against a DDoS

CSCE 465 Computer & Network Security

What communication protocols are used to discover Tesira servers on a network?

DNS Cache Poisoning Vulnerability Explanation and Remedies Viareggio, Italy October 2008

Overview of Network Security The need for network security Desirable security properties Common vulnerabilities Security policy designs

Part 5 DNS Security. SAST01 An Introduction to Information Security Martin Hell Department of Electrical and Information Technology

Computer Networks: Domain Name System

Identifying Patterns in DNS Traffic

5 DNS Security Risks That Keep You Up At Night (And How To Get Back To Sleep)

Firewalls. Firewalls. Idea: separate local network from the Internet 2/24/15. Intranet DMZ. Trusted hosts and networks. Firewall.

How To Stop A Malicious Dns Attack On A Domain Name Server (Dns) From Being Spoofed (Dnt) On A Network (Networking) On An Ip Address (Ip Address) On Your Ip Address On A Pc Or Ip Address

Networking Domain Name System

Building Your Firewall Rulebase Lance Spitzner Last Modified: January 26, 2000

Predictability of Windows DNS resolver. ing. Roberto Larcher robertolarcher@hotmail.com

DNS security: poisoning, attacks and mitigation

CISCO IOS NETWORK SECURITY (IINS)

BorderWare Firewall Server 7.1. Release Notes

Securing an Internet Name Server

ΕΠΛ 674: Εργαστήριο 5 Firewalls

20-CS X Network Security Spring, An Introduction To. Network Security. Week 1. January 7

DDoS Mitigation Strategies

DNS. The Root Name Servers. DNS Hierarchy. Computer System Security and Management SMD139. Root name server. .se name server. .

1 hours, 30 minutes, 38 seconds Heavy scan. All scanned network resources. Copyright 2001, FTP access obtained

APNIC IPv6 Deployment

DNS + DHCP. Michael Tsai 2015/04/27

Copyright International Business Machines Corporation All rights reserved. US Government Users Restricted Rights Use, duplication or disclosure

Where is Hong Kong in the secure Internet infrastructure development. Warren Kwok, CISSP Internet Society Hong Kong 12 August 2011

Classic IOS Firewall using CBACs Cisco and/or its affiliates. All rights reserved. 1

Defending against DNS reflection amplification attacks

Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme. Firewall

Application-layer protocols

Guide to DDoS Attacks December 2014 Authored by: Lee Myers, SOC Analyst

Linux MPS Firewall Supplement

Network Security. Chapter 3. Cornelius Diekmann. Version: October 21, Lehrstuhl für Netzarchitekturen und Netzdienste Institut für Informatik

basic BGP in Huawei CLI

How To - Configure Virtual Host using FQDN How To Configure Virtual Host using FQDN

Internet Security [1] VU Engin Kirda

The Domain Name System from a security point of view

Claudio Jeker. RIPE 41 Meeting Amsterdam, 15. January Using BGP topology information for DNS RR sorting

DD2491 p Load balancing BGP. Johan Nicklasson KTHNOC/NADA

DDoS Overview and Incident Response Guide. July 2014

Firewalls. Test your Firewall knowledge. Test your Firewall knowledge (cont) (March 4, 2015)

ΕΠΛ 475: Εργαστήριο 9 Firewalls Τοίχοι πυρασφάλειας. University of Cyprus Department of Computer Science

Overview. Firewall Security. Perimeter Security Devices. Routers

Testing Network Security Using OPNET

Chapter 1 Personal Computer Hardware hours

SonicOS 5.9 / / 6.2 Log Events Reference Guide with Enhanced Logging

Content Distribution Networks (CDN)

F root anycast: What, why and how. João Damas ISC

Automated Mitigation of the Largest and Smartest DDoS Attacks

WAN Traffic Management with PowerLink Pro100

Step-by-Step Configuration

A host-based firewall can be used in addition to a network-based firewall to provide multiple layers of protection.

Protect your network: planning for (DDoS), Distributed Denial of Service attacks

Essential Curriculum Computer Networking 1. PC Systems Fundamentals 35 hours teaching time

USING TRANSACTION SIGNATURES (TSIG) FOR SECURE DNS SERVER COMMUNICATION

CMPT 471 Networking II

IPV6 SERVICES DEPLOYMENT

DNS amplification attacks

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

H3C Firewall and UTM Devices DNS and NAT Configuration Examples (Comware V5)

IPV6 FRAGMENTATION. The Case For Deprecation. Ron Bonica NANOG58

How to Add Domains and DNS Records

Transcription:

DNS Best Practices Mike Jager Network Startup Resource Center mike@nsrc.org This document is a result of work by the Network Startup Resource Center (NSRC at http://www.nsrc.org). This document may be freely copied, modified, and otherwise re-used on the condition that any re-use acknowledge the NSRC as the original source.

Authoritative server Gives answers for specific zones authoritative for these zones Only respond to queries for these zones Never ask other DNS servers anything A server can be authoritative for >1 zone A zone should have >1 authoritative server

Recursive server Receives queries from clients CPE, user s PCs, mail servers, etc Send queries to authoritative servers Follow referrals down from the root servers until an answer is found Answer stored in local cache

Authoritative vs recursive Server Function Information Target audience Authoritative Your domains The Internet Recursive All other domains Your users

Threats to DNS Denial of service attacks Reflection/amplification attacks Cache poisoning Information disclosure Human error Hardware/software failure

DoS attacks Saturating the target with requests, such that it cannot respond to legitimate traffic When your DNS servers are the target of a denial of service attack: Your customers can t resolve other domains The world can t resolve your own domains Might as well not be connected to the Internet

DoS attacks Your authoritative servers may be attacked Mitigate by having multiple servers Well distributed globally Anycast a good technique to absorb DoS Many commercial anycast services May act as secondary servers for your zones Some services available for cctlds, etc.

Amplification attacks Specific class of reflection attack DNS servers used as tools in the attack Queries with spoofed source addresses sent to DNS servers Server replies to the source with packet many times larger than the request The node legitimately using the spoofed address is the victim

Amplification attacks Source: http://www.nanog.org/meetings/nanog37/presentations/frank-scalzo.pdf

Amplification attacks Victims see lots of UDP source 53 traffic Many different source addresses Standard DDoS mitigation technique Tempting to limit DNS packets by size But this breaks DNSSEC! Often open recursive DNS servers Important to not be part of the problem!

Amplification attacks Don t run open recursive servers Drop queries that are not from customers Authoritative servers used in attacks too Ensure BCP 38 adherence https://tools.ietf.org/html/bcp38

Cache poisoning Attacker fools recursive server into caching an incorrect answer www.mybank.com -> 192.0.2.1 192.0.2.1 is under attacker control Looks like your bank, but isn t! Successful cache poisoning attack affects many (if not all) users

Cache poisoning Master DNS Server www.mybank.com=192.0.2.1 Query: www.mybank.com? Source: s.s.s.s:x Destination: d.d.d.d:y ID: 123456 Open Resolver www.mybank.com? Attacker Reply: www.mybank.com=192.0.2.1 Source: d.d.d.d:y Destination: s.s.s.s:x ID: 123456

Cache poisoning Many tweaks to make poisoning harder Being careful about processing responses Transaction ID randomisation Source port randomisation NAT can undo this DNSSEC is the only true way to avoid it

Source: http://dnsviz.net/d/isc.org/dnssec/

Information disclosure DNS is clear text DNSSEC provides authentication Not confidentiality Zone transfers Allow the entire contents of a zone to be read Easier for an attacker to find targets

Separation of duties Authoritative and recursive separated Scale each service independently Failure of one does not affect the other Easier control Restrict what each can be used for by whom Easier troubleshooting Not confusing authoritative and cached data

Protecting authoritative servers Disable recursion! UDP/TCP dest port 53 from everywhere No other services on the same servers Run multiple authoritative servers RFC 2182 Including some outside of your network Trade secondary service with another operator Commercial DNS hosting services

Protecting recursive servers Only permit queries from your customers Otherwise you will be used for amplification Stateless packet filter Permit UDP/TCP dest port 53 from customers On-server firewall (iptables/ipfw) ACL deployed to router/switch Do not keep packet state!

Client failover Clients of authoritative servers Recursive servers Fail over well using different NS records Clients of recursive servers Stub resolvers in CPE, PCs, servers, etc Do a very poor job at failing over Users complain immediately Services break due to timeouts

Anycast Routing trick Same prefix announced from >1 location Client reaches nearest instance based on network topology BGP path selection Works well with short-lived sessions like DNS!

Anycast topology.2.1.1.2 IGP 192.0.2.202 192.0.2.202.1 Customers.2 Customers 192.0.2.202 Customers

Anycast topology.2.1.1.2 IGP 192.0.2.202 192.0.2.202.1 Customers.2 Customers 192.0.2.202 Customers

Anycast DNS Load balancing Failover Distributed sinking of DDoS traffic Minimise impact of cache poisoning

Anycast DNS Run a routing daemon on DNS server BIRD, Quagga, etc Must withdraw prefix if DNS service stops More complex server configuration IP SLA monitors DNS service Advertises prefix if service is operational No routing protocol on server More complex router configuration

Diversification Different location Different network Different hardware Different OS Different DNS software Reduced chance of total service failure Increased configuration complexity

Configuration management Use a tool for configuration/zones revisions Git, Subversion, etc Use a tool to generate zone files Avoid error-prone manual edits Netdot Use a tool to deploy configuration files Ansible, Puppet, Chef, etc Use a tool...

Sanity checking Periodically run checks for Inconsistent, missing or bad data Catching common misconfigurations RFC 1912 Check out dnscheck https://github.com/dotse/dnscheck

Monitoring availability Don t just ping the DNS server address! Check that server responds to queries Check that important records still exist www, smtp, imap, etc DNS failure may impact alarming Out-of-band alerting mechanism required

Monitoring delay Network delay DNS service response time Smokeping can do both

Monitoring delay

Query statistics - dsc

Monitoring logs Use a tool to analyse DNS logs Simple Log Watcher tenshi Alarm on important messages zone syntax errors zone transfer errors DNSSEC validation errors

Questions? This document is a result of work by the Network Startup Resource Center (NSRC at http://www.nsrc.org). This document may be freely copied, modified, and otherwise re-used on the condition that any re-use acknowledge the NSRC as the original source.