admin

Mar 072015
 

There is a wealth of information about the performance of a website available from Google Webmaster Tools. The GWT frontend gives the possibility to manually export this information as several reports in CSV format.

But, to achieve a full integration with an external metrics and monitoring system (for instance, to be able to generate alerts when some conditions are met), a procedure to perform automatically the download of this information is required.

This post reviews a free and open source utility named GWTData that implements this functionality.

Continue reading »

 Posted by at 8:53 am
Mar 062015
 

vim (vi improved) is probably the most popular text editor in Linux systems. The main strengh of vim lies in the ability to use regular expressions to select and edit with a single command all lines that match a given text pattern.

But sometimes, the inverse is required: editing all lines that DO NOT match a text pattern. This is also possible in vim, as explained in this post.

Continue reading »

 Posted by at 11:48 am
Feb 212015
 

Sometimes, while editing a text file in vim, you might need to insert, rearch or replace characters that are not in your keyboard, such as  æ, å, ě, … or non-printing characters such as the control characters^A, ^B, … or characters with hexadecimal codes in the range 0x7F to 0xFF.

This post explains some of the possible ways that vim offers to handle those characters.

Continue reading »

 Posted by at 11:13 am
Feb 192015
 

Any server connected to the internet is exposed to attacks from hackers. They will attempt to break into the server trying every possible vulnerability, to take control of it and use it for their own purposes. To protect the server as much as possible, it is common to use some kind of firewall. On linux systems, the iptables package is one of the most used options to provide this functionality.

This post goes through a sample installation and configuration of iptables on a Debian system, together with other packages such as fail2ban, that automate the detection and reaction agains break-in attempts.

Continue reading »

 Posted by at 7:28 pm
Feb 142015
 

There are good reasons that might lead a website administrator to take the decision to implement the HTTPS security layer. Once the certificate is installed and the web server has been configured to accept HTTPS requests, the pages in the site will be accessible using https encrypted connections. But, by that time, surely  many of the pages will have already been indexed as using the http protocol by major search engines such as Google, Yahoo or Bing. There will also be backlinks to the site from pages in other domains, using “http://”

This post explains how to setup a redirect from the old “http://” to the new “https://” urls.

Continue reading »

 Posted by at 12:19 pm
Jan 242015
 

Hackers never cease trying any possible way to take control of servers connected to Internet.

The most common attacks are maybe those directed against the web service, leveraging any known vulnerabiliy in the underlying CMS: Joomla, WordPress, Drupal,… or implementation weaknesses of the service offered (SQL injection, etc.)

Together with these, servers are also exposed to attacks against the SSH service. SSH is a secure protocol used often by system administrators to open interactive sessions to the server. It is also used by automated procedures that use the rcp, rsync, sftp or similar commands to perform backups, and other administrative tasks.

This post explains some of the safety measures that can be taken to reduce the risk of hackers breaking into the system via SSH, and reduce the (sometimes significative) load that these attacks put on the server.

Continue reading »

 Posted by at 10:04 am
Jan 232015
 

A system administrator or DBA may need to connect quite often to a MySQL database from the command line, to perform administration and optimization tasks, and such. The common way to connect is executing the mysql client, with a set of arguments to specify the user and password to use, as well as the host, database and port where the instance is listening.

This post explains how to specify de defaults for all these arguments in a configuration file, to avoid having to type it again and again, every time a new connection to the database needs to be made.

Continue reading »

 Posted by at 6:07 pm