Using Multiple Network Interfaces simultaneously under Linux (Virtual/Real)


My system is connected to a college hostel LAN. Internet is provided through the Cyberoam system. Thus, there is a cap on the maximum transfer speed for internet. I had an idea since months to exploit virtual interfaces to get more out of it. For eg, parallel downloads all at the max transfer speed and browsing simultaneously without being affected by those downloads. I didn’t find any favourable ways to achieve this until last couple of days when I came across various pieces which I could put together to get it done.

The whole idea is to create a virtual ethernet interface (which is connected to the LAN) using ip aliasing and route selected traffic through that interface in a simple way. We will be using a proxy server to bind connections to that ip alias as it is much more simpler to configure any application to use a particular proxy server than to set their outgoing interface.

Although I will considering only virtual interfaces in the tutorial, the same technique can be applied to actual multiple interfaces as well. Also, note that there are tons of ways one might want to configure the behaviour. This is another reason why I will be using a proxy server.
Continue reading

Sponsored Post Learn from the experts: Create a successful blog with our brand new courseThe Blog is excited to announce our newest offering: a course just for beginning bloggers where you’ll learn everything you need to know about blogging from the most trusted experts in the industry. We have helped millions of blogs get up and running, we know what works, and we want you to to know everything we know. This course provides all the fundamental skills and inspiration you need to get your blog started, an interactive community forum, and content updated annually.

IPod Shuffle 4g under Linux

Project Link:

Couple of months ago, I got an Apple Ipod Shuffle 4g. Despite the presence of IPod syncing apps under Linux, my experience was annoying. Shuffle 4g changed compared to its predecessors regarding the database format and new features, so a lot of plugins and apps don’t work as expected. In this post, I will write about different ways to tackle this annoyance.

Basic Things to Know

Bah! why can’t Apple make straightforward stuffs! Anyway, here are things you should know in a nutshell. IPod’s internal software works on a defined structure in the mass storage of the IPod. The process of creating this structure may be referred to as initializing your device. For adding any content to your device, a simple copy is not enough, changes need to be made in the database (The iTunesSD file) as well.

If you want to know more about the database format, I highly encourage you to read it at
Continue reading

Handling constantly Interrupting Downloads using curl

My internet connection has an annoying problem of interrupting downloads too frequently. That way, downloading even resumable files can be tedious. Using the following one liner with curl, Life becomes much easier

until curl -C - -o "<output_file>" "<url>"; do :; done

Until makes sure the loop continues till curl returns a success status. A colon(:) is  a no operation command. This one liner can obviously be modified to suit your needs.

Moving to Nightingale

I had been using Rhythmbox since a long time. It was perfect for me, with clean interface, synced well with my Phone, had support and lyrics support. However, encountered Nightingale a day ago and completely fell in love with it to extent I am switching permanently to it.


Nightingale forked off from Songbird, when it discontinued its support for Linux. My first reaction playing with Nightingale was, “Firefox modded into a music player?”. Nightingale’s engine is based on Mozilla’s XULRunner and Firefox users will feel home.

UI: The first thing impressed me about Nightingale was its beautiful and sleek UI. Most music players with sleek and attractive UI usually have a trade off with functionality. And most players with too much functionality usually end up being ugly. Nightingale puts up lots of things in front of you while maintaining its beauty and simplicity.


Continue reading

Running Dota (1) on Linux with full customkeys

I have been running DoTA conveniently under Linux using Wine, since more than an year when I actually started playing DoTA. Everything works perfect without much effort. In this post, I explain the basic steps to get full DoTA Experience.

Configuring Wine

Very little configuration required. Might run straightaway. But there might be problems which will prevent you from switching between windows, minimizing, lose window focus, taskbar showing on top, etc. The best way to solve these is to configure wine to emulate a virtual desktop, and launch Frozen Thrones in a separate workspace. That way, you can switch between workspace conveniently using keyboard shortcuts (It is more convenient than minimizing under Windows). Execute winecfg and select Emulate Virtual Desktop under the Graphics tab. Make sure to fill up your native resolution there (or the resolution at which you will run the game). Run the game through

nimesh Warcraft III  1.26 $  wine Frozen\ Throne.exe


nimesh Warcraft III  1.26 $  wine Frozen\ Throne.exe -opengl  # If the above doesn't work for you well.

One problem that I regularly face while switching windows is that the Alt key becomes sticky, causing signalling in the map whenever I click somewhere. Keep Calm, and press Alt once again and release. This will solve it.
Continue reading

Using Hostapd with dnsmasq to create Virtual Wifi Access Point in Linux

NOTE: This is an alternative branch off from my previous Hostapd guide, which I really recommend going through before this.

In my previous hostapd guide, I used dhcpd to assign IP addresses to the clients connecting to the access point. While this works fine for most scenarios, it is an overkill to use dhcpd for such situations where normally the number of clients is 2-3, or around 20 at max. For such cases, dnsmasq is a better option.


Install dnsmasq from somewhere

# Arch Linux
sudo pacman -S dnsmasq
# Ubuntu
sudo apt-get install dnsmasq

Continue reading

Downgrading Packages in Arch Linux: The Worst Case Scenario

Background Story (You may Skip it)

Downgrading packages is a thing i don’t often encounter while using Arch. If something breaks, i wait for it to get fixed and the update again. But this time, the case was different. Late night, after a kernel (or libnl, i don’t remember) upgrade, my hostapd stopped working, complaining about shared libraries. Shockingly, i discovered that my hostapd was still at 0.7 while the latest stable version was at 2.0!(Reason provided at end) So i did an pacman -Sc to remove older hostapd versions from cache, which didn’t change anything, then made some correct changes and upgraded hostapd to 2.0. New problems in hostapd popped up, about nl80211 being unable to set my wlan to master mode. Now ahead of me was option of spending the rest of night desperately debugging the problem or study for the exam coming morning. Hostapd not working is a more serious issue for me.
Continue reading

Steam on Linux: First Impressions

Got a steam linux beta invite few days ago via e-mail and thus decided to give it a try.

Steam currently only has official Ubuntu 12.04 LTS Support. But there are ways to run it on different distros. Luckily, there is a PKGBUILD in AUR for steam which makes installation pretty easier. Installation is quick with a 1.4 MB steam.deb download. After starting steam, it updates itself after a heavy >100 MB download.

Steam in Linux starts with a familiar “Connecting Steam Account” box.

Steam Starting

Steam Starting

Continue reading

Hostapd Python Client

Earlier i had written a guide about setting up and running hostapd. To hone my python skills and make using and configuring hostapd simpler, i wrote a python client for hostapd. I also intend this project to serve as a base for a connectify-like GUI hostapd client, which i will start working on in a few days. This project is nearly complete, with proper logging system yet to implement and fix any unknown bugs.

Getting and Installing hostapd-python-script

Just paste this on your command line.

git clone

cd hostapd-python-script

Read the README.textile file, it will get you well covered.


Help me improve it by reporting bugs, suggestions and pull requests. I have only tested it well enough under my Arch Linux installation with ath9k wifi driver, so reporting working/non-working environments will help a lot. I believe the sourcecode is simple enough to understand and i have documented most part of it. Will document the rest in few days as well.

Thank you 🙂

Redirect TCP connections with rinetd

rinetd is a simple little redirection server which can redirect TCP connections from one IP:port to another IP:port. rinetd is simple enough to set up and run. I came across this while searching for a solution to make clients on my LAN to connect to my DC hub server running inside a virtual machine.
Installation is straightforward, download the source from here
Continue reading