{Openstack, Linux, Opensource, Freedom, Technology}

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]

Create QCOW2 image for Openstack

Introduction Creating a new image is a step done outside of your OpenStack installation. You create the new image manually on your own system and then upload the image to your cloud. To create a new image, you will need the installation CD or DVD ISO file for the guest operating system. You will also need access to a virtualization tool. You can use KVM for this. Or, if you have a GUI desktop virtualization tool (such as, VMware Fusion or VirtualBox), you can use that instead. [Read More]

How to force openstack to resize on the same host

I want to force openstack to resize every instance on the same host if it is possible to do. How can I do that? Before that, why should I do that. Here, you have a use case, you are on a private cloud and running some critical virtual machines in a very limited resources. You should take a turn to do this. Add the following lines in /etc/nova/nova.conf allow_resize_to_same_host=True scheduler_default_filters=AllHostsFilter Restart Services [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]

Password Authenticaion, Cloud Images

Use case login using the pem key Elevate your privileges Create a new user Set the password for the new user Restart SSH Service Use case The cloud images bundled by various linux distributions have password authentication disabled by default for security reasons. The only possible way to login to an instance launched using one of these images is by specifying a security key during boot and using the key to ssh. [Read More]