Recent work in OpenBSD relayd AsiaBSDCon 2013 Reyk Flöter (reyk@openbsd.org)



Similar documents
Relayd: a load-balancer for OpenBSD

Internet Privacy Options

Load Balancing Bloxx Web Filter. Deployment Guide

Deploying the Barracuda Load Balancer with Office Communications Server 2007 R2. Office Communications Server Overview.

PRODUCT VERSION: LYNC SERVER 2010, LYNC SERVER 2013, WINDOWS SERVER 2008

Lab Exercise SSL/TLS. Objective. Step 1: Open a Trace. Step 2: Inspect the Trace

Load Balancing Trend Micro InterScan Web Gateway

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

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

Load Balancing Sophos Web Gateway. Deployment Guide

Websense Content Gateway v7.x: Troubleshooting

Virtual private network. Network security protocols VPN VPN. Instead of a dedicated data link Packets securely sent over a shared network Internet VPN

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

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

Proxies. Chapter 4. Network & Security Gildas Avoine

DEPLOYMENT GUIDE Version 1.2. Deploying the BIG-IP system v10 with Microsoft Exchange Outlook Web Access 2007

Load Balancing Web Proxies Load Balancing Web Filters Load Balancing Web Gateways. Deployment Guide

DMZ Network Visibility with Wireshark June 15, 2010

Definition of firewall

Load Balancing Barracuda Web Filter. Deployment Guide

Internet Technologies. World Wide Web (WWW) Proxy Server Network Address Translator (NAT)

DEPLOYMENT GUIDE Version 1.2. Deploying the BIG-IP System v9.x with Microsoft IIS 7.0 and 7.5

Smoothwall Web Filter Deployment Guide

Web Browsing Examples. How Web Browsing and HTTP Works

SSL VPN Server Guide Access Manager 3.1 SP5 January 2013

Linux MDS Firewall Supplement

Michal Ludvig, SUSE Labs, 01/30/2004, Secure networking, 1

12. Firewalls Content

Load Balancing McAfee Web Gateway. Deployment Guide

Deployment Guide Microsoft IIS 7.0

CumuLogic Load Balancer Overview Guide. March CumuLogic Load Balancer Overview Guide 1

How To Understand The Purpose Of A Sip Aware Firewall/Alg (Sip) With An Alg (Sip) And An Algen (S Ip) (Alg) (Siph) (Network) (Ip) (Lib

Integrated SSL Scanning

SSL VPN Server Guide. Access Manager 3.2 SP2. June 2013

Networking for Caribbean Development

DEPLOYMENT GUIDE Version 1.0. Deploying the BIG-IP LTM with Microsoft Windows Server 2008 R2 Remote Desktop Services

Deploying F5 with Microsoft Remote Desktop Services

Configuring Health Monitoring

Load Balancing Smoothwall Secure Web Gateway

ATS Test Documentation

FortiOS Handbook - Load Balancing VERSION 5.2.2

Microsoft Lync Server Overview

Firewalls. Network Security. Firewalls Defined. Firewalls

OpenBSD in the wild...a personal journey

Chapter 4: Security of the architecture, and lower layer security (network security) 1

CS5008: Internet Computing

Overview - Using ADAMS With a Firewall

Deploying F5 to Replace Microsoft TMG or ISA Server

ICS 351: Today's plan. IP addresses Network Address Translation Dynamic Host Configuration Protocol Small Office / Home Office configuration

Overview - Using ADAMS With a Firewall

NETASQ MIGRATING FROM V8 TO V9

Deployment Guide MobileIron Sentry

Stateful Inspection Technology

Corporate VPN Using Mikrotik Cloud Feature. By SOUMIL GUPTA BHAYA Mikortik Certified Trainer

Secure Web Appliance. Reverse Proxy

Migrating the SSL Offloading Configuration of the Alteon Application Switch 2424-SSL to AlteonOS version

Firewall Introduction Several Types of Firewall. Cisco PIX Firewall

FortiOS Handbook Load Balancing for FortiOS 5.0

DEPLOYMENT GUIDE Version 1.2. Deploying the BIG-IP System v10 with Microsoft IIS 7.0 and 7.5

TESTING & INTEGRATION GROUP SOLUTION GUIDE

NEFSIS DEDICATED SERVER

Lab Exercise SSL/TLS. Objective. Requirements. Step 1: Capture a Trace

Deploying F5 with Microsoft Forefront Threat Management Gateway 2010

Security Technology: Firewalls and VPNs

Distributed Systems. Firewalls: Defending the Network. Paul Krzyzanowski

Configure a Microsoft Windows Workstation Internal IP Stateful Firewall

Deployment Guide Oracle Siebel CRM

Firewalls and VPNs. Principles of Information Security, 5th Edition 1

Accelerating SaaS Applications with F5 AAM and SSL Forward Proxy

CIT 480: Securing Computer Systems. Firewalls

How To Balance A Load Balancer On A Server On A Linux (Or Ipa) (Or Ahem) (For Ahem/Netnet) (On A Linux) (Permanent) (Netnet/Netlan) (Un

Introduction to the EIS Guide

Managing Virtual Servers

1. Barracuda Load Balancer - Overview What's New in the Barracuda Load Balancer Barracuda Load Balancer Release Notes

DEPLOYMENT GUIDE Version 1.0. Deploying the BIG-IP Edge Gateway for Layered Security and Acceleration Services

Internet Firewall CSIS Internet Firewall. Spring 2012 CSIS net13 1. Firewalls. Stateless Packet Filtering

IPv4 and IPv6 Integration. Formation IPv6 Workshop Location, Date

CIT 480: Securing Computer Systems. Firewalls

Firewalls. Ola Flygt Växjö University, Sweden Firewall Design Principles

Load Balancing. FortiOS Handbook v3 for FortiOS 4.0 MR3

F-Secure Internet Gatekeeper

7.1. Remote Access Connection

Firewall. IPTables and its use in a realistic scenario. José Bateira ei10133 Pedro Cunha ei05064 Pedro Grilo ei09137 FEUP MIEIC SSIN

FIREWALLS & CBAC. philip.heimer@hh.se

REQUIREMENTS AND INSTALLATION OF THE NEFSIS DEDICATED SERVER

Network Configuration Settings

Firewalls. Chien-Chung Shen

INTRODUCTION TO FIREWALL SECURITY

SSL VPN Server Guide. Access Manager 4.0. November 2013

PROTECTING INFORMATION SYSTEMS WITH FIREWALLS: REVISED GUIDELINES ON FIREWALL TECHNOLOGIES AND POLICIES

CSE543 - Computer and Network Security Module: Firewalls

v7.7.3 Release Notes for Websense Content Gateway

DEPLOYMENT GUIDE. Deploying the BIG-IP LTM v9.x with Microsoft Windows Server 2008 Terminal Services

How To Understand A Firewall

How to Make the Client IP Address Available to the Back-end Server

Multi-Homing Security Gateway

DEPLOYMENT GUIDE DEPLOYING F5 WITH MICROSOFT WINDOWS SERVER 2008

DEPLOYMENT GUIDE DEPLOYING THE BIG-IP SYSTEM WITH MICROSOFT INTERNET INFORMATION SERVICES (IIS) 7.0

Prerequisites. Creating Profiles

Transcription:

Recent work in OpenBSD relayd AsiaBSDCon 2013 Reyk Flöter (reyk@openbsd.org)

Agenda History & Background Recent work SSL Interception Socket Splicing Filter rewrite

relayd buzzword bingo Load Balancer SSL Acceleration Application Level Gateway (ALG) Deep inspection Link Balancer IPv6 Gateway (NAT64/46) Enterprise Application Delivery Controller SSL Interception

relayd reyk@ Reyk Flöter pyr@ Pierre- Yves Ritschard

relayd History 2006 two prototypes exist: slbd from pyr@, relayd from reyk@ 2006/12/16 relayd first appeared as hostated - a health- checking L3 server load balancer 2007/01/09 renamed to hoststated 2007/02/22 added L7 relay & SSL support 2007/12/07 renamed to relayd

relayd Features load balancer & application layer gateway Protocols: TCP, SSL/TLS, HTTP, UDP (DNS) Health checks: ICMP, TCP, SSL/TLS, HTTP, send/expect, external scripts Configuration blocks or subsystems redirect: L3 using PF rdr- to / route- to relay: L7 from user space sockets router: L3 routing table configuration

relayd Design Internet relayctl TCP/UDP/TLS/SSL control status TCP/UDP (L3 routing) direct server return (DSR) relay relay relay relay relay relayd parent relay (connect) parse fork & inform configure kernel (pf, route) redirect (rdr-to), route /etc/relayd.conf pfe rules & tables, routes hce health checks

SSL Interception clueless client Man- In- The- Middle confidential server

SSL Interception I A transparent proxy can attempt to intercept SSL connections: Accept a redirected SSL connection and connect to the original SSL server. Problem: The client will reject the broken certificate

SSL Interception II SSL/TLS uses X.509 certificates to submit the public key and to validate a peers identity. A certificate is either self- signed or signed by a well- known Certificate Authority (CA). HTTPS normally only checks and validates the server certificate (no mutual auth) Idea: Generate a new server certificate on the fly with a local trusted CA.

SSL Interception III 1.Accept a diverted TCP connection from a client 2.Fetch SSL certificate from target server 3.Replace the cert. key and sign it with local CA 4.Upgrade TCP connection to SSL server 5.SSL Relay & intercept 2. Get target, fetch server certificate 1. Connect 4. SSL Server with new certificate 3. Generate & sign certificate 5. SSL Client Internet relayd

SSL Interception IV Configure SSL Interception: http protocol httpfilter { return error label "Get back to work!" request url filter "facebook.com/" ssl ca key "/etc/ssl/private/ca.key" \ password "humppa" ssl ca cert "/etc/ssl/ca.crt" } relay sslmitm { listen on 127.0.0.1 port 8443 ssl protocol httpfilter forward with ssl to destination }

Socket Splicing

Socket Splicing I Objective: Increase the performance of TCP/HTTP relays. Connect two sockets in the kernel For example: handle HTTP body in user space, forward body in the kernel (splice sockets) 1. Connect Server relayd Client Internet splice

Socket Splicing II No configuration is required, relayd enables it by default You can turn it off with no tcp splice Can be used by other daemons, kernel Socket API: bzero(&sp, sizeof(sp)); sp.sp_fd = fd2; sp.sp_max = content_length; sp.sp_idle = timeout; if (setsockopt(fd1, SOL_SOCKET, SO_SPLICE, &sp, sizeof(sp)) == -1) return (-1);

TODO Filter Rewrite

Filter Rewrite I Objective: Improve the flexibility of relayd s filtering PF is OpenBSD s in- kernel TCP/IP filter Mostly L3-4 (IPv4, IPv6, TCP, UDP, ICMP, ) No L7 inspection in the kernel (Hello, Linux) relayd extends PF as application layer gateway Mostly L5-7 Privilege- separated L7 inspection

Filter Rewrite II New rules in /etc/relayd.conf: # Add X-Forwarded-For header (load balancer) match request header append "X-Forwarded-For" value \ "$REMOTE_ADDR" # Simple URL Filter block client in url "www.example.com/" tag "URL filtered!" pass client in from 10.0.0.1 url "www.example.com/" # Lists match response tag "Instant messenger disallowed!" block response header "Content-Type" value { "application/x-msn-messenger", "AIM/HTTP" } # Alternate relay targets match request path "/images" relay-to 10.1.1.1 match request path "/videos" relay-to <otherhosts>

Danke!...thanks for supporing the OpenBSD project!