Running Secure & Reliable Web/Mail/other Services from Home Part-II: Setting Up A SOHO Linux Web and Email Server



Similar documents
Host your websites. The process to host a single website is different from having multiple sites.

A Beginner's Guide to Setting Up A Web Hosting System (Or, the design and implementation of a system for the worldwide distribution of pictures of

Setup a Virtual Host/Website

owncloud 8 and DigitalOcean Matthew Davidson Bluegrass Linux User Group 03/09/2015

Cloud Homework instructions for AWS default instance (Red Hat based)

Web Server using Apache. Heng Sovannarith

Installing Rails 2.3 Under CentOS/RHEL 5 and Apache 2.2

LAMP Quickstart for Red Hat Enterprise Linux 4

Livezilla How to Install on Shared Hosting By: Jon Manning

iweb Management Packages - List of supported services and software

INUVIKA OVD INSTALLING INUVIKA OVD ON RHEL 6

CO Web Server Administration and Security. By: Szymon Machajewski

Migrating LAMP stack from x86 to Power using the Server Consolidation Tool

Apache and Virtual Hosts Exercises

Moving Drupal to the Cloud: A step-by-step guide and reference document for hosting a Drupal web site on Amazon Web Services

Installing Booked scheduler on CentOS 6.5

SIMIAN systems. Setting up a Sitellite development environment on Mac OS X. Sitellite Content Management System

Step-by-Step guide to setup an IBM WebSphere Portal and IBM Web Content Manager V8.5 Cluster From Zero to Hero (Part 2.)

User s guide. APACHE SSL Linux. Using non-qualified certificates with APACHE SSL Linux. version 1.3 UNIZETO TECHNOLOGIES S.A.

Linux VPS with cpanel. Getting Started Guide

Parallels Plesk Automation

How To Set Up A Virtual Host In Apa On A Linux Box On A Windows Xp Or Ipa On An Ubuntu Box On An Ipa (Windows) Or Ipo (Windows Xp) On A Ubora Box On Your Ubora

Software Collections

Virtual Host (Web Server)

GestióIP IPAM v3.0 IP address management software Installation Guide v0.1

Linux - CentOS 6 Install Guide

Setup Local Mail Server Using Postfix, Dovecot And Squirrelmail On CentOS 6.5/6.4

How to Install Multicraft on a VPS or Dedicated Server (Ubuntu bit)

OS Installation: CentOS 5.8

Install Cacti Network Monitoring Tool on CentOS 6.4 / RHEL 6.4 / Scientific Linux 6.4

ULTEO OPEN VIRTUAL DESKTOP UBUNTU (PRECISE PANGOLIN) SUPPORT

CTIS486 Midterm Solution 23/07/ Akgül

CentOS. Apache. 1 de 8. Pricing Features Customers Help & Community. Sign Up Login Help & Community. Articles & Tutorials. Questions. Chat.

INUVIKA OVD INSTALLING INUVIKA OVD ON UBUNTU (TRUSTY TAHR)

How to Use? SKALICLOUD DEMO

HOW TO BUILD A VMWARE APPLIANCE: A CASE STUDY

SIMIAN systems. Setting up a Sitellite development environment on Windows. Sitellite Content Management System

Red Hat System Administration 1(RH124) is Designed for IT Professionals who are new to Linux.

Dataworks System Services Guide

Integration Guide. SafeNet Authentication Service. Using SAS as an Identity Provider for Drupal

Bigstep Server Management Service Details

Fermilab Central Web Service Site Owner User Manual. DocDB: CS-doc-5372

Installing Rails 2.3 Under Windows XP and Apache 2.2

Ulteo Open Virtual Desktop Installation

OpenCATS Documentation

Setting up a Web Server using Raspbian Wheezy on the Raspberry Pi ( Kenneth A Spencer)

W3Perl A free logfile analyzer

Installing an SSL certificate on the InfoVaultz Cloud Appliance

Rancid Server Build and Operation Overview (v0.3) (This is being done from memory so expect some errors)

Virtual Host Continue

Deployment - post Xserve

HW9 WordPress & Google Analytics

dotdefender v5.12 for Apache Installation Guide Applicure Web Application Firewall Applicure Technologies Ltd. 1 of 11 support@applicure.

PHP in RPM distribution

Parallels Plesk Panel

Using Red Hat Enterprise Linux with Georgia Tech's RHN Satellite Server Installing Red Hat Enterprise Linux

Providing an Effective Intranet Knowledge Base Using Linux and Open Source Software

Server Installation/Upgrade Guide

KonyOne Server Installer - Linux Release Notes

Tips for getting started! with! Virtual Data Center!

Linux Administrator (Advance)

How to setup HTTP & HTTPS Load balancer for Mediator

Web Hosting: Pipeline Program Technical Self Study Guide

WebBridge LR Integration Guide

i2b2: Security Baseline

EZblue BusinessServer The All - In - One Server For Your Home And Business

Installation 42goISP Manager

ABS Manual Installation Guide

Getting an ipath server running on Linux

Installation and Control in Linux

Linux Network Administration

NAS 109 Using NAS with Linux

OnCommand Performance Manager 1.1

AJ Matrix V5. Installation Manual

MLADEN

Installing buzztouch Self Hosted

About This Document 3. About the Migration Process 4. Requirements and Prerequisites 5. Requirements... 5 Prerequisites... 5

Installation documentation for Ulteo Open Virtual Desktop

Getting Started in Red Hat Linux An Overview of Red Hat Linux p. 3 Introducing Red Hat Linux p. 4 What Is Linux? p. 5 Linux's Roots in UNIX p.

Oracle Net Service Name Resolution

Installation Instructions

Zend Server 5.0 Reference Manual

EZblue BusinessServer The All - In - One Server For Your Home And Business

BOA BARRACUDA ON ÆGIR ~ MY FIRST YEAR ~ Mladen

Installation & Upgrade Guide

Document Freedom Workshop DFW 2012: CMS, Moodle and Web Publishing

CC ICT-SUD. Setting up and integrate Apache, MySQL and PHP on a Linux system

Zenoss Core Installation and Upgrade

Contents. 1. Infrastructure

UQC103S1 UFCE Systems Development. uqc103s/ufce PHP-mySQL 1

Apache Usage. Apache is used to serve static and dynamic content

ULTEO OPEN VIRTUAL DESKTOP V4.0

Apache HTTP Server. Implementation Guide. (Version 5.7) Copyright 2013 Deepnet Security Limited

INSTALLATION GUIDE VERSION

Installation Guide. Copyright (c) 2015 The OpenNMS Group, Inc. OpenNMS SNAPSHOT Last updated :19:20 EDT

JAMF Software Server Installation and Configuration Guide for Linux. Version 9.2

Ubuntu Sever Administration

Rails Application Deployment. July Philly on Rails

Expresso Quick Install

deploying meteor with meteor up

Transcription:

Running Secure & Reliable Web/Mail/other Services from Home Part-II: Setting Up A SOHO Linux Web and Email Server 2007 Robert Taylor tinman@robotterror.com All rights reserved

About Me Robert Taylor (A.K.A. Robot Terror) Linux Admin II Rackspace Managed Hosting BS Info Sys, SCJP, RHCT Father of three, husband of one

Part-II: Setting Up A SOHO Linux Web and Email Server Choices, choices, choices Distro Web Server MTA Other Services

Choice 1: Distro Mainstream Debian line - Ubuntu Server Red Hat line - RHEL / CentOS Specialty Devil-Linux, etc. Bonus choices

Choice 2: Web Server LAMP Linux Apache MySQL Perl PHP JAML Java Apache MySQL Linux Proprietary stacks IIS, re-branded Apache (websphere, stronghold, etc.) Specialty lighttpd, mongrel, boa, thttpd

Choice 3: Mail Sendmail - granddady Postfix - sendmail-compatible but simpler QMail - love it / hate it Exim - debian standard

My Choices CentOS 5 LAMP: Linux, Apache, MySQL, PHP Perl Sendmail / Dovecot / Squirrelmail

Platform Setup Installing CentOS 5 Get the ISO http://isoredirect.centos.org/centos/5/isos/i386/ Boot, Click, Use Man, this is simple (*Caveats*) selinux and RHEL5/CentOS5 yum, yum (A.K.A., Repo Man)

SELinux-fu <caveat implementor!> The following one-liners are *hacks* to quickly get past SELinux policy limits that prevent commonly used web service configurations. Using audit2allow bypasses the limitations by force. Use only when initially configuring your server within a secure environment. PGM= httpd ; grep $PGM /var/log/audit/audit.log audit2allow -M $PGM && semodule -i $PGM.pp (NB: change httpd to the name of the command violating SELinux policies) Do you feel LUCKY?? :-) This one-liner bypasses ALL SELinux policy restrictions logged to date. cat /var/log/audit/audit.log audit2allow -M all && semodule -i all.pp

Installing Services Using yum yum check-update yum search <package> yum update <existing package> yum install <new package>

Web Server Setup Configuring Apache Listen up! (Listen <port>) How may I direct your call? (VirtualHost)

/etc/httpd/conf/httpd.conf Listen 80 ServerAdmin webmaster@robotterror.com ServerName home.robotterror.com CustomLog logs/access_log combined ServerSignature Off NameVirtualHost *:80 <VirtualHost *:80> ServerName default DocumentRoot /var/www/html </VirtualHost> <VirtualHost *:80> ServerName riceyes.com ServerAlias www.riceyes.com ErrorLog logs/riceyes.com-error_log CustomLog logs/riceyes.com-access_log combined </VirtualHost>

Sendmail /etc/mail/sendmail.mc DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl MASQUERADE_AS(`robotterror.com')dnl FEATURE(masquerade_envelope)dnl FEATURE(masquerade_entire_domain)dnl # service sendmail restart /etc/mail/virtusertable @riceyes.com rtaylor # makemap hash /etc/mail/virtusertable \ < /etc/mail/virtusertable # service sendmail restart

Squirrelmail Squirrelmail install steps: yum install squirrelmail yum install php-pear yum install php-mysql pear channel-update pear.php.net pear install DB service httpd restart /usr/share/squirrelmail/config/config.pl http://riceyes.com/webmail/src/configtest.php

squirrelmail, cont d MySQL: # mysql -u root -p create database hrt_sqm; CREATE USER 'hrt_sqm'@'localhost' IDENTIFIED BY password ; grant all on hrt_sqm.* to 'hrt_sqm'@'localhost'; flush privileges; CREATE TABLE address ( owner varchar(128) DEFAULT '' NOT NULL, nickname varchar(16) DEFAULT '' NOT NULL, firstname varchar(128) DEFAULT '' NOT NULL, lastname varchar(128) DEFAULT '' NOT NULL, email varchar(128) DEFAULT '' NOT NULL, label varchar(255), PRIMARY KEY (owner,nickname), KEY firstname (firstname,lastname) ); CREATE TABLE userprefs ( user varchar(128) DEFAULT '' NOT NULL, prefkey varchar(64) DEFAULT '' NOT NULL, prefval BLOB DEFAULT '' NOT NULL, PRIMARY KEY (user,prefkey) );

Mail Alternative To have virtual users with virtual domains (that is, not using system accounts) there are several How-Tos available that walk one through the steps necessary to set everything up. A future version of this presentation will incorporate this step-by-step for CentOS5. In the meantime, review these resources: http://www.opensourcehowto.org/how-to/mysql/mysql-userspostfixadmin-postfix-dovecot--squirrelmail-with-userprefs-stored-inmysql.html http://www.howtoforge.com/ virtual_users_postfix_courier_mailscanner_clamav_centos http://www.google.com/search?q=postfix+imap+mysql+virtual

Web Apps Portals All-in-one content management systems Galleries Image and Video galleries for family pics & more Blogs Host your own journal and spin-zone http://opensourcecms.org Live demos of Free PHP web apps

Bonuses poor man s GoToMyPC.com vnc ssh -fy rtaylor@riceyes.com /usr/bin/startxfce4 Other servers! IIS? Sure! NFS / FTP... the possibilities are endless