Category Archives: Linux
Bash scripting – loops, string concatenation and passing arguments
I’ve just created some very basic bash script to automate my task, that is to run behat tests for several test directories. It involves passing argument from command line, doing loops on arrays and concatenating strings. See below for more … Continue reading
Slackware nginx update – 1.4.1 – security fix
A news in Ars Technica caught my attention today and it is about a widespread attack on web servers that includes Apache and nginx. My server is nginx therefore, I quickly updated my server to apply 1.4.1 version (my current … Continue reading
Setting up nginx + php-fpm on Slackware 14.0
For Slackware 14.0, it is now easy to setup an nginx webserver with PHP support via php-fpm. If you do a full install with Slackware 14.0, you can get PHP 5.4.x and php-fpm as this packages are shipped by stock … Continue reading
Log real IP address with CloudFlare and nginx
When you have a website behind the CloudFlare DNS (using its CDN services), chances are your nginx access logs are logging CloudFlare IP addresses. This is due to the fact that your are serving content where CloudFlare acts as proxy. … Continue reading
Get top IP addresses from access log
Using basic Linux commands, we can get top IP addresses that keeps hitting our web servers, whether they are valid visitors or attackers. The command is a combination of awk, sort and uniq. Given that the first column of the … Continue reading
Slackware Linux – Strengthen security – block the rest of the world
My Slackware Linux development box is on a VPS. Although Linode is generous to give 8 cores and 2TB outbound monthly limit to traffic, I would rather choose to block the rest of the world to secure my box. One … Continue reading
Disable auto-indent temporarily when pasting text into vim
So who loves vim? Not a fan myself but vim is a good fit for quick edit or config edit. Depending on your configuration, vim may be configured for smart indent where it can indent automatically after pressing enter key … Continue reading
Slackware Linux – DHCP slows down boot time
Being a wifi only user at home, it bugs me to see DHCP lookup slowing down my laptop’s boot time. I don’t use LAN (by decision) and it doesn’t make sense to have that DHCP stuff on boot time. I … Continue reading
Checking your logs for your VPS security
I’ve found some posts on the internet about how to check your logs with regards to login attempts or to simply put, checking logs so that you would know if someone is trying to access your Linux machine. Below is … Continue reading




