October 08, 2013

OpenVPN Server Windows 7 Installation

Objective

Install OpenVPN Server on Windows 7 machine.
I have followed the tutorial from OpenVPN community. https://community.openvpn.net/openvpn/wiki/Easy_Windows_Guide

Pre-requisites

Disable the Windows Firewall (OR) Enable an Inbound Rule for the port 1194 [2]

Download and Installation

  • Download OpenVPN Server. http://openvpn.net/release/ (Get the latest Version executable based on time)
  • Install the downloaded .exe by running with Administrator privileges
  • Specify the path to a folder which doesn’t have spaces on path.
    • Example:-

      • C:\OpenVPN [Use] [I am installing in this directory and throughout this post, I will be referring this as default OpenVPN installed directory]
      • C:\Program Files (x86) [Don’t use]
  • Navigate to OpenVPN installed directory
  • Go to config folder
  • Create a file with name server.ovpn
  • Paste the content as specified below
  • Go to Network Connections in Windows 7 [Control Panel\Network and Internet\Network Connections]
  • Rename TAP-Win32 Adapter to “MyTap” as described in server.ovpn [Names should match in both server.ovpn and Adapter name]
  •    1: port 1194 #change to any port you see fit. The client needs to use the same port

       2: proto udp #switch to tcp if you wish to use a tcp connection, the client needs to use the same protocol. udp gives better performance

       3: dev tun

       4: dev-node MyTap #name of your TAP interface.

       5: server 10.8.0.0 255.255.255.0 #This may need modification as dictated by Internet Connection Settings. This is the default for ICS on Windows 7.

       6:  

       7: ca "C:\\OpenVPN\\easy-rsa\\keys\\ca.crt"

       8: cert "C:\\OpenVPN\\easy-rsa\\keys\\server.crt"

       9: key "C:\\OpenVPN\\easy-rsa\\keys\\server.key"  # This file should be kept secret

      10: dh "C:\\OpenVPN\\easy-rsa\\keys\\dh1024.pem"

      11: ifconfig-pool-persist ipp.txt

      12:  

      13: push "redirect-gateway def1" #tells all Internet traffic to go through the tunnel

      14: push "dhcp-option DNS 208.67.222.222" #OpenDNS servers, makes it easy to check if the tunnel is working properly

      15: push "dhcp-option DNS 208.67.220.220"

      16: keepalive 10 120

      17: comp-lzo #compression for better network performance. Disable if your server isn't powerful enough. Needs to be included in both server and client configs if you use it.

      18: persist-key

      19: persist-tun

      20: status openvpn-status.log

      21: verb 3



Certificates and Keys Creation

Initial Configuration

  • Open command prompt with Administrator privileges

  • Navigate to OpenVPN directory

  • cd C:\OpenVPN\easy-rsa\

  • run init-config.bat
    • C:\OpenVPN\easy-rsa> init-config

  • Open vars.bat

    • C:\OpenVPN\easy-rsa> notepad vars.bat

  • Change the HOME variable to your path
    • HOME=C:\OpenVPN\easy-rsa

  • Change country, province, City, Org, email

  • You can add KEY_NAME=your-name and KEY_OU=VPNer

  • Run the vars.bat file
    • C:\OpenVPN\easy-rsa> vars

  • Run the clean-all.bat file
    • C:\OpenVPN\easy-rsa> clean-all

Creating Certificates and Keys


Your Own Certificate Authority Generation

  • Open command prompt with Administrator privileges

  • Navigate to OpenVPN directory

  • cd C:\OpenVPN\easy-rsa\

  • run build-ca.bat

    • C:\OpenVPN\easy-rsa> build-ca

    • Accept the defaults and give Common Name as your-company CA

    • Ex:- OpenVPN-CA


Server Certificate and Key Generation

  • Open command prompt with Administrator privileges

  • Navigate to OpenVPN directory

  • cd C:\OpenVPN\easy-rsa\

  • run build-key-server.bat file

    • C:\OpenVPN\easy-rsa> build-key-server server

    • Enter common name as “server” since your command line input parameter is “server”

    • Sign Certificate: accept with ‘y’

    • Commit: accept with ‘y’


Client Certificate and Key Generation

  • Open command prompt with Administrator privileges

  • Navigate to OpenVPN directory

  • cd C:\OpenVPN\easy-rsa\

  • run build-key.bat file

    • C:\OpenVPN\easy-rsa> build-key client-name

    • Ex:- build-key my-laptop

    • Enter common name as “my-laptop” since your command line input parameter is “my-laptop”

 Key Exchange Certificate(Diffie-Hellman)

  • Open command prompt with Administrator privileges

  • Navigate to OpenVPN directory

  • cd C:\OpenVPN\easy-rsa\

  • run build-dh.bat file

    • C:\OpenVPN\easy-rsa> build-dh

Send Server Certificates and Keys to Client


Send the following files to client
  1. ca.crt

  2. client-name.crt

  3. client-name.key

All these files will be stored in C:\OpenVPN\easy-rsa\keys


Common Errors and Resolution

  • openvpn unable to write 'random state'
    • Change the HOME variable path to absolute path in vars.bat file

    • Ex: HOME=C:\OpenVPN\easy-rsa

  • openvpn server directive network/netmask combination is invalid
    • Give IP address as 10.8.0.0 in server.ovpn

  • TapAdapter not found

    • Go to Network Connections in Windows 7 [Control Panel\Network and Internet\Network Connections]
    • Rename TAP-Win32 Adapter to “MyTap” as described in server.ovpn [Names should match in both server.ovpn and Adapter name]


Run OpenVPN GUI

  • Start->All Programs->OpenVPN->OpenVPN GUI

  • It will come to status bar as notification icon [Default: bottom]

  • Rightclick on OpenVPN GUI and click on “Connect”

  • It should display proper log, if any error please search in Google and openvpn forums

References


https://community.openvpn.net/openvpn/wiki/Easy_Windows_Guide

http://blog.defron.org/2013/01/openvpn-server-on-windows.html

Please send your feedback and comments to psrdotcom@gmail.com

Blogger Labels: OpenVPN,Server,Installation,Objective,Install,machine,tutorial,Easy_Windows_Guide,requisites,Disable,Firewall,Enable,Inbound,Rule,port,Download,Version,Administrator,privileges,Specify,path,folder,spaces,Example,directory,Program,Files,Navigate,Create,Paste,Network,Connections,Control,Panel,Internet,Rename,Adapter,MyTap,client,needs,connection,protocol,performance,node,interface,modification,gateway,traffic,option,OpenDNS,compression,status,Creation,Initial,Configuration,Open,notepad,Change,HOME,province,KEY_NAME,KEY_OU,VPNer,Certificate,Generation,Accept,Common,Name,Enter,parameter,Sign,Commit,laptop,Exchange,Diffie,Hellman,Send,Resolution,directive,combination,Give,TapAdapter,Start,notification,icon,Default,bottom,Rightclick,Connect,error,Google,Certificates,Errors,forums,References,wiki,config,ovpn,dhcp,init,vars

October 03, 2013

Chennai Autorickshaw Old Vs. New Fare Android Application Lite Version

Hi all,

I have released the free version of chennai autorickshaw android app in google play.

Please look at this app and send your feedback.

https://play.google.com/store/apps/details?id=info.pillisureshraju.chennaiautokaasulite

Get it on Google Play





 Download it for free.

Scan QR
and install on your phone directly.


September 27, 2013

Convert Physical/Virtual Machine to vSphere ESX using VMware vCenter Converter Standalone

Hi all,

Objective

Moving/converting locally installed VMware Virtual Machine to vSphere ESX

Procedure

Download VMware vCenter Converter Standalone
Install it on your own windows machine (or) client/server mode
Once the installation completed, run the coverter
Click on "Convert machine"
Select the VM type and select .vmx file
Enter your destination vSphere server/ip address, username and password
Click on "Next"
You can change the VM configuration before coverting
Click on Next
Now it will start converting your VM and copy the VM to your vSphere
On vSphere, like normal vSphere client, you can start your VM and enjoy the configured/already using VM on vSphere.

Please send your comments and feedback to psrdotcom@gmail.com

September 24, 2013

Chennai Old Vs. New Fare Meter Fare Comparision Android App on Google Play

Hi all,

I have designed and developed an app for all the Chennaites, who use auto tranportation.

There has been an hike in prices of autorickshaw fares. Most of the autos didn't get updated to new meter with GPS functionality. Those who are traveling in old autos, either they have to compute the new fare with old (OR) pay whatever auto guy says.

Lets not pay whatever they say, we have developed an app, where you can compute and compare the old and new auto fares.

Lets give a try into looking at our app.

Scan and download app:
https://play.google.com/store/apps/details?id=info.pillisureshraju.chennaiautokaasu&hl=en

Its a complete off-line application, which doesn't require any additional permission from your mobile.

Compute and compare exact amount of old and new Chennai auto-rickshaw fare with day and night time fares.

If your hired auto doesn't have new meter and you have to compute the old and new meter fare then its very easy with our app for your new price calculation.

You can select the traveled distance in exactly using kilometers (Kms.) and meters (Mts.). If any waiting time, select in hours (Hrs.) and minutes (Min.)

Automatically you can find the old auto fare and new auto fare with day and night paying amounts.

I hope you all make use of this.

September 17, 2013

Android Virtual Device (AVD) Emulator Creation and Installing APK on Emulator Using Command Line

Dear friends,

Every time whenever we are using most of the Android developers are using Eclipse or some other IDE to create and start the AVD.

I was just thought of using it via command line in my Ubuntu because I was very lazy to start and wait for Eclipse to get ready. I just want to try some apk on Emulator.

Ubuntu Procedure


Open terminal
I was hoping that you had already included the Android tools, platform-tools in PATH. If not just do that else navigate to Android SDK directory

Create AVD:

Syntax: 
$ android create avd -n -t --abi

target-ids are based on the installed Android platforms. Its not the Android API Level.

abi(Application Binary Interface): The ABI is used to control which machine code will run on a given hardware device. For example, for an Android application to run on an x86 device, it is necessary to include x86 ABI support when compiling the application.

Example:
$ android avd -n MyJB -t 12 --abi armeabi-v7a

To view the target-ids list and supported ABI for target-id, execute the following command

$ android list targets

You might be getting some output similar to this

Available Android targets:
----------
id: 1 or "android-3"
     Name: Android 1.5
     Type: Platform
     API level: 3
     Revision: 4
     Skins: HVGA-P, QVGA-L, HVGA-L, HVGA (default), QVGA-P
     ABIs : armeabi
----------
id: 2 or "android-4"
     Name: Android 1.6
     Type: Platform
     API level: 4
     Revision: 3
     Skins: HVGA, QVGA, WVGA800 (default), WVGA854
     ABIs : armeabi
----------
id: 3 or "android-7"
     Name: Android 2.1
     Type: Platform
     API level: 7
     Revision: 3
     Skins: HVGA, QVGA, WQVGA432, WVGA800 (default), WQVGA400, WVGA854
     ABIs : armeabi
----------
id: 4 or "android-8"
     Name: Android 2.2
     Type: Platform
     API level: 8
     Revision: 3
     Skins: HVGA, QVGA, WQVGA432, WVGA800 (default), WQVGA400, WVGA854
     ABIs : armeabi
----------
id: 5 or "android-10"
     Name: Android 2.3.3
     Type: Platform
     API level: 10
     Revision: 2
     Skins: HVGA, QVGA, WQVGA432, WVGA800 (default), WQVGA400, WVGA854
     ABIs : armeabi, x86
----------
id: 6 or "android-11"
     Name: Android 3.0
     Type: Platform
     API level: 11
     Revision: 2
     Skins: WXGA (default)
     ABIs : armeabi
----------
id: 7 or "android-12"
     Name: Android 3.1
     Type: Platform
     API level: 12
     Revision: 3
     Skins: WXGA (default)
     ABIs : armeabi
----------
id: 8 or "android-13"
     Name: Android 3.2
     Type: Platform
     API level: 13
     Revision: 1
     Skins: WXGA (default)
     ABIs : armeabi
----------
id: 9 or "android-14"
     Name: Android 4.0
     Type: Platform
     API level: 14
     Revision: 3
     Skins: WXGA800, HVGA, QVGA, WQVGA432, WVGA800 (default), WSVGA, WXGA720, WQVGA400, WVGA854
     ABIs : armeabi-v7a
----------
id: 10 or "android-15"
     Name: Android 4.0.3
     Type: Platform
     API level: 15
     Revision: 3
     Skins: WXGA800, HVGA, QVGA, WQVGA432, WVGA800 (default), WSVGA, WXGA720, WQVGA400, WVGA854
     ABIs : armeabi-v7a, mips, x86
----------
id: 11 or "android-16"
     Name: Android 4.1.2
     Type: Platform
     API level: 16
     Revision: 4
     Skins: WXGA800, HVGA, QVGA, WQVGA432, WVGA800 (default), WSVGA, WXGA720, WXGA800-7in, WQVGA400, WVGA854
     ABIs : armeabi-v7a, mips, x86
----------
id: 12 or "android-17"
     Name: Android 4.2.2
     Type: Platform
     API level: 17
     Revision: 2
     Skins: WXGA800, HVGA, QVGA, WQVGA432, WVGA800 (default), WSVGA, WXGA720, WXGA800-7in, WQVGA400, WVGA854
     ABIs : armeabi-v7a, mips, x86

Start AVD

Syntax:
$ emulator -avd

Example:
$ emulator -avd MyJB

It will ask for you to customize, if you are interested and you have knowledge in the options then you can go ahead with custom emulator. Press "enter" to accept default options and your emulator will start within seconds.

Install APK on emulator

Syntax:
$ adb install

Example:
$ adb install MyApp.apk

It will install the apk on your emulator.
Go to apps and click on the installed app to view the installed application.

References:

http://developer.android.com/tools/help/android.html
http://developer.android.com/tools/help/adb.html
http://docs.xamarin.com/guides/android/advanced_thttp://en.wikipedia.org/wiki/Application_binary_interfaceopics/cpu_architecture



September 16, 2013

Convert MS-Access to SQLite Database

If you are familiar with MS-Access database creation and wants to covert your database to SQLite without putting all your efforts again.

If you database already exists in MS-Access and you want to have that in SQLite for mobile development. Its now a cake-walk like conversion

Here is an easy process to do that.

 

  • Download from https://code.google.com/p/mdb-sqlite/downloads/list
  • Extract the file, you will be getting mdb-sqlite folder with below file structure
  • image
  • Open Command Prompt and navigate to mdb-sqlite folder
  • Run “ant dist” command (without quotes")
  • image
  • Once the build successful, it will generate dist\main.jar and dist\mdb-sqlite.jar files
  • You can use these jar files to covert your ms-access database to sqlite database with the following command
  • Syntax :-
    • java -jar dist\mdb-sqlite.jar source.mdb output.sqlite
  • Example :-
    • java –jar dist\mdb-sqlite.jar employee.mdb employee.sqlite

 

References

https://code.google.com/p/mdb-sqlite/

Blogger Labels: Convert,SQLite,Database,creation,efforts,Here,Download,code,Extract,folder,Open,Command,Prompt,quotes,Once,files,Syntax,output,Example,employee,References,google,dist,java

September 06, 2013

Future Programming Languages that will change IT World

Future Programming Languages

It's all about being innovative and keeping a tap of innovative technologies. If you are a developer looking to understand futuristic technologies, this article is a must-read for you. We have presented 10 programming languages that will make a difference in the way IT world works. These languages are set to change the IT landscape.

Dart

This was created by Google to counter the weakness that comes on JavaScript when it works with web applications in large numbers. The Dart language, Google hopes, will become the new vernacular of web programming. It uses uses C-like syntax and keywords. One significant difference, however, is that while JavaScript is a prototype-based language, objects in Dart are defined using classes and interfaces, as in C++ or Java. Dart also allows programmers to optionally declare variables with static types.

Website: https://www.dartlang.org/

Wiki: http://en.wikipedia.org/wiki/Dart_%28programming_language%29

Ceylon

This language is being developed by Gavin King who has denied that the language being developed at Red Hat, is meant to be a "Java killer." Among King's gripes are Java's verbose syntax, its lack of first-class and higher-order functions, and its poor support for meta-programming. In particular, he's frustrated with the absence of a declarative syntax for structured data definition, which he says leaves Java "joined at the hip to XML." Ceylon aims to solve all these problems.

Website: http://ceylon-lang.org/

Wiki: http://en.wikipedia.org/wiki/Ceylon_%28programming_language%29

Go

Google is understood to have created a programming language called Golang, or Go. This, say some tech analysts, might just end up replacing Java altogether. This language is a general-purpose programming code that works on everything from application development to systems programing. While it is still a work in progress, and the language specification may change, developers can actually start working with it today itself.

Website: http://golang.org/?ModPagespeed=noscript

Wiki: http://en.wikipedia.org/wiki/Go_%28programming_language%29

F#

This has been popular for a long time with computer scientists and academia. F# (pronounced "F-sharp"), is a Microsoft language that has been designated to be both functional and practical. Given the fact that it is a first-class language on the .Net Common Language Runtime (CLR), it can access all of the same libraries and features as other CLR languages, such as C# and Visual Basic.

Website: http://www.tryfsharp.org/

Wiki: http://en.wikipedia.org/wiki/F_Sharp_%28programming_language%29

Opa

Web development is too complicated. Even the simplest web app requires countless lines of code in multiple languages: HTML and JavaScript on the client, Java or PHP on the server, SQL in the database, and so on. Opa doesn't replace any of these languages individually. Rather, it seeks to eliminate them all at once, by proposing an entirely new paradigm for Web programming. In an Opa application, the client-side UI, server-side logic, and database I/O are all implemented in a single language, Opa.

Website: http://opalang.org/

Wiki: http://en.wikipedia.org/wiki/Opa_%28programming_language%29

Fantom

Should you develop your applications for Java or .Net? If you code in Fantom, you can take your pick and even switch platforms midstream. That's because Fantom is designed from the ground up for cross-platform portability. The Fantom project includes not just a compiler that can output bytecode for either the JVM or the .Net CLI, but also a set of APIs that abstract away the Java and .Net APIs, creating an additional portability layer.

Website: http://fantom.org/

Wiki: http://en.wikipedia.org/wiki/Fantom_%28programming_language%29

Zimbu

This particular language takes its particles and components from languages across the board and is the brainchild of Bram Moolenaar. He was the creator of the Vim text editor. The language is slated to be fast, concise, portable, and easy-to-read. Its syntax is unique and idiosyncratic, yet feature-rich. It uses C-like expressions and operators, but its own keywords, data types, and block structures. It supports memory management, threads, and pipes. Portability is a key concern. Although Zimbu is a compiled language, the Zimbu compiler outputs ANSI C code, allowing binaries to be built only on platforms with a native C compiler.

Website: http://www.zimbu.org/

Wiki: http://en.wikipedia.org/wiki/Zimbu

X10

This is a parallel processing language that works was once a specialized niche of software development. However, with the increase in multicore CPUs and distributed computing, today's programming languages aren't keeping pace with the trend. This is why IBM Research is developing X10, a language designed specifically for modern parallel architectures, with the goal of increasing developer productivity "times 10." X10 handles concurrency using the partitioned global address space (PGAS) programming model. Code and data are separated into units and distributed across one or more "places," making it easy to scale a program from a single-threaded prototype (a single place) to multiple threads running on one or more multicore processors.

Website: http://x10-lang.org/

Wiki: http://en.wikipedia.org/wiki/X10_%28programming_language%29

haXe

haXe (pronounced "hex") is more than just any random portable language. It is a multi-platform language, which is capable of targeting diverse operating environments, that range from native binaries to interpreters and virtual machines. It can be used by developers and then compiled into object code, JavaScript, PHP, Flash/ActionScript, or NekoVM bytecode today.

Website: http://haxe.org/

Wiki: http://en.wikipedia.org/wiki/Haxe

Chapel

This is a brilliant language to work with in a world characterized by high-performance computing. The language was designed with supercomputing and clustering in mind, and is part of Cray's Cascade Program, an ambitious high-performance computing initiative funded in part by the U.S. Defense Advanced Research Project Agency (DARPA). Chapel's syntax draws from numerous sources. In addition to the usual suspects (C, C++, Java), it borrows concepts from scientific programming languages such as Fortran and Matlab. Its parallel-processing features are influenced by ZPL and High-Performance Fortran, as well as earlier Cray projects.

Website: http://chapel.cray.com/

Wiki: http://en.wikipedia.org/wiki/Chapel_%28programming_language%29

References

http://www.efytimes.com/e1/fullnews.asp?edid=115314

Blogger Labels: Future,World,article,difference,Dart,Google,JavaScript,numbers,language,vernacular,syntax,prototype,objects,classes,Java,Website,Wiki,Dart_,Ceylon,Gavin,killer,Among,gripes,absence,data,definition,problems,Ceylon_,Golang,purpose,code,development,specification,computer,academia,Microsoft,Given,fact,Common,Runtime,features,Visual,Basic,F_Sharp_,HTML,client,server,database,Rather,paradigm,logic,Opa_,Fantom,Should,platform,output,APIs,layer,Fantom_,Zimbu,components,brainchild,Bram,Moolenaar,creator,text,expressions,supports,memory,management,threads,Although,ANSI,niche,CPUs,trend,Research,goal,times,PGAS,places,machines,Flash,ActionScript,NekoVM,Haxe,Chapel,performance,Cray,Cascade,Program,initiative,Defense,Project,Agency,DARPA,addition,Fortran,Matlab,High,Chapel_,Languages,technologies,interfaces,analysts,systems,platforms,particles,operators,outputs,units,environments,concepts,References,developer,keywords,wikipedia,lang,developers,compiler,bytecode,binaries

Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com