Showing posts with label Network. Show all posts
Showing posts with label Network. Show all posts

Wednesday, April 23, 2014

Find the fastest DNS Servers with NameBench

In my last post I talked about configuring static DNS entries. Let's go about choosing the fastest DNS servers near your location using Namebench. This tool helps you find the fastest DNS server based on web history, tcpdump output and standardized datasets. You can install it from your package manager or download from code.google.com/p/namebench/.

Namebench DNS benchmarktool screenshot

Here is the list of fastest DNS servers near Nairobi. Tests were run from Zuku Internet connection on Ngong Road, Nairobi

Recommended DNS configuration (fastest + nearest) Nairobi, Kenya

  • Primary Server: 216.194.28.69 (MetConnect-2 US)
  • Secondary Server: 8.8.8.8 (Google Public DNS)
  • Tertiary Server: 78.143.192.10 (Fast GB)

Sunday, April 20, 2014

Configure Static DNS Entries in Ubuntu

Here is quick tip to configure custom DNS services like OpenDNS and Google Public DNS servers on gnu/Linux. Using custom DNS services offers performance benefits and enhanced security.

Append add 'dns-nameservers' to your /etc/network/interfaces file. This over-rides the DNS servers assigned by the DHCP service.


dns-nameservers  208.67.222.222 208.67.220.220

Happy Browsing!

Wednesday, November 7, 2007

Changes in Debian Transmission package (transmissioncli renamed)

I just noticed that the light-weight bittorrent client Transmission package on GNU/Debian Linux has renamed its CLI(Command Line Interface) program name from transmissioncli to transmission-cli .

Here is note from transmission (0.90.dfsg-1) package changelog.
* debian/transmission-cli.*: binary upstream rename from transmissioncli to transmission-cli (Leo "costela" Antunes)

I have updated my old post Using Transmission Bittorrent client on console to suit this.

Sunday, November 4, 2007

Yahoo don't like linux! (Solution: Firefox / Iceweasel User Agent Line Fix )

Yahoo! Web page showing Unsupported Browser / Unknown User Agent Error I have few hours before leaving for Hyderabad for some R&R. I saw this post Yahoo don't like linux! . These reports of Yahoo! and other sites not working with Firefox / Iceweasel is not entirely uncommon there is a detailed fix available see if it works for you.

Saturday, November 3, 2007

Reading RSS/XML feeds in Elinks Line Browser

Raggle RSS Aggregator on ConsoleThis one is for console monkeys out there. Reading RSS/XML feeds in your web browser is not limited to graphical browsers alone, even our light weight console based Elinks line browser can do it with Raggle console RSS aggregator written in ruby.

Using WEBrick-based Raggle web interface allows us to use raggle from your Elinks line browser itself instead of its default console interface (see above image). The raggle web interface listens on port 2222 by default (you change it with command line parameters), point your Elinks browser to http://localhost:2222 and enjoy reading RSS/XML feeds at your leisure.

Its a good idea to run 'raggle --server' inside a screen session, once raggle is started, open a new Elinks window and give the type this URL http://localhost:2222

$ raggle --server Raggle: Loading config... Raggle: Loading feed list... Raggle: Loading theme... Raggle: Loading feed cache... Loading templates from "/home/arky/.raggle/web_ui/inc". localhost - - [03/Nov/2007:20:45:05 IST] "GET / HTTP/1.1" 200 681 - -> / localhost - - [03/Nov/2007:20:45:08 IST] "GET /raggle/desc HTTP/1.1" 200 2186 - -> /raggle/desc localhost - - [03/Nov/2007:20:45:08 IST] "GET /raggle/item HTTP/1.1" 200 6934 - -> /raggle/item localhost - - [03/Nov/2007:20:45:10 IST] "GET /raggle/feed HTTP/1.1" 200 72146 - -> /raggle/feed localhost - - [03/Nov/2007:20:45:12 IST] "GET /titlebar.html HTTP/1.1" 200 1001 - -> /titlebar.html localhost - - [03/Nov/2007:20:45:20 IST] "GET /inc/default.css HTTP/1.1" 200 7345 http://localhost:2222/raggle/desc -> /inc/default.css

Here you can see raggle web interface in Elinks. There are some issue and bugs with the raggle web_ui but I guess they would be solved in near future.
Elinks page showing Raggle Web interface

Resume Downloads in Firefox / Iceweasel

After my recent post about Firefox Annoyances: Download Resume Problems I observed that some of my readers were trying to find out how to resume their half-downloaded files in firefox/iceweasel. Sorry, the Firefox / Iceweasel doesn't yet continue half-downloaded between network failure or crashes. However you can try this alternative method.

Here is how you can continue the download from a crashed firefox / iceweasel using wget. First lets get rid of '.part' extension that the browser adds while downloading.

mv BigFile.zip.part BigFile.zip

Now resume/continue the download with wget's "-c / --continue" option.

wget --continue http://www.SomeSite.com/files/BigFile.zip

Tuesday, October 30, 2007

Load Balancing Apache Servers on Debian with HAProxy/Keepalived

A fine article shows you how to set up a two-node load balancer in an active/passive configuration with HAProxy and keepalived on Debian Etch.

Not only does the load balancer distribute the requests to the two backend Apache servers, it also checks the health of the backend servers. If one of them is down, all requests will automatically be redirected to the remaining backend server. In addition to that, the two load balancer nodes monitor each other using keepalived, and if the master fails, the slave becomes the master, which means the users will not notice any disruption of the service. HAProxy is session-aware, which means you can use it with any web application that makes use of sessions (such as forums, shopping carts, etc.)

From the HAProxy web site: "HAProxy is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications. It is particularly suited for web sites crawling under very high loads while needing persistence or Layer7 processing. Supporting tens of thousands of connections is clearly realistic with todays hardware. Its mode of operation makes its integration into existing architectures very easy and riskless, while still offering the possibility not to expose fragile web servers to the Net." http://www.howtoforge.com/haproxy_loadbalancer_debian_etch

Sunday, October 28, 2007

Ripping Radio Streams With Mplayer

Here is my response to the shane's great post introducing streamripper.

Nay, Do I need to use another tool just to rip a radio stream, when I can do it with my favorite mplayer itself.

/usr/bin/mplayer -dumpstream -playlist http://www.bbc.co.uk/worldservice/meta/tx/nb/live_news_au_nb.ram

There, you see it action ripping BBC Live News realmedia stream with mplayers's -dumpstream option. The mplayer merely dumps the radio stream to a file named "stream.dump" in the current directory.

Firefox Annoyances: Download Resume Problems

"When it comes to heavy duty download jobs, Firefox's default Downloads manager just doesn't cut the mustard" wrote Gina Trapani on the popular Lifehacker.com site. Do I need to say more? . Apart for a lousy download manager my firefox/iceweasel browser has trouble continuing active downloads between network failures or router problems. Perhaps this is the most annoying problem, coming right next only to memory hogging and the dreaded browser freezes .

There is a page on mozilla wiki discussing this issue and some possible solutions at length. And I guess its been there for a while now just by looking at the last modified date of the page( 18:04, 20 October 2006). Would any developer (anyone!!!) fix this issue in the next release?

A short excerpt from the above mentioned page on Mozilla wiki.
I recently started several larger downloads in Firefox and had to reboot my router while downloading. After this, I got to see several Firefox inadequacies or bugs, which I'll tell you about here:

0: After the temporary network connectivity disruption, my downloads were left in limbo, with Firefox only giving me the option to Pause or Cancel; with the progress bar still showing, but not increasing, and the numbers (rate of transfer, ETA) not showing. At this point I could not get Firefox to resume the downloads, not even by clicking Pause and Resume. However, looking at the Desktop, I could see that the partial files where there. I then found that I could resume the downloads with wget -c from the command line. If I can resume from the command line, why can't I resume from Firefox?

Thursday, October 25, 2007

Bittorrent Mainline Port Randomizer / Custom Settings script

Here is a quick and dirty bash script that I used when Bittorrent Mainline removed the random port option.

  • The script uses a random port to listen from a given range
  • Sets custom upload limits,refresh intervals and client address(IP)
  • Disables Linux uPnP
  • Changes the default data directory (default is ~/Desktop/Bittorrent)
  • Saves the downloaded file to current directory

Copy the code to text file and save it as Bitty.sh and set execute permission with 'chmod a+x Bitty.sh' and launch with ./Bitty.sh <torrentfile>.torrent

You may need to change the values to suit your needs. Also note that the You the /usr/bin/bittorrent-console is commandline client from the bittorrent Mainline for GNU/Linux and change the location on your Linux distro.


#!/bin/sh
#
#
#set -n
# Bitty.sh - a port randomizer for bittorrent mainline
#set -x 
#
MAXPORT=25000
MINPORT=20000

number=0

while [ "$number" -le $MINPORT ]

do 
  number=$RANDOM
  let "number %= $MAXPORT" 
done 


exec /usr/bin/bittorrent-console  --ip debbox.no-ip.org  --display_interval 30 
--no_upnp --minport $number  --maxport 25000 --max_upload_rate 5120 
--max_initiate 70  --save_incomplete_in /mnt/BigMaMa/.bittorrent/incomplete
 --data_dir /mnt/bigMaMa/.bittorrent  --save_in . "$1"


Please feel free to improve the script !

Monday, October 8, 2007

Using Transmission Bittorrent client on console

Update: A change in package since this post was published, read the update here
Here is an another light-weight bittorrent client Transmission which really works well. One of the highlight of this program is that its easy to use even for those who are new to Bittorrent P2P system and the bittorrent old hands would like Transmission because it stays out of their way and integrates nicely with your environment. I primarily work on command line console and like to run my bittorrent downloads in a screen session in the background and this bittorrent clients fits the bill for me.

You can learn more about this program from its features page.
Transmission runs natively on over five operating systems. Seamless configuration of your network, intelligent banning of peers who send corrupted data, and built in Peer Exchange are some of the features which enable Transmission to download your files as quickly as possible. All this is done in the background, without the user having to worry about complicated settings.

So, lets get started with transmission shall we, We will download the latest GNU/Linux Debian (Stable) CD ISO from the Internet. I already downloaded the torrent file of the first CD in my current directory. And installed transmission-cli package which provides the transmission-cli program on Debian Sid. This is a command-line only version of transmission, if you are interesting GUI version use the GTK version which is also available on Debian Sid or from the project page.

Here we launch the transmission with screen, the -p tells transmission to listen on port 25000. You can stop the program by pressing Ctrl+C .

screen -a -S 'Bittorrent' /usr/bin/transmission-cli -p 25000 debian-40r1-i386-CD-1.iso.torrent

Happy Torrenting !!!!

To learn about screen read the One minute Screen tutorial .

Saturday, September 29, 2007

Wget Re-tries!!

Its just that kind of day, nothing just works. I need to get this huge source pack and the Internet connection is acting up again. I have long since given any hope of ISP fixing the connection timeouts and total connection failures.

So, the wget program grabbing the file from the Internet running in background sputters after 20 or so tries and gives up. This calls for extreme measures.

$ wget -t 0 -c http://examplesite.com/pub/xxxx.bz2

The -t ( --tries ) set to 0 (zero) which means it keeps on trying infinitely until the hell freezes over. And -c ( --continue ) is to continue grabbing the half downloaded file.

Friday, September 28, 2007

Killing Sluggish Iceweasel

Sometimes my Iceweasel (unbranded firefox) web browser seems sluggish after rendering flash heavy web page or stops responding all together. I hope this behavior is not uncommon at all.

Instead of waiting for(ever) the browser to start responding normally I resort killing the web browser with killall 11 (eleven) HUP signal. After-all its me who is uses the computer not the other way around. ;o)

killall -11 firefox-bin

Note: Please note that -11 is hyphen followed by two numeric one's not ' l ' English alphabet.

Pidgin Sound Notifications

Pidgin Purple logo If you haven't used Pidgin (formerly gaim) then you should give it a try. The USP of the program is that it supports a wide range of Instant messaging protocols.

  • AIM
  • Bonjour
  • Gadu-Gadu
  • Google Talk
  • Groupwise
  • ICQ
  • IRC
  • MSN
  • MySpaceIM
  • QQ
  • SILC
  • SIMPLE
  • Sametime
  • XMPP
  • Yahoo!
  • Zephyr

Now, you *now* know what I am talking about ;o).

Being a fantical lightweight desktop user, I am currently running custom complied Fluxbox as my window manager and I don't use a sound daemon like ESD too.

So when the pidgin package on GNU/Debian suggested that I use gstreamer to play the silly pings and pongs my geek soul quivered.

$ apt-cache show pidgin Package: pidgin Priority: optional .... Some extra packages are recommended to use the core functionality present in most pidgin installations: * gstreamer0.10-plugins-base, gstreamer0.10-plugins-good - Sound support. .

Instead of installing gstreamer and plugins I decided to use aplay from the alsa-utils packages which also has commonly used alsamixer, amixer.

Pidgin Preferences dialog box

So in Sound Panel of Pidgins Preferences (see image above) which available under tools menu, I selected the sound method as *command* and sound command as "aplay -q %s".



If you don't want to play any sounds and happy with just console beeps then you can set the sound method to *beep*.



Pidgin Sound Preferences dialog box



And don't forget to test the sounds by using test button in the *Sounds Events* section below. If you still don't hear any sounds, either the sounds are muted in Pidgin or you must have messed up something.

Popular Posts