Author Archives: Geneva Sibanda

About Geneva Sibanda

I assist companies in the Areas of Network Infrastructure Design and Implementation: (from Windows Active Directory Security, networking, etc.).

How to protect a VPS from DDOS attacks

What is DDoS attacks

(DDoS attack) In computing, a denial-of-service attack or distributed denial-of-service attack is an attempt to make a machine or network resource unavailable to its intended users.

How to protect yourself from DDoS:

There are many Operating System level solutions to protect against application and transport-layer DDoS attacks, like SYN cookies, Hardware firewalling Appliance like Fortinet product range to iptables based firewall, etc.

However, to protect your VPS against a full bandwidth flood to DNS amplification attacks to brute-force Layer 7 attacks, and these attacks range from 1Gbps to 300Gbps bandwidth floods. Unfortunately there is little you can do, as it is a function of your VPS provider to employ proper DDoS protective measures.

One good solution (which will also help you to protect your VPS from a range of online threats from spammers to SQL injection to DDoS) is to point your domain at an advanced DDoS protection provider like Cloudflare: https://www.cloudflare.com/

CloudFlare will give you insight into what’s happening to VPS and reveal the source of the IP address trying to DDoS attack you.

There you have it!

How to create mysql database, using mysqladmin

What is MySQLAdmin?

mysqladmin is a client for performing administrative operations. You can use it to check the server’s configuration and current status, to create and drop databases, and more.

Howto?

gen@en-01# mysqladmin -u sibanda -p create sibdb

Enter password:

It is recommended that If you create a new database it’s good to create user with permissions only for the database you are creating (if anything goes wrong you won’t compromise root user login and password).

Hope you find this helpful.

How to install webmin on ubuntu server

About Webmin:

Webmin is a web-based interface for system administration for Unix. Using any
modern web browser, you can setup user accounts, Apache, DNS, file sharing and
much more. Webmin removes the need to manually edit Unix configuration files
like /etc/passwd, and lets you manage a system from the console or remotely.

Preparing your system

Open the terminal and run the following command

sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python

Now you need to download webmin deb package using the following command

root@en-01:/backups#wget http://downloads.sourceforge.net/project/webadmin/webmin/1.610/webmin_1.610_all.deb

Install downloaded package using the following command

root@en-01:/backups# sudo dpkg -i webmin_1.610_all.deb

Selecting previously unselected package webmin. (Reading database … 61043 files and directories currently installed.) Unpacking webmin (from webmin_1.610_all.deb) … Setting up webmin (1.610) … Webmin install complete. You can now login to https://en-01:10000/ as root with your root password, or as any user who can use sudo to run commands as root. Processing triggers for ureadahead … ureadahead will be reprofiled on next reboot

root@en-01:/backups#

How to setup Varnish Cache Server on Ubuntu

What is Varnish Cache Server?

Varnish Cache is a web accelerator, sometimes referred to as a HTTP accelerator or a reverse HTTP proxy, that will significantly enhance your web performance and web content delivery. Varnish Cache speeds up a website by storing a copy of the page served by the web server the first time a user visits that page. The next time a user requests the same page, Varnish will serve the copy instead of requesting the page from the web server. This means that your web server needs to handle less traffic and your website’s performance and scalability go through the roof. In fact Varnish Cache is often the single most critical piece of software in a web based business. Varnish Cache is used by more than 1,7 million websites worldwide to deliver web content faster.

How does it work?

You install varnish Cache in front of any web server that uses HTTP and configure it to cache the contents. The result? Varnish will speed up the delivery of your web content significantly, depending on your architecture.

Installation on Ubuntu Server.

Varnish is distributed in the Ubuntu package repositories, but the version there might be out of date, and we generally recommend using the packages provided by varnish-cache.org. Please be advised that we only provide packages for Ubuntu’s LTS releases, not all the intermediate releases. Note that the packages might still work fine on newer releases.

To use the varnish-cache.org repository, do the following:

1. curl http://repo.varnish-cache.org/debian/GPG-key.txt | sudo apt-key add –
2. echo “deb http://repo.varnish-cache.org/ubuntu/ saucy varnish-4.0” | sudo tee -a /etc/apt/sources.list
3. sudo apt-get update
4. sudo apt-get install varnish

If you prefer to install the older 2.1 version, replace varnish-4.0 with varnish-2.1 in the command above

To Configure your Varnish installation.

The Varnish daemon is configured by using command line:

1. vi /etc/varnish/default.vcl

Varnish comes with a default configuration ( default.vcl in /etc/varnish/ ), so you won’t have to define all the subroutines yourself. This default file is set up to work straight out of the box after you have defined a backend. Please note that default subroutines will be invoked should the custom configuration not terminate with a keyword.

Hope you find this helpful.

Pope: Internet is a ‘gift from God’ for dialogue

The Internet is a “gift from God” that facilitates communication, Pope Francis said in a statement. I fully agree with Pope (ngiyavumelana naye uPope Francis)

His Holiness Pope Francis fully understands that internet has become a part of every day life and offers a variety of benefits to everyone who is willing to use it.

I wonder if the leaders at Davos 2014 talkshow really understand the power of THE INTERNET, I believe they DO? And it’s potential opportunities to boost economic fortunes by creating a pool of entrepreneurs who in turn will create jobs, especially here in Africa.

The Internet can be used as a catalyst for job creation (in Africa). However, in Africa there are a whole host of problems. We are still to deal with very expensive internet access.

Telecommunication Infrastructure investments are necessary in Africa, to improve Internet access services experience for users in Africa.

African leaders need to focus more on how to address the “time bomb” of youth unemployment across the Africa continent. Leaders need a bit of empathy to youth issues, and willing to listen, acknowledge and work with us to solve those unemployment challenges.

We believe that technology can play a significant role, in creating much needed jobs and the BIG question is HOW?

We can harness the power of technology to make a real difference in people’s lives.

I will provide practical examples in a form of howtos…

mysqldump: Got errno 28 on write

mysqldump: Got errno 28 on write
ERROR: mysqldump command did not succeed.

You are backing up your MYSQL database using mysqldump command line tool and you encounter the above error message. In my case I was outputting my mysql backup database file to an external usb drive.

The issue here was that my external usb drive had run out of free disk space and the above error means that sufficient disk space is not available to do backups.

To resolve this problem, simply free up disk space and re-run the mysqldump command line tool for MySQL to backup your database.

How to backup MySQL Database in command line

How to backup MySQL Database in command line

enemy@en-01:/mnt/usbstick# mysqldump -u enemy -p sibanda > sibanda.sql

Enter password: *******

enemy@en-01:/mnt/usbstick# ls -l sibanda.sql
-rwxr-xr-x 1 enemy enemy 499973 2014-01-24 20:13 sibanda.sql

There you have it!

Problem Updating WordPress, Themes and Plugins

You are trying to Update WordPress CMS, Themes and Plugins to the latest Version on Ubuntu Web Server, and you encounter error messages similar to the following:

  1. To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.
  2. Could not create directory. wp-content/upgrade/xxx.tmp
  3. removing the old version of the plugin… could not remove the old plugin. plugin update failed.
  4. an error occurred while updating twenty eleven: could not remove the old theme..
  5. The list goes on …etc

Resolution that worked for me:

You need to set the proper filesystem privileges:

Access your Ubuntu Web server through SSH and then run this command

en-01#chown -R www-data:www-data /var/www/mysite/public_html

Thats all!

How to remove a child domain that no longer exists

Here are the steps to remove a child domain that no longer exists.

RDP – onto PDC Run – cmd at command prompt type – adsiedit.msc and then press <enter> Expand Domain – click on cn=system On the right pane, right click on the child domain you want to remove and delete

Still in ADSIEdit.msc tool

Expand Configuration – click on cn=partitions On the right pane, right click on the child domain entries you want to remove and delete.

Now at cmd – run – repadmin /syncall to replicate across your sites.

There you have it!

The mcrypt extension is missing. Please check your PHP configuration.

After logging on to phpmyadmin, I ecountered the following error message at the foot of the page:

The mcrypt extension is missing. Please check your PHP configuration.

Solution that worked for me was to action the following:

en-01# apt-get install php5-mcrypt
en-01# ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/mcrypt.ini
en-01# php5enmod mcrypt
en-01# service nginx reload
en-01# service php5-fpm restart

In my case, that’s all I did!