Skip to content

server

How To Change The TCP/IP MTU On Windows Server 2016

Over the year’s I’ve had numerous occasions arise when I needed to change the MTU on a Windows based computer.  There are a million reasons why this is needed, such as the following.

  • Windows Servers deployed in an OpenStack environment require the MTU to be decreased to 1454 in order to work correctly with Neutron.
  • DSL very commonly uses a smaller 1492 byte MTU when deployed with PPPoE encapsulation, so performance can be significantly degraded if the router and computers are not decreased to match.
  • VPN connections over DSL and some WIFI networks are notorious for failing unless the MTU is adjusted.

 

What Affect Does MTU Have?

 

Packet size, also known as MTU or Maximum Transmission Unit, is the largest amount of data that can be transferred in one packet at the physical layer (OSI Layer 1) of the network. Ethernet’s default MTU is 1500 bytes without using Jumbo Frames.  For PPPoE the MTU is 1492 and dial-up connections typically used 576 back in the day.

Each transmission unit contains of header and actual data. This data is called the MSS, or Maximum Segment Size.  MSS defines the largest segment of TCP data that can be transmitted in a packet.  In a more summarized manner,

MTU=MSS + TCP & IP headers.

Click Here To Keep Reading!

Install OpenStack on a Single Ubuntu 16.04.1 Xenial Xerus Server Using Conjure-up

Introduction

 

It’s been some time since I wrote Installing Ubuntu OpenStack on a Single Machine, Instead of 7.  Since then, there have been many updates to both OpenStack, and Ubuntu.

This tutorial will guide you through installing OpenStack on a single Ubuntu 16.04 Server.  I will be installing Ubuntu and OpenStack within a virtual machine hosted on a VMware ESXi Hypervisor, but any fresh installation of Ubuntu 16.04 should work fine, as long as it meets the minimum requirements below.  I will be using conjure-up to install the environment due to the fact that Ubuntu’s Openstack-install package doesn’t working on Ubuntu 16.04.1 at this time.

 

Note:  I have written an updated guide on Installing OpenStack on Ubuntu 16.04 LTS using devstack.  I suggest following that guide unless you have a specific reason for using the conjure-up method.  From my experience, the devstack method requires less resources, runs faster, and performs much better once deployed.

 

Minimum Requirements

 

To install the entire environment on a single physical server or virtual machine, you will need at least:

 

  • 8 CPU’s (vCPUs will work just fine)
  • 12GB of RAM (minimum needed to successfully start everything, more is better)
  • 100GB Disk Space (SSD Prefered, but rotating disk will work)
  • Ubuntu 16.04.1 Xenial Xerus x64 Server(only OpenSSH Server installed)

Click Here To Continue Reading!

How to move a WordPress site to a new server or host with no downtime

Yesterday, I finished building a new and improved WordPress server. This means I had to migrate the serenity-networks.com WordPress installation from the old server to the new. I wanted to do this with zero downtime, which is actually quite easy and straightforward if you have a plan in place. The process works something like this.

  • Export the database from the old server using phpmyadmin
  • Copy all WordPress files from the old server to the new server
  • Import the database on the new server using phpmyadmin
  • Add temporary hostname entry into your local hosts file

You might be asking yourself, why on earth would I add a hostname entry into the hosts file on my workstation? Well, this will allow you to pull your website from the new server without changing your public DNS settings. If you are only hosting one site on the new server, and not using virtual headers, you can skip this step if you like. So lets get it started.

Moving a WordPress site to a new server

The only real requirement, other than a server capable of running WordPress, is having phpmyadmin installed on both of your web servers. Most already do, but if you don’t, click here to learn how. We need this to export and import the WordPress database.

First, log into phpmyadmin on your old server so we can download the WordPress database. It should be pretty obvious which database is for your WordPress instance, but if you aren’t sure you can see the name of it by looking at the wp-config.php file, located in the root of your WordPress installation.

Select your database in the left column and then click the Export tab at the top of the right column. Leave the selection set as Quick, and click Go.

Click Here To Read The Rest!

How to build your own WPEngine copycat WordPress server on Ubuntu 14.04 with an Ansible Playbook

There is no denying that WPEngine offers the fastest WordPress hosting on planet earth. They’ve invested millions into building the fastest platform possible. That’s why they charge so much money for their services. Because they are worth it. Some of us can’t afford to pay $100-$1000/mo for WordPress hosting. The good news is that if you’re not afraid to get your hands dirty on a Linux command line, you can build your own server that will get you most of the way to a WPEngine class WordPress instance. There are a few key technologies that make this possible.

  • Percona DB (like MySQL)
  • HHVM – A super fast PHP VM
  • PHP-FPM – Just in case HHVM has a problem
  • NGINX
  • Varnish – Awesome reverse proxy cache
  • Memcached & APC

I think you’re probably starting to get the idea. These are the highest performers of the high performance technologies out there. We’re going to make them all work together to make your site blazing fast. It’s not all that hard and it doesn’t take very long.

All you need is a VPS or Virtual Machine running Ubuntu 14.04. Go ahead and SSH into it and we’ll get started.

How to build a WPEngine copycat server for FREE

The server you are working with MUST be able to resolve the hostnames of the sites you’re going to set up, to itself. So, if you are building this to replace a server that’s running and you don’t want to take that site down until everything is migrated, simply add hostname entries mapping the FQDN to the IP address in /etc/hosts.

First thing’s first, let’s make sure your Ubuntu 14.04 installation is updated and upgraded.

sudo apt-get update && sudo apt-get upgrade

Now we need to add the Ansible ppa.

sudo add-apt-repository ppa:ansible/ansible

Click Here To Read The Rest Of This Post!

How to install OMD (Open Monitoring Distribution) on Ubuntu 14.04

Open Monitoring Distribution (OMD) is an Open Source network, server, and datacenter monitoring platform and it’s absolutely fantastic. It’s basically a bunch of different monitoring systems all pooled into one platform. My favorite part of OMD is that it includes Check_MK, which I think is the best monitoring interface out there. But, it’s a lot more than that. Here is a breif list of what OMD contains (there’s more than this).

  • Nagios
  • Icinga
  • Shinken
  • Check_MK
  • Multisite
  • DokuWiki
  • NagVis
  • pnp4nagios
  • rrdtool

That’s just a brief list of all the greatness that’s packaged into OMD. Every network and home lab should have an OMD installation running on a virtual machine to keep tabs on everything and alert you when something goes wrong. Today, I’ll be installing and configuring OMD on an Ubuntu 14.04 virtual machine. So, lets get started already.

Installing OMD on Ubuntu 14.04

I always like to make sure everything is updated and upgraded when I’m setting up a new server. So lets go ahead and do that.

sudo apt-get update

sudo apt-get -y upgrade

Now we can get to work installing OMD. Fortunately, there are OMD packages already made for some of the more popular Linux distributions, Ubuntu 14.04 included. You can see all of the available packages by clicking on this link. As of this writing, OMD version 1.20 is the latest so that’s what I’m going to install. Check and see what the latest version is before getting started.

Click Here To Read The Rest Of The Post!

How To Build An INSANELY FAST WordPress Server On Ubuntu 14.04, Using NGINX, HHVM & MySQL

So, you want to build a WordPress server? One that won’t barf all over itself every time a link is posted to Digg or Reddit? Well, you’ve come to the right place. Building an insanely fast web server isn’t rocket science. It’s actually pretty darn straight forward. I’ve built more web servers than I care to remember, which means I’ve also made more mistakes I care to remember. All in the name of trying to make things faster. If speed is your goal, there’s only a few important key things to remember. If speed is absolutely the most critical variable in a situation, my philosophy is something like this:

  • KISS – Keep It Simple Stupid. Seriously… No control panels, plugins, or other bloated garbage.
  • Cache, Cache, and Cache some more. Caching is a godsend. Reduces requests, reduces transfer time, therefore reducing load times!
  • FAST Server – This should be a given, but no shared servers. Only VPS, VM or bare metal awesomeness.
  • Optimization – Optimize, minimize, downsize, and compress everything as much as you can get away with.
  • Optionally, using a CDN (Content Delivery Network) can really speed things up; as well as a high quality distributed DNS service. But, not absolutely necessary.

Like I said, we’re talking about building an INSANELY FAST WordPress server here. Obviously if you’re Joe Shmoe from Motown, you can probably get by just fine on a quality managed hosting provider, like Serenity-Networks. But, if you want to build the fastest web server on earth, continue reading.

There are plenty of Linux Distributions out there that will work just fine. I prefer CentOS and Ubuntu. For this guide, I’ll be using Ubuntu 14.04 LTS (Long Term Support). This OS will be supported for many years, with security updates. That’s good, especially for a server. If you don’t have it, go to http://www.ubuntu.org and go to downloads, then server. Be sure to select the 14.04 LTS version.

Now, assuming you have done a minimal install of Ubuntu 14.04, with only OpenSSH selected for packages (for remote SSH connection, obviously), we will be using some commonly known building blocks to turn this into a very fast web server.

  • NGINX Web Server – Many THOUSANDS of the fastest sites in the world use it. It’s the best.
  • HHVM – This is a very high performance virtual machine that takes care of processing PHP (as well as HACK). Because it turns PHP into machine language, very quickly, it can really speed things up.
  • MySQL – Kind of boring, but every site needs a database, so we’ll use this one.

Getting Started

Click Here To View The Entire Tutorial!

How To Install & Configure Fail2Ban On Ubuntu 14.04 LTS To Block Brute Force Attacks Against SSH and Apache Web Server

As you’ve probably heard me say before, if you have a public facing Linux server, meaning one or more open or forwarded ports, Fail2Ban absolutely must be installed. Fail2Ban monitors log files for excessive login attempts, also called Brute Force attacks. They are extremely common place on the internet. I have never had a public facing server that has gone more than a few days without some hacker trying to brute force it. These attacks go like this. Someone writes a script, or uses a program, that reads a bunch of possible usernames from a text file that has nothing but millions of usernames. There is also a text file with millions of passwords. The script will attempt to go through all username and password combinations until it finds one that can login successfully. Obviously, if you get a hundred or more login attempts from one IP address, nothing good will ever come from that IP so it pretty safe to assume it should be blocked, at least for some period of time.

Fail2Ban does precisely this. It constantly watches any log file you tell it to watch, and when a certain number of login attempts are logged from an IP address, Fail2Ban will automatically create an iptables rule to block all traffic from that IP address for a given period of time. Because brute force attacks take a long, long time, blocking one early on pretty much eliminates the possibility of a successful attack. SSH is the most common service / port for brute force attacks, from my experience. With FTP and POP3 (email) coming in second and third. It’s a no-brainer to set up Fail2Ban to automatically block attacks. It gives you much needed protection and security for your servers. So, here we go.

How to Install Fail2Ban on Ubuntu 14.04 LTS (Trusty)

First and foremost, let’s make sure apt is updated.

#  sudo apt-get update

Now we can install Fail2Ban. Since there is an aptitude package already, we will use that to install.

#  sudo apt-get install fail2ban

Surprisingly, that’s all you need to do to install it. You do, however, need to edit the main configuration file for Fail2Ban, which is jail.conf. Lets go ahead and open it up with nano and take a look.

#  sudo nano /etc/fail2ban/jail.conf

Click Here To Read The Entire Tutorial