View Single Post
Posts: 198 | Thanked: 130 times | Joined on Sep 2012 @ Pakistan
#1
UPDATE:- I won't be supporting this any longer. Now you can install OpenVPN with one-click via N9QTweak. Hit thanks for Schturman

http://talk.maemo.org/showthread.php?t=80600

------------------------------------------------------------------------------------
Hello all,

So after hours of searching and reading on the web, I finally figured out how to run OpenVPN service on N9 with the service being free. I know many people would have OpenVPN running successfully, I just want to help beginners like me.

Here in my country, YouTube is blocked so I needed a VPN to access it. I must admit I was having a hard time configuring this thing as there was no straightforward tutorial to set it up. Plus there is no GUI but it is better than nothing.

But in this tutorial, buttons are created to start/stop OpenVPN which makes it a lot easier.

I tried VPN9C, IPsec based, which has a GUI, but I could not find any free service provider.

Now I want to put it up on this forum so that anybody wanting to use OpenVPN could do it easily and in one go.

Warning! I claim no responsibility for whatever happens to your phone because of this guide. Though it should work fine in most cases.

Warning 2! : Don't let your phone battery run out of power completely to the point where it shuts down and doesn't restart. In that case, refhashlist containing SHAsums of files get corrupted. Result You get rebootloops which can be fixed. BUT you won't be able to use DNS FLUSH part. So charge your phone before it shuts down itself, use automatic powersaving.

NOTE:- I am claiming NO credit for this tutorial as I have just gathered the available info and simplified it.

Credits: 12VPN Tutorial for Harmattan ; MeeGo Forums Thread ; VPNBook for Free VPN Service

I have attached a zip file containing all the files necessary for the operation, you can find it at the bottom of this post.

---------------------------------------------------------------------------------

1.First, download the zip file I have attached (sorry for the messy icons), extract the files and Put them in a Folder by the name myvpn for your ease. Then Copy this folder to your N9 MyDocs folder.

2.Then, we add Elleo's Repo to the N9:

Code:
devel-su
Password: rootme
~ # echo 'deb http://repo.pub.meego.com/home:/elleo/Harmattan/ ./'  > /etc/apt/sources.list.d/elleo.list
~ # apt-get update
~ # apt-get install openvpn
If you get errors at apt-get update, try this to fix missing dependencies:
Code:
~ # apt-get update --fix-missing

3. Then Install Jare's version of OpenVPN.

As root:
Code:
~ # wget http://www.jlranta.com/stuff/openvpn_2.1.3-3harmattan1_armel_aegis.deb
~ # dpkg -i openvpn_2.1.3-3harmattan1_armel_aegis.deb

4. Installing VPNbook free OpenVPN Profile:

Open terminal as root, and type the following:
Code:
~ # cd /home/user/MyDocs/myvpn
~ # cp -R vpn.conf log.txt /etc/openvpn/

5. Creating the start/stop icons for OpenVPN start/stop operation on Application Homescreen:

As root:
Code:
~ # cd /home/user/MyDocs/myvpn

~ # cp flushdns.png start.png stop.png /usr/share/icons/hicolor/64x64/apps/

~ # cp openvpn-start.desktop openvpn-stop.desktop flush-dns.desktop /usr/share/applications/

6. Setting up Flush DNS part:

As root:
Code:
~ # cd /home/user/MyDocs/myvpn

~ # cp -R dnsmasq.conf /etc/dbus-1/system.d/

~ # cp 12vpn.sh /etc/openvpn/

~ # chmod +x /etc/openvpn/12vpn.sh
The dnsmasq.conf file I've provided is copied and written over the existing file saving you the effor to edit the file manually.

7. Finally, all is set for the OpenVPN to operate, the desktop icons should appear by this time on the Applications Homescreen, Put them into a separate vpn folder for ease.

Tap the VPN ON Icon to start OpenVPN, give it a few seconds before it could connect to the VPNBook Server. Try YouTube after that. It should work. To stop OpenVPN, tap the STOP VPN icon.

8. Flush DNS:

It is used to counter the problem of DNS Poisoning, especially in China. Details are given at 12VPN.com tutorial. To use this, tap the FLUSH DNS icon before and after Using OpenVPN.

Hope it works for most of the people and save them the effort of starting stopping VPN from terminal especially beginners like me.

-------------------------------------------------------------------------------------

UPDATE:- VPNBOOK updated their server credentials. The attachments here are updated too. Should work now.

Update 08/05/2013 Credentials Updated along with some changes in the tutorial.
-------------------------------------------------------------------------------------


ALTERNATIVE--> Okay so if anyone wants to try an alternative namely ShadowSocks by chiappa, one can try it at this site


----------------------------------------------------------------------------------
HOW TO REMOVE OPENVPN COMPLETELY
Thanks to Schturman

As ROOT:

1.
Code:
devel-su user -c "/etc/init.d/openvpn stop"
2.
Code:
sed -i "/<policy user=\"user\">/,/policy context=\"default\">/c\\
        <policy context=\"default\"> " /etc/dbus-1/system.d/dnsmasq.conf
3.
Code:
cd /usr/share/applications && rm -f flushdns* openvpn*
4.
Code:
cd /etc/openvpn && rm -f vpn.conf log.txt 12vpn.sh
5.
Code:
cd /usr/share/icons/hicolor/64x64/apps && rm -f flushdns.png start.png stop.png
6.
Code:
apt-get remove --purge -y openvpn openvpn-blacklist openssl-blacklist openssl libpkcs11-helper1
7.
Code:
rm -f /etc/apt/sources.list.d/elleo.list && apt-get clean && apt-get update
Attached Files
File Type: zip VPN Folder.zip (16.6 KB, 866 views)

Last edited by khan.orak; 2013-10-19 at 03:25.
 

The Following 20 Users Say Thank You to khan.orak For This Useful Post: