Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ToorCon 2016 - Privacy Workshop - Take Back You...

ToorCon 2016 - Privacy Workshop - Take Back Your Email

Avatar for Giri Sreenivas

Giri Sreenivas

June 09, 2016

More Decks by Giri Sreenivas

Other Decks in Technology

Transcript

  1. AGENDA • Oasis Overview • Review inventories - cloud, software,

    hardware • Prepare local environment • Deploy • Explain the software stack and architecture
  2. PROJECT OASIS OVERVIEW • Open source project that provides email,

    calendar and contacts services with single sign on that can be run from your house • https://github.com/privacylabs/oasis • You own the hardware, you own the data • Leverages a gateway running in the cloud for routing data and DNS • All encrypted communications terminate with the Pi - gateway can’t MiTM
  3. CLOUD INVENTORY • Domain with name servers set to those

    from AWS Route53 Hosted Zone • AWS Account • Hosted Zone in Route53 for DNS • IAM User Account with AmazonEC2FullAccess and AmazonRoute53FullAccess IAM Policies
  4. SOFTWARE INVENTORY • Raspberry Pi Server • OpenLDAP • Mailstack

    - Dovecot, Postfix, Rspamd, OpenDKIM, OpenDMARC, Sieve • Darwin Calendar and Contacts Server • Let’s Encrypt • sshuttle • autossh • Cloud gateway • ssh
  5. HARDWARE INVENTORY • Raspberry Pi 3 ($40) • 32GB Class

    10 MicroSD Card with SD adapter ($12) • MicroUSB cable ($4) • USB power plug ($3) • Case ($8)
  6. LET’S GET STARTED • Windows Users • Install a decent

    ssh client like putty • Linux Users • Install avahi-daemon • Mac Users • Chill
  7. QUICKSTART • Open a browser and visit https://github.com/ privacylabs/oasis •

    Scroll down to the QuickStart section and get started • After you log in, change your password • We have already completed the “Preparing the Pi” section for you with the image on the microSD card
  8. IDENTITY • Leverages OpenLDAP for directory services • Single user

    account used to authenticate with mail, calendar, contacts and future services
  9. EMAIL • Dovecot (IMAP) • Postfix (SMTP/Submission) • Rspamd (Anti-Spam)

    • OpenDKIM (DKIM) • OpenDMARC (DMARC) • Automatically creates DNS records to be a trusted email server
  10. SECURITY • Leverages free, trusted certificates from the Let’s Encrypt

    project • All communications between your devices and the server are encrypted • Leverages fail2ban to reduce brute force attack threat
  11. ROUTING • autossh - keeps a persistent secure tunnel between

    your server and the cloud gateway for inbound connections. • sshuttle - keeps a persistent secure tunnel between your server and the cloud gateway for outbound connections. Provides static IP facade for server • Maneuvers around ISP blocking of port 25 for email server sending/receiving
  12. CONFIGURE CLIENTS • username is user in [email protected] • password

    is what you set in your ansible vault • server is mail.yourdomain.com • Ports • IMAP - 993 • SMTP (Submission) - 587 • CalDAV And CardDAV - 8443
  13. FINAL STEPS • Configure your Pi for your home WiFi

    network • See Step 8 under Preparing Your Pi in the README • Remove local repository from /etc/apt/sources.list • delete deb http://192.168.1.144/raspbian/mirror/raspbian/ jessie main contrib non-free rpi • Make sure you remember/store your 3 passwords • Vault • email user • Pi user account
  14. FOLLOW UP • email migration from your existing provider •

    TODOs • redundancy • availability • archiving • webmail • web UI for administration • update
  15. SET UP YOUR DOMAIN • Visit https://aws.amazon.com and create an

    account (1 year of free tier services) • Go to the AWS Management console and click on Route53 • Register your domain (e.g. girisreenivas.com)
  16. CREATE AWS ACCESS KEYS • Under “Security and Identity”, click

    Identity and Access Management (IAM) • Click Users • Click New Users • Enter user name • Download and save credentials • Select user from list • Click Permissions, Attach Policy and add ‘AdministratorAccess’ policy