How to install Gammu on Lubuntu 14.04

linux insideMy friend bought Wavecom 1306B gsm modem for his campus last task. He use Windows XP and trying to use the modem without success. He try it on his friend laptop that run Windows 7 also not work and he ask me to try it. Just to test the modem. If its not work might then He will return it to the seller.

I use Lubuntu 14.04 but I think the instruction would be same for Ubuntu 14.04 variant :

Install Gammu

# apt-get install gammu
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
libgammu-i18n libgammu7
Suggested packages:
wammu gammu-doc
The following NEW packages will be installed:
gammu libgammu-i18n libgammu7
0 upgraded, 3 newly installed, 0 to remove and 128 not upgraded.
Need to get 1.051 kB of archives.
After this operation, 3.161 kB of additional disk space will be used.
Do you want to continue? [Y/n] y

………………………..
…………………………..
………………………………
Preparing to unpack …/libgammu7_1.33.0-3_i386.deb …
Unpacking libgammu7 (1.33.0-3) …
Selecting previously unselected package gammu.
Preparing to unpack …/gammu_1.33.0-3_i386.deb …
Unpacking gammu (1.33.0-3) …
Selecting previously unselected package libgammu-i18n.
Preparing to unpack …/libgammu-i18n_1.33.0-3_all.deb …
Unpacking libgammu-i18n (1.33.0-3) …
Processing triggers for man-db (2.6.7.1-1) …
Setting up libgammu7 (1.33.0-3) …
Setting up gammu (1.33.0-3) …
Setting up libgammu-i18n (1.33.0-3) …
Processing triggers for libc-bin (2.19-0ubuntu6) …
# Continue reading

How to connect to OpenVPN server from Ubuntu 13.04 Desktop

Yesterday my friend came to my house and ask about connect to openvpn server from linux desktop. I told him to install vpn client first then connect to vpn server but that instruction is not enough for him so I give him personal assistance and document the process here in case someone need it in the future. Lets get start :

Install OpenVPN client

$ sudo apt-get install openvpn
[sudo] password for alamsyah:
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
libjavascriptcoregtk-1.0-0 libwebkitgtk-1.0-0 libwebkitgtk-1.0-common
Use ‘apt-get autoremove’ to remove them.
The following extra packages will be installed:
libpkcs11-helper1
The following NEW packages will be installed:
libpkcs11-helper1 openvpn
0 upgraded, 2 newly installed, 0 to remove and 330 not upgraded.
Need to get 494 kB of archives.
After this operation, 1.247 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://id.archive.ubuntu.com/ubuntu/ raring/main libpkcs11-helper1 i386 1.09-1build1 [47,6 kB]
Get:2 http://id.archive.ubuntu.com/ubuntu/ raring/main openvpn i386 2.2.1-8ubuntu3 [447 kB]
Fetched 494 kB in 8s (61,7 kB/s)
Preconfiguring packages …
Selecting previously unselected package libpkcs11-helper1:i386.
(Reading database … 200544 files and directories currently installed.)
Unpacking libpkcs11-helper1:i386 (from …/libpkcs11-helper1_1.09-1build1_i386.deb) …
Selecting previously unselected package openvpn.
Unpacking openvpn (from …/openvpn_2.2.1-8ubuntu3_i386.deb) …
Processing triggers for man-db …
Processing triggers for ureadahead …
ureadahead will be reprofiled on next reboot
Setting up libpkcs11-helper1:i386 (1.09-1build1) …
Setting up openvpn (2.2.1-8ubuntu3) …
* Restarting virtual private network daemon(s)…                                                                                               *   No VPN is running.
Processing triggers for libc-bin …
ldconfig deferred processing now taking place
Processing triggers for ureadahead …
$

Download openvpn client configuration file

Connection setting for specific user can be found easily if you use openvn as, just access the address in the following format :

http://servername:943

openvpn_client_ubuntu

Click on “Yourself (user-located profile)”.

Connect to OpenVPN server

Pick downloaded client.ovpn

$ sudo openvpn --config Downloads/client.ovpn
Sat Jan 18 14:18:15 2014 OpenVPN 2.2.1 i686-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Feb 13 2013
Enter Auth Username:alam
Enter Auth Password:
…………….
………………….
……………………..

Sat Jan 18 14:18:27 2014 TUN/TAP device tun0 opened
Sat Jan 18 14:18:27 2014 TUN/TAP TX queue length set to 100
Sat Jan 18 14:18:27 2014 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Sat Jan 18 14:18:27 2014 /sbin/ifconfig tun0 172.27.232.5 netmask 255.255.248.0 mtu 1500 broadcast 172.27.239.255
Sat Jan 18 14:18:32 2014 /sbin/route add -net 192.241.146.134 netmask 255.255.255.255 gw 192.168.1.1
Sat Jan 18 14:18:32 2014 /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw 172.27.232.1
Sat Jan 18 14:18:32 2014 /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw 172.27.232.1
Sat Jan 18 14:18:32 2014 Initialization Sequence Completed

if you want to hide all those message use –daemon

$ sudo openvpn --daemon --config Downloads/client.ovpn
Enter Auth Username:alam
Enter Auth Password:
$

Ip address before connection made

$ ifconfig
eth0      Link encap:Ethernet  HWaddr 08:9e:01:1c:3a:f9
UP BROADCAST MULTICAST  MTU:1500  Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth1      Link encap:Ethernet  HWaddr 08:3e:8e:32:8f:62
inet addr:192.168.1.205  Bcast:192.168.1.255  Mask:255.255.255.0
inet6 addr: fe80::a3e:8eff:fe32:8f62/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:348892 errors:23 dropped:0 overruns:0 frame:253441
TX packets:267410 errors:25 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:438515703 (438.5 MB)  TX bytes:29792681 (29.7 MB)
Interrupt:19

lo        Link encap:Local Loopback
inet addr:127.0.0.1  Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING  MTU:65536  Metric:1
RX packets:4789 errors:0 dropped:0 overruns:0 frame:0
TX packets:4789 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:481600 (481.6 KB)  TX bytes:481600 (481.6 KB)
$

Ip address after connected :

$ ifconfig
eth0      Link encap:Ethernet  HWaddr 08:9e:01:1c:3a:f9
UP BROADCAST MULTICAST  MTU:1500  Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth1      Link encap:Ethernet  HWaddr 08:3e:8e:32:8f:62
inet addr:192.168.1.205  Bcast:192.168.1.255  Mask:255.255.255.0
inet6 addr: fe80::a3e:8eff:fe32:8f62/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:349509 errors:24 dropped:0 overruns:0 frame:261386
TX packets:268163 errors:25 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:438599978 (438.5 MB)  TX bytes:29983493 (29.9 MB)
Interrupt:19

lo        Link encap:Local Loopback
inet addr:127.0.0.1  Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING  MTU:65536  Metric:1
RX packets:4829 errors:0 dropped:0 overruns:0 frame:0
TX packets:4829 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:484929 (484.9 KB)  TX bytes:484929 (484.9 KB)

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:172.27.232.5  P-t-P:172.27.232.5  Mask:255.255.248.0
UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
RX packets:142 errors:0 dropped:0 overruns:0 frame:0
TX packets:240 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:13651 (13.6 KB)  TX bytes:53785 (53.7 KB)

Use service like whatismyip.com to check current ip address.

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

2013 will pass and I want to learn new operating system and use this blog as place of documentation of my learning. OpenBSD is my choose and perhaps NetBSD too. How to get it up and many more. Today I’ve install OpenBSD using VirtualBox under Ubuntu Linux 13.04. Error message came out when I try to ssh newly install OpenBSD box :

$ ssh [email protected]

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
ba:4b:ee:4c:b1:6d:02:41:62:e0:19:1e:c5:11:e7:0b.
Please contact your system administrator.
Add correct host key in /home/alamsyah/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/alamsyah/.ssh/known_hosts:19
remove with: ssh-keygen -f “/home/alamsyah/.ssh/known_hosts” -R 192.168.1.207
ECDSA host key for 192.168.1.207 has changed and you have requested strict checking.
Host key verification failed.

Get rid of that message :

$ ssh-keygen -f "/home/alamsyah/.ssh/known_hosts" -R 192.168.1.207

/home/alamsyah/.ssh/known_hosts updated.
Original contents retained as /home/alamsyah/.ssh/known_hosts.old
[email protected]:~$ ssh [email protected]
The authenticity of host ‘192.168.1.207 (192.168.1.207)’ can’t be established.
ECDSA key fingerprint is ba:4b:ee:4c:b1:6d:02:41:62:e0:19:1e:c5:11:e7:0b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘192.168.1.207’ (ECDSA) to the list of known hosts.
[email protected]’s password:
Last login: Fri Dec 20 20:43:20 2013
OpenBSD 5.4 (GENERIC) #37: Tue Jul 30 12:05:01 MDT 2013

Welcome to OpenBSD: The proactively secure Unix-like operating system.

Please use the sendbug(1) utility to report bugs in the system.
Before reporting a bug, please try to reproduce it with the latest
version of the code.  With bug reports, please try to ensure that
enough information to reproduce the problem is enclosed, and if a
known fix for it exists, include that as well.

$

Good call.

Lesson learned, I used to use same IP for experiment and this message came out. In future I’ll use different ip for different operating system.

Top 10 Cool FreeBSD T-Shirt, Hat and Mug

Hobbies at once paid is a luxury that should be in grateful. One of the hobbies that I like is learning the FreeBSD operating system. Many meet new friends, exchange the latest information and so forth. One nice thing also is when meeting with a friend who had the same hobbies.
Accessories are usually the mainstay of commonly used t-shirts, hats and mugs. Some friends ask me where can buy plus accessory can be custom fit if you wish, eg adding our name.

Search results bring into some design t-shirts, hats and mugs that can be seen below:

FreeBSD Big Logo T-ShirtsFreeBSD Big Logo T-ShirtsCHECK PRICE

FreeBSD Logo white T-ShirtFreeBSD Logo white T-ShirtCHECK PRICE

FreeBSD in your heart T-ShirtFreeBSD in your heart T-ShirtCHECK PRICE

FreeBSD Linux T-ShirtFreeBSD Linux T-ShirtCHECK PRICE

FreeBSD Big Logo wihout textFreeBSD Big Logo wihout textCHECK PRICE

FreeBSD HatFreeBSD HatCHECK PRICE

FreeBSD MugFreeBSD MugCHECK PRICE

 Why those FreeBSD stuff are cool

FreeBSD Big Logo T-Shirts – Big logo of FreeBSD with text “freeBSD” under the image. Looks cool.

FreeBSD Logo white T-Shirt – White T-Shirt with FreeBSD logo with text “freeBSD” next to the image.

FreeBSD in your heart T-Shirt – Good looking T-shirt with small FreeBSD logo along the text.

FreeBSD Linux T-Shirt – Quote what Linus Torvald said “if 386BSD had been availble when I started on Linux, Linux would probably never had happened”. FreeBSD Logo above the quote.

FreeBSD Big Logo wihout text – If you looking for Logo only T-Shirt then you’ll love this one.

FreeBSD Hat – Cool hat, if you going to hang out with your friend. Computer club meeting etc.

FreeBSD Mug – Good companion when you have ‘challenge’ in front of your monitor. Just coffe please 🙂

Deploy google app engine : appcfg.py

Deploy php script aka application to google app engine is interesting. I came from traditional ftp-ing (so 1999 hehehe), scp and cpanel. Google app engine provide 2 ways of deployment; through appcfg.py and via git. I’ll try to explore both options now.

Preparation

In this stage, application need to get register first to App Engine Administration Console. Visit this address to get it done :

https://appengine.google.com/

Selection_008

Choose google account to use for this purpose.

Selection_009

click “Create Application” button.

Selection_010

make sure to check name availability and quota application (max 10).

Selection_011

Google app engine will need grant access from your google account.

Selection_012

Click ‘Accept” button to get started.

 

Deployment using appcfg.py

$ google_appengine/appcfg.py –oauth2 update digitalfusi/

08:59 PM Application: difuphp; version: 1
08:59 PM Host: appengine.google.com
08:59 PM
Starting update of app: difuphp, version: 1
08:59 PM Getting current resource limits.
Your browser has been opened to visit:

https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&response_type=code&client_id=xxxxx6889yyy.apps.googleusercontent.com&access_type=offline

If your browser is on a different machine then exit and re-run this
application with the command-line parameter

–noauth_local_webserver

(process:3287): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0′ failed
Authentication successful.
09:01 PM Scanning files on local disk.
09:01 PM Cloning 2 application files.
09:01 PM Uploading 2 files and blobs.
09:01 PM Uploaded 2 files and blobs
09:01 PM Compilation starting.
09:01 PM Compilation completed.
09:01 PM Starting deployment.
09:01 PM Checking if deployment succeeded.
09:01 PM Deployment successful.
09:01 PM Checking if updated app version is serving.
09:01 PM Completed update of app: difuphp, version: 1

Testing the result by visit http://difuphp.appspot.com

Selection_013

appcfg.py is very straightforward command. Combine with oauth option I can upload all my php script to google infrastructure. Awesome.