Friday 29 November 2013

India - Internet Speed map

India - Internet Speed Map

As a little experiment, I created an Internet Speed Map for India. Click on any marker on the map to view the details of the internet speed test.

Last map update at 19-Jun-2015 22:00 IST. If you spot an error, please take a moment to let me know (in the comments below).



Add your internet speed to the map!

Want to see your own internet speed details on this map. Please add it here. Your report will show up after the next map update (in a few days).

How does it help?

It has the following uses:
  • Compare your internet speed with others in your area / city
  • Verify if people are really getting speeds anywhere near what the ISP is promising you would get when you join
  • If those in your neighbourhood are getting much better speeds by the same ISP, you may have a faulty line
Obviously the accuracy of this analysis would depend on the number of speed test result submissions there are. Please come back to this page later and also encourage your friends to post their speed test results here.

Stats

Winners
Attribute ISP value
Best Ping Atria Convergence Technologies - Chennai 3 ms
Fastest Download Atria Convergence Technologies - Chennai 26.31 Mbps

Losers
Attribute ISP value
Worst Ping BSNL - Lucknow 184 ms
Slowest Download BSNL - Chandigarh 0.43 Mbps (Not confirmed if due to FUP)


Improvements ahead

  • Real time addition of data to the map -
I am doing this in my spare time, so I cannot promise a timeline to these changes.

Friday 13 September 2013

Install fun_plug (0.7) on D-Link DNS-315 (NAS)

Introduction

These are my notes on installing and configuring fun_plug (0.7) on D-Link DNS-315 (NAS). If you come across anything that doesn't come across clear please leave a comment and I shall attempt to add more explanation.
For me the primary motive for installing fun_plug was to enable SSH. This allows me to mount directories on my NAS onto my laptop / desktop

Resources

Pre-requisites

Remote Backup

Please ensure that the internal “Remote Backup” Services is deactivated. This server is shipped with newer NAS like the DNS-320/DNS-320L/DNS-325/DNS-345 and conflicts with the SSH-Server of the fun_plug.

Installation and configuration

Overview of Installation steps

  • Follow the steps here. Download ARM version of fun_plug.tgz and copy the 2 files to root of drive
  • Fix script issues
    • change permissions of script - executable (on Linux)
    • the HDD mount point is /mnt/HD/HD_a2
  • Reboot 
  • fun_plug script should run and install fun_plug
  • change root password - described here
  • Apply the steps described in the post-install fixes section
  • activate services by chmod a+x the respective scripts
    • For instance, to enable ssh daemon, type chmod a+x /ffp/startup/sshd.sh
  • [if you wish to use SSH] See the section on SSH Configuration for additional configuration

Post install fixes

permission issues

There appears to be a problem with file permissions – after reboot most of them are reset to 777 and that upsets sshd and also prevents choosing the startup scripts.

To address this, modify  /ffp/etc/fun_plug.init

I added to /ffp/etc/fun_plug.init the following line, just before the section dedicated to enable/disable services:

/ffp/etc/fun_plug.init
chmod 600 /ffp/etc/ssh/ssh_host_*
chmod 755 /ffp/var/lib/sshd

fixes for sshd.sh

* I also changed a line in /ffp/start/sshd.sh to correctly check for the /ffp/etc/ssh/ssh_host_ecdsa_key file.


It appears this error may be to a invalid reference to the ssh file in /ffp/start/sshd.sh script.

/ffp/start/sshd.sh
The original script reads:

if [ ! -f /etc/ssh/ssh_host_ecdsa_key ]; then
/ffp/bin/ssh-keygen -t ecdsa -f /ffp/etc/ssh/ssh_host_ecdsa_key -N ''
fi

I believe it should read:

if [ ! -f /ffp/etc/ssh/ssh_host_ecdsa_key ]; then
/ffp/bin/ssh-keygen -t ecdsa -f /ffp/etc/ssh/ssh_host_ecdsa_key -N ''
fi
#!/ffp/bin/sh

Set up rsync option.

@see troubleshooting section
Adding users

added user using the web interface

Configuring User Home directories

usermod -s /ffp/bin/sh mochapenguin

mkdir -p /ffp/home/mochapenguin/
sed -ie 's#:/usr/share/ftp/mochapenguin:#:/ffp/home/mochapenguin:#g' /etc/passwd
pwconv

usermod -d /ffp/home/mochapenguin/ mochapenguin
store-passwd.sh [saves changes to disk]
<<worked>>

permissions of the user and user .ssh folder at boot

[after users have been created]

Create a script to put back the permissions of the user and user .ssh folder at boot


log in as root (did it using a telnet session)
touch /ffp/etc/fun_plug.local

/ffp/etc/fun_plug.local
#!/ffp/bin/sh
chmod 700 /ffp/home/mochapenguin
chmod 600 /ffp/home/mochapenguin/.ssh/*
chmod 700 /ffp/home/mochapenguin/.ssh

SSH Configuration

Using certificates

Concept - http://nas-tweaks.net/53/private-public-key-authentication-with-openssh-in-ffp/

Changing the home of the user

By default, the home directory of the user ”root” is set to /home, which is located in the internal flash-memory. This memory is deleted every time the device is rebooted. Thus the home-directory of the each user should be moved to be a sub-directory of ffp.

mkdir -p /ffp/home/root/
usermod -d /ffp/home/root/ root
store-passwd.sh

You need to repeat the last two steps every time your firmware gets upgraded.

Generating the keypair

mkdir /ffp/home/root/.ssh
cd /ffp/home/root/.ssh

There are now two choices for the key. You can either have a password (which can automatically be entered by ssh-agent or PuttY Pageant) or no password. Both ways are described below and will generate two files named keypair and keypair.pub which contain the private and public key needed for the authentication:
  • Without Password
  • ssh-keygen -f keypair -C 'Generated by nas-tweaks.net' -t rsa -q
  • With Password
  • ssh-keygen -f keypair -C 'Generated by nas-tweaks.net' -N '' -t rsa -q



Adding public key

create .ssh folder in /ffp/home/mochapenguin as user mochapenguin

change permission of directory to 700
copy pub file to .ssh folder
set chmod to 600

Activating authorized_keys in SSH
Open /ffp/etc/ssh/sshd_config and search for the following line:
#PubkeyAuthentication yes
And remove the comment:
PubkeyAuthentication yes

Moving the generated keys to authorized_keys

touch authorized_keys
chmod 600 authorized_keys
cat keypair.pub >> authorized_keys

restart SSH

root@DNS-315:~# sh /mnt/HD/HD_a2/ffp/start/sshd.sh restart

Log output

Here is the fun_plug startup log from DNS-315. There are a couple of things I am not happy about. But they are not show stoppers anyway. I shall be looking into them as soon as I get time. Any suggestions in the meantime are welcome.

ffp.log
**** fun_plug script for DNS-323 (2008-08-11 tp@fonz.de) ****
**** fun_plug script modded by Uli (2012-02-21 ffp@wolf-u.li) ****
Sat Sep 14 01:35:28 BST 2013
ln -snf /mnt/HD/HD_a2/ffp /ffp
* Running /ffp/etc/fun_plug.init ...
* Running /ffp/etc/fun_plug.local ...
* Running /ffp/etc/rc ...
* /ffp/start/SERVERS.sh ...
* /ffp/start/portmap.sh ...
Starting /ffp/sbin/rpc.portmap
* /ffp/start/nfsd.sh ...
Mounting /proc/fs/nfsd ...
WARNING: rpc.portmap: Already running <== How do I turn off rpc portmap?
Starting /ffp/sbin/rpc.statd
Starting /ffp/sbin/rpc.nfsd 8
rpc.nfsd: unable to resolve ANYADDR:nfs to inet address: Servname not supported for ai_socktype <= WTF?
rpc.nfsd: unable to set any sockets for nfsd
Starting /ffp/sbin/rpc.mountd
* /ffp/start/LOGIN.sh ...
* /ffp/start/telnetd.sh ...
Starting /ffp/sbin/telnetd -l /ffp/bin/sh
* /ffp/start/sshd.sh ...
Starting /ffp/sbin/sshd
* /ffp/start/rsyncd.sh ...
Error: Missing config file /ffp/etc/rsyncd.conf
* /ffp/start/kickwebs.sh ...
Kicking webs ...
webs: no process found
* /ffp/start/lighttpd.sh ... <= Should I turn this off for now? How?
/ffp/etc/lighttpd.conf: Required file not found or not readable
* /ffp/start/inetd.sh ...
/ffp/etc/inetd.conf: Required file not found or not readable
* /ffp/start/fp_master.sh ...
Starting /ffp/sbin/fp.master
Ready.

Troubleshooting


Monday 24 June 2013

Installing Qwt on Ubuntu 12.04

I was looking to use Qwt widgets in a Qt GUI application. Wanted to be able to see the Qwt library in Qt Creator as a plugin.

To achieve this go to Ubuntu Software Centre and install libqwt-dev.

Subsequently, when Qt Creator is launched, Qwt widgets are available in the GUI Designer

In your GUI project's .pro file add the following line to include the Qwt library. If you forget to include this while building the project Qt Creator will show error messages that it cannot find the header files of the Qwt widgets.

Tuesday 16 April 2013

Using Cygwin git on Qt Creator

I am using the Qt Creator 2.0.1 (32 bit) at the moment. I have Cygwin installed on my Windows 7 already. I was inclined to use Cygwin's Git command instead of MSysGit (Just a personal preference at this time). That was relatively easy. I prefer configuring the PATH variable on an application specific basis instead of system-wide settings. I like to keep the system PATH variable as clean as I can. With Qt Creator, set the environment variable as shown below:

 

The Git commands are then available from the Menu - Tools > Git

Wednesday 13 February 2013

Setting up Gitolite (git and http access) on Fedora 17

Note: Part2 (http) is not a working configuration yet. I shall update this post when it is.

These are my notes while following the installation instructions at:
  • http://sitaramc.github.com/gitolite/install.html
  • http://sitaramc.github.com/gitolite/ssh-and-http.html
I have tried to be verbose in the hope that this might be useful for someone without a great deal of Linux knowledge.

Part 1 - Installing gitolite (this part works)


Create hosting user (user with no interactive login shell access) username = git On Fedora, this command creates a system account git with local password locked. The default option for the useradd command (when --password option isn’t supplied) is to disable the password.

switch to git user -
Clone from gitolite repository
Actual Install - using option 2 (http://sitaramc.github.com/gitolite/install.html) Now clone admin-repo. Make changes and push to origin

Sunday 10 February 2013

Associate Magnet links with Fatrat download manager (Fedora 17)

Fatrat download manager is my preferred choice when it comes to managing downloads. It allows me to handle regular downloads, linux torrent downloads and more through a single interface.

Magnet links are seeing wider adoption these days.

Following changes were needed to get this to work. For brevity, I have only shown the modified lines here.

1. Modify the following file:
/usr/share/applications/fatrat.desktop
2. And here... /usr/share/applications/defaults.list
3. Followed the instructions here to add magnet support in Firefox

Monday 4 February 2013

Configuring digest authentication on Apache web server

Here's how I configured Apache 2.2 web server for digest authentication:

1. Create password 2. Configure Apache configuration file (httpd.conf)