PowerDNS dnsdist. NLUUG Najaarsconferentie 2015. Presentation is on: https://www.powerdns.com/nluug. http://dnsdist.org/



Similar documents
PowerDNS dnsdist. OX Summit 2015 All presentations will be on:

The story of dnsdist - or - Do we need a DNS Delivery Controller?

The story of dnsdist - or - Do we need a DNS Delivery Controller?

PowerDNS Introduction

THE MASTER LIST OF DNS TERMINOLOGY. First Edition

THE MASTER LIST OF DNS TERMINOLOGY. v 2.0

Ranch Networks for Hosted Data Centers

Application Note. Active Directory Federation Services deployment guide

Decoding DNS data. Using DNS traffic analysis to identify cyber security threats, server misconfigurations and software bugs

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

The Future of DNS. Johan Ihrén Netnod. October 15,

Linux MDS Firewall Supplement

ZEN LOAD BALANCER EE v3.04 DATASHEET The Load Balancing made easy

DNS ROUND ROBIN HIGH-AVAILABILITY LOAD SHARING

1. Comments on reviews a. Need to avoid just summarizing web page asks you for:

DNS Caching Krytyczna infrastruktura operatora i ostatni element układanki

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

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

Products, Features & Services

Understanding Slow Start

Global Service Loadbalancing & DNSSEC. Ralf Brünig Field Systems Engineer r.bruenig@f5.com DNSSEC

FAQs for Oracle iplanet Proxy Server 4.0

ZEN LOAD BALANCER EE v3.02 DATASHEET The Load Balancing made easy

TRUFFLE Broadband Bonding Network Appliance. A Frequently Asked Question on. Link Bonding vs. Load Balancing

CS 188/219. Scalable Internet Services Andrew Mutz October 8, 2015

Network Management and Monitoring Software

DNS (Domain Name System) is the system & protocol that translates domain names to IP addresses.

Firewalls. Pehr Söderman KTH-CSC

CS514: Intermediate Course in Computer Systems

Snapt Balancer Manual

NEFSIS DEDICATED SERVER

BASICS OF SCALING: LOAD BALANCERS

MoonGen. A Scriptable High-Speed Packet Generator Design and Implementation. Paul Emmerich. January 30th, 2016 FOSDEM 2016

Load Balancing for Microsoft Office Communication Server 2007 Release 2

Barracuda Load Balancer Online Demo Guide

A D M I N I S T R A T O R V 1. 0

Lecture 3: Scaling by Load Balancing 1. Comments on reviews i. 2. Topic 1: Scalability a. QUESTION: What are problems? i. These papers look at

F-Secure Internet Gatekeeper

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

SiteCelerate white paper

Web Analytics Understand your web visitors without web logs or page tags and keep all your data inside your firewall.

IPV6 SERVICES DEPLOYMENT

dnsperf DNS Performance Tool Manual

PES. High Availability Load Balancing in the Agile Infrastructure. Platform & Engineering Services. HEPiX Bologna, April 2013

How Comcast Built An Open Source Content Delivery Network National Engineering & Technical Operations

Proxy Server, Network Address Translator, Firewall. Proxy Server

GLOBAL SERVER LOAD BALANCING WITH SERVERIRON

HUAWEI OceanStor Load Balancing Technical White Paper. Issue 01. Date HUAWEI TECHNOLOGIES CO., LTD.

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

Improving DNS performance using Stateless TCP in FreeBSD 9

SIDN Server Measurements

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

Alteon Global Server Load Balancing

How To Understand and Configure Your Network for IntraVUE

Defending your DNS in a post-kaminsky world. Paul Wouters <paul@xelerance.com>

A Tool for Evaluation and Optimization of Web Application Performance

INUVIKA OPEN VIRTUAL DESKTOP FOUNDATION SERVER

Protecting DNS Critical Infrastructure Solution Overview. Radware Attack Mitigation System (AMS) - Whitepaper

OpenFlow Based Load Balancing

Monitoring Forefront TMG

IMPLEMENTATION OF INTELLIGENT FIREWALL TO CHECK INTERNET HACKERS THREAT

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

Software Defined Networking What is it, how does it work, and what is it good for?

Implementing Reverse Proxy Using Squid. Prepared By Visolve Squid Team

Debugging With Netalyzr

APV9650. Application Delivery Controller


Removing The Linux Routing Cache

V-ISA Reputation Mechanism, Enabling Precise Defense against New DDoS Attacks

DNSSEC and DNS Proxying

HAProxy. Free, Fast High Availability and Load Balancing. Adam Thornton 10 September 2014

Make a folder named Lab3. We will be using Unix redirection commands to create several output files in that folder.

Application Compatibility Best Practices for Remote Desktop Services

Web Traffic Capture Butler Street, Suite 200 Pittsburgh, PA (412)

TRUFFLE Broadband Bonding Network Appliance BBNA6401. A Frequently Asked Question on. Link Bonding vs. Load Balancing

FortiOS Handbook - Load Balancing VERSION 5.2.2

OpenFlow with Intel Voravit Tanyingyong, Markus Hidell, Peter Sjödin

TFE listener architecture. Matt Klein, Staff Software Engineer Twitter Front End

Configuring Citrix NetScaler for IBM WebSphere Application Services

Use Domain Name System and IP Version 6

CHAPTER 3 PROBLEM STATEMENT AND RESEARCH METHODOLOGY

Tunnel Client FAQ. Table of Contents. Version 0v5, November 2014 Revised: Kate Lance Author: Karl Auer

Linux firewall. Need of firewall Single connection between network Allows restricted traffic between networks Denies un authorized users

IERG 4080 Building Scalable Internet-based Services

ESSENTIALS. Understanding Ethernet Switches and Routers. April 2011 VOLUME 3 ISSUE 1 A TECHNICAL SUPPLEMENT TO CONTROL NETWORK

4 Delivers over 20,000 SSL connections per second (cps), which

Technical Note. ISP Protection against BlackListing. FORTIMAIL Deployment for Outbound Spam Filtering. Rev 2.2

Lightweight DNS for Multipurpose and Multifunctional Devices

Building a Highly Available and Scalable Web Farm

co Characterizing and Tracing Packet Floods Using Cisco R

Frequently Asked Questions

N-CAP Users Guide Everything You Need to Know About Using the Internet! How Firewalls Work

Domain Name System :49:44 UTC Citrix Systems, Inc. All rights reserved. Terms of Use Trademarks Privacy Statement

The secret life of a DNS query. Igor Sviridov <sia@nest.org>

Connecting with Computer Science, 2e. Chapter 5 The Internet

Managing SIP-based Applications With WAN Optimization

Proxies. Chapter 4. Network & Security Gildas Avoine

Transcription:

PowerDNS dnsdist NLUUG Najaarsconferentie 2015 Presentation is on: https://www.powerdns.com/nluug http://dnsdist.org/ bert.hubert@powerdns.com / @powerdns_bert

Outline PowerDNS/Open-Xchange/Dovecot/Bert Importance of DNS (do you measure it? why not?) What is dnsdist? why dnsdist? Some examples Live website, graphics, statistics Architecture Performance Status & Getting dnsdist

PowerDNS, Open-Xchange PowerDNS: around since 1999, open source since 2002 I m the founder, these days I m back to coding! Authoritative DNS: 30%-50% of all domains, 75%+ of DNSSEC Few percent of all installs though Recursor: 100s of millions of internet users Actual open source company, open software, good business Since 2015 part of Open-Xchange, together with Dovecot: DNS Company

Importance of DNS Everything starts with a DNS lookup DNS lookup slow -> everything slow One of the LEAST MEASURED protocols on the internet though! Nobody keeps access logs either Our observation: DNS is frequently good enough, but almost nobody goes for really good works for me! What happens: 500 million users on 8.8.8.8!

Dnsdist: another layer of indirection "dnsdist is a highly DNS-, DoS- and abuse-aware loadbalancer. Its goal in life is to route traffic to the best server, delivering top performance to legitimate users while shunting or blocking abusive traffic. Swiss army knife of DNS problem solving. Add and remove bits, filter out traffic, inspect traffic live from the console Detect infected users, force infected users to other name servers Delay and ratelimit bad queries, refuse to do work for certain hosts/ domains Loads of statistics Open source, vendor neutral - it is not PowerDNS Dist And let s not forget: very smart load balancing

The story of dnsdist Started out as a need to do dnsdist listen-ip destip-1 destip-2 Simple query spreading w/o hassle, also just forwarding Been around for a year or two When debugging with a large customer, we found they were willing & able to switch out PowerDNS versions at the drop of a hat since they were comfortable with their loadbalancer Asked around, no one else was happy with their DNS load balancer solution

dnsdist: a smart DNS Delivery Controller Runtime configurable from console (accessible remotely, tab-completing interface) Console & configuration file actually Lua Most configurations operate Lua-free at runtime Host of built-in load balancing/blocking/shunting/shaping policies (C++), custom policies can be written in Lua (plenty fast) LuaJIT Built-in webserver & API, plus Graphite/Metronome graphs HTTP RESTful: does not read files from disk ever Provides features ranging from simple round robin load balancing to quarantining of infected customers Vendor-neutral open source - please join in!

Existing load balancers Most (HW) load balancers know about http, https, imap etc. DNS is sufficiently different that it is hard to treat it as a weird kind of web, so many vendors mess it up Plus the quaint observation that a busy nameserver is a happy name server Caches HOT! Leads to need for a concentrating load balancer : as much traffic on as little servers as possible Exactly the reverse of http etc

Some real life tests With various companies we tested shutting down all their nameservers but a few, leading to lots of traffic going to one server In all cases, we observed lower query/response latencies and far lower cache miss rates (±50% lower) Happier customers We also observed only minor increases in CPU load, very much sub-linear to the manyfold traffic increase One name server doing millions of cable modems One name server doing 700k domains with online signing We have a winner!

View all this on https:// metronome1.power dns.com/ and http:// xs.powerdns.com/ metronome/

Scenarios Legacy nameservers, want to get statistics And realtime inspection DoS worries: limit each host QPS or per /64 Need to add IPv6 service or: Just need to move traffic to another server Adding features to legacy DNS: TCP to ANY, Views Improve service through query concentration Send abusive traffic to abuse pool Split DNSSEC traffic to DNSSEC servers.. strip DNSSEC when it doesn t work..

dnsdist simplest config No config: # dnsdist 8.8.8.8 208.67.222.222 2620:0:ccc::2 2620:0:ccd::2 Will listen on port 53, serve for RFC1918, distribute queries to Google & OpenDNS using a sensible load balancing policy Most queries to the most unloaded, fastest server

dnsdist basic config setlocal("130.161.252.29:53") addacl( 130.161.0.0/24") setacl would ve taken out RFC1918 newserver{address="192.168.1.2", qps=1000, order=1} newserver{address="192.168.1.79:5300", qps=10000, order=2} newserver{address="127.0.0.1:5300", order=3} setserverpolicy(firstavailable)

dnsdist basic config # dnsdist --config=basic.conf Listening on 130.161.252.29:53 Marking downstream 192.168.1.2:53 as 'up' Marking downstream 192.168.1.79:5300 as 'up' Marking downstream 127.0.0.1:5300 as 'down' > showservers() # Name Address State Qps Qlim Ord Wt Queries Drops Drate Lat Pools 0 192.168.1.2:53 up 0.0 1000 1 1 0 0 0.0 0.0 1 192.168.1.79:5300 up 0.0 10000 2 1 0 0 0.0 0.0 2 127.0.0.1:5300 down 0.0 0 3 1 0 0 0.0 0.0 All 0.0 0 0

> showservers() dnsdist basic config # Name Address State Qps Qlim Ord Wt Queries Drops Drate Lat Pools 0 192.168.1.2:53 up 0.0 1000 1 1 0 0 0.0 0.0 1 192.168.1.79:5300 up 0.0 10000 2 1 0 0 0.0 0.0 2 127.0.0.1:5300 down 0.0 0 3 1 0 0 0.0 0.0 All 0.0 0 0 > getserver(1):setdown() > showservers() # Name Address State Qps Qlim Ord Wt Queries Drops Drate Lat Pools 0 192.168.1.2:53 up 0.0 1000 1 1 0 0 0.0 0.0 1 192.168.1.79:5300 DOWN 0.0 10000 2 1 0 0 0.0 0.0 2 127.0.0.1:5300 down 0.0 0 3 1 0 0 0.0 0.0 All 0.0 0 0

dnsdist: pretty stuff controlsocket( 0.0.0.0") for the console setkey( MXNeLFWHUe4363BBKrY06cAsH8NWNb+Se2eXU5+Bb74=") for crypto webserver("0.0.0.0:8083", geheim2 ) instant webserve carbonserver( 2001:888:2000:1d::2") send our statistics here

dnsdist: pretty stuff

Policies firstavailable: Pick first server that has not exceeded its QPS limit, ordered by the server 'order' parameter wrandom: Weighted random over available servers, based on the server 'weight' parameter roundrobin: Simple round robin over available servers leastoutstanding: Send traffic to downstream server with least outstanding queries, with the lowest 'order', and within that the lowest recent latency

Statistics We output statistics in the carbon format as used by Graphite Sometimes we can t help ourselves and reimplement the wheel Metronome is our very simple works out of the box mini-graphite Support Auth, Recursor, dnsdist & System Public instance available so we can debug you!

Main resolver pool DNSSEC resolver pool Abuse pool Server1 Server2 Server3 Server4 Server5 Server4 Server5 30 kqps 30 kqps 20 kqps DNSDIST Policy = firstavailable If trouble domain or trouble source -> abuse pool If any hint of DNSSEC query -> DNSSEC pool Otherwise main pool, first server that has not hit qps limit If all servers hit limit, round robin

Second use case DoS attacks of the algorithmic kind - don t kill you with bandwidth, do cause outgoing traffic that does, do cause degraded performance Frequently blocked with complicated iptables rules, or deployed custom zones within name servers Option in dnsdist: move senders of harmful DNS traffic to dedicated servers Where they only soil their own nest

QPS Limit map Global QPS limits, per-server QPS limit Sometimes attacks come from single users MaxQPSLimit(): addaction(maxqpsiprule(5, 24, 64), DropAction()) 5 queries/second, grouped by /24 on IPv4 and by / 64 on IPv6

Other things we added Moving traffic to different server pools, dropping it, shaping it, based on: Header bits, DNSSEC flags Domain names Regular expressions Source address Delaying selected responses by x milliseconds Generating TC=1 responses based on all of the above Generating custom answers from Lua to silence specific clients

Generic rule/action engine Full Lua access to all packets Upside: 100% flexibility, downside: slowdown at very high query rates. Also, need to program In C++: Less dynamic, extremely fast Actions: drop traffic, change traffic, redirect etc

Examples addpoolrule({"ezdns.it.", "xxx."}, abuse") addqpspoolrule("com.", 100, abuse") adddomainblock("powerdns.org.") addluaaction("192.168.1.0/24", luarule) adddisablevalidationrule({ servfail.nl, 1.0.0.0/8 } showrules()

Other things we added Live traffic inspection: Top-N queries, top-n clients, top-n servfail generating queries, top-n servfail generating domains & clients Latency distribution histogram A substantial Lua runtime which should facilitate everything for those that need flexibility I don t want to brag, but you can do everything Want to block traffic from prime number domains? GO! (don t)

I LOVE STATISTICS

Performance This is not about achieving millions of QPS with 10 backends.. for now Most UNIX operating systems out of the box struggle with 400kpps already But there are promising ways to do better with the right hardware (Intel 10Gbit/s) We aim for 200kpps support easily in dnsdist

Status & Getting it Not a single dnsdist release has happened Powers several ISPs and a large university campus though, and soon a bunch of cctlds/newtlds Made possible by our telemetric monitoring & heavy support promise 1.0 release in December 2015 Meanwhile: https://repo.powerdns.com/ (tar, deb, yum, various platforms)

Summarizing: dnsdist Modern UNIX daemon C++ 2011 for speed, Lua(JIT) for flexibility Runtime & realtime console RESTful HTTP based API, built-in webserver Very complete telemetry About experienced service level Resource utilisation (file descriptors, real memory use, CPU use) Downstream health Does everything with your DNS

Discussion: do we need this? A pure load balancer knows nothing of DNS and can be very fast ( lob packets ) A nameserver is fully featured and can also do load balancing itself ( forwarders ) Is there room or need for something in between? People tell us yes, but are they right? Or will we end up making another nameserver in front of your nameserver?

PowerDNS dnsdist NLUUG Najaarsconferentie 2015 Presentation is on: https://www.powerdns.com/nluug http://dnsdist.org/ bert.hubert@powerdns.com / @powerdns_bert