Leo G

How to install an Opensource VPN Server on Linux

How to install an Opensource VPN  Server on LinuxOne of the most concerning factors to me while browsing, Is how can I ensure that my data remains private and secure ? While searching for answers, I came cross a number of ways in which you can remain anonymous like using a proxy website. But still using a third party service was not assuring... Read More »

Using Foreman, an Opensource Frontend for Puppet

Using Foreman, an Opensource Frontend for PuppetThe recent vulnerability in bash, got me running to update bash. It’s easy when you have maybe one or two Linux servers, but what do you do if you have 100’s or even thousands or servers? You need to use a server configuration and management tool like puppet. However, instead of using the command line,... Read More »

Using GIT to backup your website files on linux

Using GIT to backup your website files on linuxWell not exactly Git but a software based on Git known as BUP. I generally use rsync to backup my files and that has worked fine so far. The only problem or drawback is that you cannot restore your files to a particular point in time. Hence, I started looking for an alternative and found... Read More »

How to install Ruby, Ruby on Rails and Phusion Passenger on CentOS

Lately, I have been writing apps in ruby instead of PHP, as it has a low learning curve especially if you know bash scripting and an awesome framework called Rails. Ruby on Rails was so easy to work with that I got my app up and running in 48 hours. You can check it out... Read More »

How to configure and secure your Postfix email server

How to configure and secure your Postfix email serverOnce you have your application server up and running, you are going to need a good email server to deliver your emails. I have been using postfix for all my servers and below is the configuration I generally use. Installation of Postfix on CentOS 6 yum install postfix Sendmail is installed by default, so it... Read More »

How to configure and Install Config Server Firewall & Login failure Daemon

How to configure and Install Config Server Firewall & Login failure DaemonWhenever I setup a Linux VPS, the first thing I do is install a firewall. I have noticed an increase in attacks on my servers, especially from China. I use Config Server Firewall (CFG) and Login Failure deamon (LFD) because they are easy to set up and provide additional features like suspicious file reporting and... Read More »

How to create an Init script on Centos 6

How to create an Init script on Centos 6In my  last Shell Scripting tutorial, I used “inotifywait” along with rsync to create a real time file syncing script called backup. This script will run till I manually kill it or till I close my terminal, if I run it as a background process. Now I cannot keep my terminal open forever, but I... Read More »

How to use inotify-tools to trigger scripts on filesystem events

How to use inotify-tools to trigger scripts on filesystem eventsIn my last example of Bash if statements we created a backup script which would run “rsync” as per the time set in a cron. But wouldn’t it be nice if we could run our “rsync” script only if there was a change to the files in our directory instead of running a cron every... Read More »

How to display a changing output like top

In my earlier post on linux memory management, I showed you how you can get the exact memory usage of your script by using py_mem.py. This script, without any options will run once and give you the current memory usage of the system. But what if you wanted real time memory usage?, In other words,... Read More »

Advance text processing examples in awk

Advance text processing examples in awkLast week I was reading up on awk and was fascinated by its text processing capabilities despite been written more than 3 decades ago. Although, I mostly use awk for printing columns while troubleshooting a DDOS attack or to find high number of connections from an IP, netstat -ntu | awk '{print $5}' | cut... Read More »