Apache Configuration

apache

Distro: Ubuntu LTS 14.04.03 64bit Expertise Level: Medium

Quick disclaimer; I do not take full credit for the documentation its sole purpose is educational. Portions of this tutorial have been rebuilt from existing tecmint.com tutorials.


Apache Tutorials:

  • Check if web services are currently running
    • Run bash command: ps -ef | grep -Ei ‘(apache|httpd)’ | grep -v grep
    • Perform localhost lookup “localhost” or “127.0.0.1” on the webbrowser
  • Apache Configuration
    • To configure options: /etc/apache2/apache2.conf
    • LogFormat “%h %l %u %t \”%r\” %>s %b” [nickname]

Continue reading

Iptables Configuration

iptables Distro: Ubuntu LTS 14.04.03 64bit Expertise Level: Medium

Quick disclaimer; I do not take full credit for the documentation its sole purpose is educational. Portions of this tutorial have been rebuilt from existing tecmint.com tutorials.
IPTABLES – Advanced IP and Network Device Configuration :
 
  • # iptables -L (displays chains=group of rules and assigned default policies)

Append Rules

Continue reading

Setting Up Email Services (SMTP, Imap, Imaps) and Restricted Access to SMTP

postfix

Distro: Ubuntu LTS 14.04.03 64bit Expertise Level: Medium

Quick disclaimer; I do not take full credit for the documentation its sole purpose is educational. Portions of this tutorial have been rebuilt from existing tecmint.com tutorials.

Installing Postfix and Dovecot

  • # apt-get install postfix dovecot-imapd dovecot-pop3d or;
    • We can call on a metapackage: # apt-get install mail-stack-delivery
  • Create email users with: addusers –shell /bin/false . These are “real” PAM users accounts on the Linux server box.
  • Map in postfix :
    • vim /etc/postfix/aliases = testadmin: user1, user2 <=== emails sent to testadmin will be sent to user1 and user2
    • create db lookup table = # postalias /etc/postfix/aliases
    • # vim /etc/postfix/main.cf:
      aliases_maps = hash:/etc/postfix/aliases
      aliases_database = hash:/etc/postfix/aliases

Continue reading

Cryptsetup Configuration

crypt
Distro: Ubuntu LTS 14.04.03 64bit
Expertise Level: Medium

Quick disclaimer; I do not take full credit for the documentation its sole purpose is educational. Portions of this tutorial have been rebuilt from existing tecmint.com tutorials.
  • Step 1: We will be using the latest stable version of Ubuntu LTS available free for download at Ubuntu Server
  • Step 2: Lets get our hands dirty and open the command line: Login as root, sure why not: $sudo su
  • Check if kernel modules are built in: # grep -i CONFIG_DM_CRYPT /boot/config-$(uname -r)
  • Install the application “cryptsetup”: # apt-get update && apt-get install
  • Stage a blank disk (ie. /dev/sdb):
    • Create a virtual volume drive: # dd if=/dev/urandom of=/dev/sdb bs=4096 Partition using fdisk :
      fdisk /dev/sdb Command (m for help): n
      Partition type: P
      Partition number: default
      First Sector: default
      Last Sector: default
      Command (m for help): w

Continue reading

Squid3 Configuration

squid

Distro: Ubuntu LTS 14.04.03 64bit Expertise Level: Medium

Quick disclaimer; I do not take full credit for the documentation its sole purpose is educational. Portions of this tutorial have been rebuilt from existing tecmint.com tutorials.

Objectives

ACL’s – Restriction to websites and/or monitor access per user basis. This option can be fine-grained by date, domain, etc

Bypassing Web Filters – requests are made through the web proxy and available to the client, instead of accessing the internet directly.

Continue reading