Category Archives: Ubuntu

CRITICAL | sd-XXXX.host.net | (Return code of 255 is out of bounds)

So!,

My nagios was returning a CRITICAL error on one of my servers…

CRITICAL | sd-XXXX.host.net | (Return code of 255 is out of bounds)

and httpd server wasn’t responding….

I think that problem was on IPTABLES / FAIL2BAN ban list. I had 702 banned IPs…
After I clean them up, everything went okay!

captura-de-ecra%cc%83-2016-11-21-as-19-11-52

I was playing hard with them… my bantime was 3600000 (41d) and my findtime was 60000 (16h)…

 

Ubuntu Nagios NRPE – 1, 2, 3 install!

 

0. Update the system

apt-get update && apt-get upgrade

1. Install nagios nrpe & nagios plugins

apt-get install nagios-nrpe-server nagios-plugins

2. Configure NRPE

vi /etc/nagios/nrpe.cfg

Search for server_address and replace 120.0.0.1 for the public ip of this machine.
Search for allowed_hosts and replace 120.0.0.1 for the IP of your nagios server.

3. Restart NRPE

/etc/init.d/nagios-nrpe-server restart

That’s kinda it…

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

This new server with Ubuntu 16.04 LTS cames with PHP 7.0.

The backup that I have from my client has some old WordPress blogs…

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

I need to downgrade PHP 7.0 to PHP 5.6, at least for now.

Before you procede with the tutorial on the following link, and if you are running a new Ubuntu 16 installation you might get upon the following error while following the tutorial.

[email protected]:/home/httpd/html# sudo add-apt-repository ppa:ondrej/php
sudo: add-apt-repository: command not found

To install add-apt-repository you will need to run the following command

sudo apt-get install software-properties-common

Now the solution  How can I downgrade from PHP 7 to PHP 5.6 on Ubuntu 16.04? [duplicate].

 

Ubuntu 16.04 LTS tutorials

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 16.04
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04

How to secure an Ubuntu 16.04 LTS server

https://www.thefanclub.co.za/how-to/how-secure-ubuntu-1604-lts-server-part-1-basics

The Perfect Server – Ubuntu 16.04 (Xenial Xerus) with Apache, PHP, MySQL, PureFTPD, BIND, Postfix, Dovecot and ISPConfig 3.1

https://www.howtoforge.com/tutorial/perfect-server-ubuntu-16.04-with-apache-php-myqsl-pureftpd-bind-postfix-doveot-and-ispconfig/

How To Protect WordPress with Fail2Ban on Ubuntu 14.04

https://www.digitalocean.com/community/tutorials/how-to-protect-wordpress-with-fail2ban-on-ubuntu-14-04

UFW Essentials: Common Firewall Rules and Commands

https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands

Other readings…

Potential ufw and fail2ban conflicts

http://askubuntu.com/questions/54771/potential-ufw-and-fail2ban-conflicts