Category Archives: Networking

Auto fare Calculator for Indian cities

Many people either carry copy of auto fare card with them or do remember formula. However, it becomes difficult when you are roaming in multiple cities frequently.

A lot many similar apps available, however they are either platform specific, outdated or requires GPRS or other network connection. Few others are city specific.

This is a very simple attempt to overcome a couple of situations.

The application:

  • Works on almost any mobile with basic browser (internet browsing software)
  • Does not require any GPRS or other connection to run the app
  • Has support for multiple cities of India
  • Support for night fare calculation – based on device time
  • No installation required, just copy to mobile and run
  • No advertisement, no license fee – free and open source
  • Can be very easily updated
  • Has very basic and simple interface, executes and works simply

Grab it : Download http://harit.kotharee.com/app/fareCalc.htm . (Right click to the link and select ‘Save As…’ and save to your computer / or save the copy on your mobile.)

Use it : Open the saved copy of fareCalc.htm from your mobile or equivalent device, in most cases, it should open with default available browser. That’s it. No need to explain further. 🙂

Why HTMLand JavaScript?

  • Most mobile browser supports
  • No formatting / styling required
  • Widest compatibility across mobile platforms
  • No rebuild, easy to update
  • No installation required
  • Easy to share

Wireless Security – a 5 star need of today

Market is flooding with a lot many wireless devices, for home and business applications. Also, many wireless devices, especially wireless routers / access points are available at attractable prices.

Many of us purchase them, set up them, and often forget the rest – once we get it functioning.

But, setting up primary security is a very next step after setting the device and testing it.

Recent terror attacks was a red signal for many wi-fi home users.

Here is a brief idea, how we can set up primary but essential security with the available wireless router.

  1. Change default user name and password, few routers do not support change in user name. Default user name is generally admin in most cases. Use combination of aLpHaNuM3R1C (alphanumeric) and $peC|@l (special) characters as password. Keep password as long as possible to avoid break by bruit force technique. Providing sp a ce (spaces) in between password character increases strength in most cases.

  2. Once password is tightened, now it’s time to reduce number of maximum (possible) users. In DHCP settings, generally a lot – like 100 of users can be connected. If in actual situation, say there can be maximum of 2 users at a time, keep maximum user figure as 2, or keep IP allocation in such a fashion that the DHCP will be in position to allocate only 2 IPs, even if more attempt to connect. Of course, disabling DHCP, and allowing only manual configuration, is always best practice, since it is difficult to guess the settings by hacker, if IP allocation is made smartly.

  3. Now, actual security comes into picture. Disable SSID broadcast, unless it is very important. This makes it difficult to identify network name in wireless coverage area without smart tools. You may also reduce connection idle time and other router specific features to reset connection with client device such as laptop or PDA in case of idle time.

  4. Keep the SSID difficult to guess. Always change default SSID of your router.

  5. MAC filtering is another and important feature. MAC is a universally unique number of any network equipment. Typically for known usage, set MAC filter with allow policy viz. Allow devices to be connected only with mentioned MAC numbers, reject rest. Of course, MAC spoofing is possible through few tools, however for an attacker, it is very difficult to guess correct MAC without touching the device, without making single connection, or unless the user reveals it. :p

  6. Next in picture comes software enabled security, typically Keys. Define and set different set of keys and use appropriate method of key to set up and avoid unauthorised access to network. This will deny network connectivity to the client in case it is just standing before the network door. Without a key, the router does not allow access. Of course, few techniques and few weak key algorithms are there, those can be broken. 🙁 But, combination of all mentioned techniques, here, is a fruitful solution to increase security.

  7. Port(s) blocking and service(s) disabling is also helpful, feature available in most of today’s routers.

A before buy tip – do not be trapped in marketing blues….. The salesperson will mostly encourage to buy best (in features and price too!) device. Go for a device which is good enough for security measures, and not really more that what you want – say wireless coverage area. If the need is max. 90 feet, a router with coverage up to 100 feet is best, no need to offer a chance to neighbor hacker, by purchasing a router with 150 feet coverage range! Of course, your needs are the best judge to decide suitable product, not always the sales person!! Buy and set the device in center area of its potential use, to utilise the covered radius area of connectivity.

Setting up Subversion under windows

Prerequisites:

  1. Subversion Binary (http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91)
  2. TortoiseSVN (http://tortoisesvn.net/downloads)
  3. SVN Service Wrapper for Windows (http://www.lw-works.com/files/svnservice/svnservice-1.0.0.msi) – svnservice

Alternate to 1 & 2 – download 1 Click Setup (http://svn1clicksetup.tigris.org/)

Step 1

  1. Install Subversion binary.
  2. Make sure that the bin directory of Subversion is under PATH environment variable.
  3. Set any text Editor’s path as SVN_EDITOR environment variable. (e.g. c:\windows\notepad.exe)

Step 2

  1. Create code / document repository (the main destination or data centre!!)
svnadmin create "d:\codeRepo"
               Alternatively, you may also use explorer’s context menu to add selected folder as repository using TortoiseSVN.
  1. Go to the repository folder (e.g. codeRepo)
    1. Edit /conf/svnserve.conf file

Uncomment following:

                               [general]
                               anon-access = read
                               auth-access = write
                               password-db = passwd
    1. Edit /conf/passwd file

Uncomment following / specify allowed username & passwords:

                               [users]
                               harry = harryssecret
                               sally = sallyssecret
                               harit = harit’s password

Step 3

  1. Start svnservice
               svnserve --daemon --root "d:\codeRepo"
  1. Add new Project directory by
               svn mkdir svn://localhost/myproject
  1. Provide correct username & password (that is configured earlier)

Otherwise, use SVN repository browser to browse SVN repos. Right click provides rich set of options like adding new files/folders, delete, etc. etc. Use svn://localhost/myproject or similar as URL to browse.

Optional options!

  1. Setup svn-service to start at startup
               svnservice -install --daemon --root "d:\codeRepo"
               sc config svnservice start= auto
               net start svnservice
  1. Bind windows user for authentication (see source link 1 – http://www.stanford.edu/~bsuter/subversion-setup-guide/#svnserve-windows-user)

Please make sure that the svnservice is running correctly. Use Control Panel > Administrator Options > Services > Subversion (or whatever you named it) to verify. If the service is not running, it is the root of many problems.

This setup also works on network. You can access this repo through other machines connected through network. Each time you modify the files and commit, subversion will do authentication based on username and commit new version.

Major advantage of subversion – old (and deleted) files remain there in repository and can be retrieved back, so is perfect backup solution for code!

Sources for more advanced setup:

  1. http://www.stanford.edu/~bsuter/subversion-setup-guide/
  2. http://blogs.vertigosoftware.com/teamsystem/archive/2006/01/16/Setting_up_a_Subversion_Server_under_Windows.aspx
  3. http://blog.excastle.com/2005/05/31/mere-moments-guide-to-installing-a-subversion-server-on-windows/

Where did you receive email from??

A continuous email threat makes big challenge to identify where the email was sent from. It is very important to trace the location.

Yesterday night, I tried to explore basic things about email, like origin of email, forwarded reference, sender’s machine’s public IP etc.

Here is a basic and simple way to get this information extracted:

  1. eMail headers contain many valuable (for us) information that is not valuable for many end users.
  2. Usually any email client (like Mozilla Thunderbird) can reveal this. (Yes, open source rocks!!!)
  3. Go to View menu and click Show Headers to make the header of any email visible.
  4. Some information like Sender’s IP or received from IP is the key.
  5. Go to http://www.ip2location.com/ or http://www.apnic.net/ and find the location, service provider (ISP) from where the email was sent. These websites give simple details of location by providing IP.
  6. That’s it! We can at least trace machine’s public IP and location…..

Of course, this information is very primary. But I guess it is the first step of investigation. Just to test, I found that one of my friends from Pune sent me an email when he was in Ahmedabad, and he revealed it later!!!

Summary:

Email header > sender’s IP / received from IP > IP to Location query > Result!!!

Ad Hoc Wireless Networking with Ubuntu

Preparation

Ensure that network manager has been stopped and then bring the interface down.

sudo /etc/dbus-1/event.d/25NetworkManager stop sudo ifdown eth1
Configuration

1. Switch the card into ad hoc mode

·                                        sudo iwconfig eth1 mode ad-hoc

2. Set the channel/frequency that you want to use.

·                                        sudo iwconfig eth1 channel 11

3. Add the name (ssid) for the network you want to create/join. Use single quotes if there is a space in the name.

·                                        sudo iwconfig eth1 essid 'harits_wlan'

4. Add a WEP encryption key (optional, as per the configuration requirement)

·                                        sudo iwconfig eth1 key 1234567890

Activation

1. Bring the interface back up

·                                        sudo ifconfig eth1 up

2. Start dhclient to get an address

·                                        sudo dhclient eth1

3. If you want to do it manually, you will have to make up an IP address.

·                                        sudo ifconfig eth1 192.168.10.11

You should now be connected to the ad hoc network. Use the iwconfig command to view the cell being used. This must match the same cell on the other PCs that you want to connect to.

Testing

Once you have two or more computers connected to the ad hoc network, all of them showing the same cell number and having different IP addresses, then try pinging one from the others.

ping 169.168.10.1

If that doesn’t work then try specifying the interface name along with the address.

ping -I eth1 192.168.10.1

 

(source – https://help.ubuntu.com/community/ )

%d bloggers like this: