Diagnose network with MTR

Preface MTR is a powerful tool which enables administrators to diagnose and isolate networking errors and provide reports of network status to upstream providers. MTR represents an evolution of the traceroute command by providing a greater data sample, as if augmenting traceroute with ping output. This document provides an in depth overview of MTR, the data it generates, and how to interpret and draw conclusions based on the data provided by it. [Read More]

Deny traffic based on Country Iptables

Preface Some countries are blacklisted in ecommerce area due to spam flooding and DoS attacks. Its not difficult to find the root of an IP address. So the following script will block country based traffic in to your web server. The data will be updated in every day through a cronjob. You need to visit this SITE to download the zone file for which country you need to block. mkdir -p /opt/scripts [Read More]

Migrate instances using Snapshot

Preface Taking snapshot Download the Image Create Image in the Destination Project Boot the new Instance Preface Cloud Administrators, or End users need to migrate instances from one Porject to another. Or, a Cloud to another cloud. There is multiple ways to achieve this. The easiest way to use snapshot feature and do the migration. Shutdown the Virtual Machine $ openstack server list +--------------------------------------+------------+--------+------------------------------+------------+ | ID | Name | Status | Networks | Image Name | +--------------------------------------+------------+--------+------------------------------+------------+ | c41f3074-c82a-4837-8673-fa7e9fea7e11 | myInstance | ACTIVE | private=10. [Read More]

Prevent DOS using iptables

Preface A major problem facing by mail server admin is DOS (Deniel Of Service) attack. Hackers will try to mess up with the most popular ports of a UNIX/LINUX machines. We can prevent this my writing an IPTABLE rule in the server. The working is ,if some one is trying make connection continuously through a specified port the rule will block the IPADDRESS permanently. Here I am stating the securing of PORT 25 (SMTP) here you can use your own [Read More]

Aggregate in Openstack

Preface List the available hypervisor list to add under this zone. Now, we are going to add hypervisor “compute1” under Ezone-IND Preface People may have little bit of confusion about Host Aggregates and Availabaility Zones in Nova. Here I am trying to explain how these things are worked together. All configuration options aer based on Icehouse release of Openstack. A host aggregate is a grouping of hosts with associated metadata. [Read More]

Benchmarking SSD

How to Test Write Speed How to Test Read Speed How to Test Write Speed sync; dd if=/dev/zero of=tempfile bs=1M count=1024; sync 1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB) copied, 3.28696 s, 327 MB/s How to Test Read Speed dd if=tempfile of=/dev/null bs=1M count=1024 1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB) copied, 0.159273 s, 6.7 GB/s Clear the Cache and Run again sudo /sbin/sysctl -w vm. [Read More]

Monitor file changes realtime

Everybody knows top or htop. Ever wished there was something similar but to monitor your files instead of CPU usage and processes? Well, there is. Run this: watch -d -n 2 ‘df; ls -FlAt;’ and you’ll get to spy on which files are getting written on your system. Every time a file gets modified it will get highlighted for a second or so. The above command is useful when you grant someone SSH access to your box and wish to know exactly what they’re modifying. [Read More]

Creating a Kali Linux Image for Openstack

Install required softwares Get the Image Unarchive Concatenate all the VMDK files to single QCOW2 Upload to Glance Kali Linux is a Debian-derived Linux distribution designed for digital forensics and penetration testing. It is maintained and funded by Offensive Security Ltd. Mati Aharoni, Devon Kearns and Raphaël Hertzog are the core developers. Now a days lots of people using it for Security assessment. Here we will see how to create a QCOW2 image of Kali for Openstack. [Read More]