Category Archives: Linux Tips & Tutorials

Setup Remote Logging Server with Rsyslog


The objective of this tutorial is to configure a remote centralized log server using rsyslog. RsysLog server runs on both TCP as well as UDP port 514. But this tutorial is using UDP port. This setup is tested on CentOS 6 server & client machines.

How to setup Iptables firewall for outgoing IP rotation


The objective of this tutorial is to enable outgoing IP rotation. One of the common use cases of IP rotation is setting up mass mailing server. I am assuming we have already setup the SMTP (MTA) server here listening on all interfaces.

Setting up Fail2Ban for avoiding different kinds of Brute Force Attacks


To prevent the server from bruteforce attacks. Fail2ban will monitor the service and block the persons try to harm our server.

How to setup Amazon EC2 API on Linux Machine


The objective of this how to is to enable the use of various command line tools of Amazon such as EC2 API, S3 API, Route53 API, etc.

Setup DKIM keys with Sendmail


The purpose of this document is to enable DKIM keys setup on sendmail server so that email delivery into inboxes can be maximized.

Get Real Visitor IP in Apache Logs running behind a Load Balancer


The objective of this tutorial is to configure Apache webserver log settings to show the real visitor IP when Apache is running behind Load Balancer.

Redirect to

Many times we meet with a situation where we need to redirect root domains to www. With apache htaccess file you can put the following rule in .htaccess file of webroot directory of your domain

Troubleshooting MySQL Master-Slave Replication Errors

Many times I have seen broken MySQL Master-Slave syncing on various servers because of Duplicate Entry Errors. So here I am suggesting steps to overcome these issues.

Export Data to CSV Format in PostgreSQL


The objective of this article is to enable the system administrator to convert postgreSQL data in CSV format

Centralized Management with Puppet on CentOS 5


Puppet is a configuration automation tool that allows you to centralize management of the various Linux flavors running on your network. Puppet supports central management of the important aspects of your systems, such as: files, packages, users, services, cron, mounts, etc.

This is a step by step tutorial on how to install the Puppet Server (puppetmaster) on one machine, and the Puppet Client (puppetd) on another. We then perform a simple test to make sure Puppet is working properly.