setting up a pptp debian server

1 Comment

I’ve never done something simple like this before.

First install the package:

apt-get install pptpd

then edit the localip and remoteip in your /etc/pptpd.conf file.

and next add a user with password:

echo “USERNAME pptpd PASSWORD *” >> /etc/ppp/chap-secrets

and restart the pptpd server:

/etc/init.d/pptpd restart

done.

It tested it with the android (kernel: 2.6.29-TheOfficial-00479-g3c7df37) vpn client

logcat:

I/ActivityManager(  695): Start proc com.android.server.vpn:remote for service com.android.server.vpn/.VpnServiceBinder: pid=13445 uid=1000 gids={3002, 3001, 3003}
D/VpnManager(13178): succeeded to connect to VPN service
D/com.android.settings.vpn.AuthenticationActor(13178): ~~~~~~ connect() succeeded!
D/VpnSettings(13178): received connectivity: true-binary.com: connected? CONNECTING   err=0
I/SProxy_mtpd(13445): Stop VPN daemon: mtpd
D/SProxy_mtpd(13445): mtpd is stopped after 0 msec
D/SProxy_mtpd(13445): stopping mtpd, success? true
D/VpnService(13445):   Local IP: 188.45.67.169, if: rmnet0
D/VpnService(13445):        VPN UP: down
I/SProxy_mtpd(13445): Start VPN daemon: mtpd
D/mtpd    (13453): Waiting for control socket
D/SProxy_mtpd(13445): mtpd is running after 200 msec
D/mtpd    (13453): Received 20 arguments
I/mtpd    (13453): Using protocol pptp
I/mtpd    (13453): Connecting to 86.33.100.93 port 1723
I/SProxy_mtpd(13445): got data from control socket: 20
I/mtpd    (13453): Connection established (socket = 9)
D/mtpd    (13453): Sending SCCRQ
D/mtpd    (13453): Received SCCRP -> Sending OCRQ (local = 3740)
I/mtpd    (13453): Tunnel established
D/mtpd    (13453): Received OCRQ (remote = 32769)
I/mtpd    (13453): Session established
I/mtpd    (13453): Creating PPPoX socket
I/mtpd    (13453): Starting pppd (pppox = 11)
I/pppd    (13454): Using PPPoX (socket = 11)
I/mtpd    (13453): Pppd started (pid = 13454)
D/pppd    (13454): using channel 4
I/pppd    (13454): Using interface ppp0
I/pppd    (13454): Connect: ppp0 <–>
I/pppd    (13454): MPPE 128-bit stateless compression enabled
I/pppd    (13454): local  IP address 192.168.1.1
I/pppd    (13454): remote IP address 192.168.0.1
I/ip-up-vpn(13455): All traffic is now redirected to 192.168.0.1
D/VpnService(13445): onConnected()
I/VpnService(13445): save original dns prop: 194.48.139.254, 194.48.124.200
I/VpnService(13445): save original suffices:
D/VpnSettings(13178): received connectivity: true-binary.com: connected? CONNECTED   err=0
D/VpnServiceBinder(13445):      saving states
I/VpnService(13445): set vpn dns prop: ,
I/VpnService(13445): VPN connectivity monitor running
I/ActivityManager(  695): Process com.facebook.katana (pid 12508) has died.

and the syslog of debian (interpid kernel: 2.6.27-11) gives:

Jan  5 17:50:16 server pptpd[8979]: CTRL: Client 188.45.67.169 control connection started
Jan  5 17:50:16 server pptpd[8979]: CTRL: Starting call (launching pppd, opening GRE)
Jan  5 17:50:16 server pppd[8980]: Plugin /usr/lib/pptpd/pptpd-logwtmp.so loaded.
Jan  5 17:50:16 server pppd[8980]: pppd 2.4.4 started by root, uid 0
Jan  5 17:50:16 server pppd[8980]: Using interface ppp0
Jan  5 17:50:16 server pppd[8980]: Connect: ppp0 <–> /dev/pts/1
Jan  5 17:50:16 server pptpd[8979]: GRE: Bad checksum from pppd.
Jan  5 17:50:17 server pppd[8980]: MPPE 128-bit stateless compression enabled
Jan  5 17:50:17 server pppd[8980]: found interface eth0 for proxy arp
Jan  5 17:50:17 server pppd[8980]: local  IP address 192.168.0.1
Jan  5 17:50:17 server pppd[8980]: remote IP address 192.168.1.1

fine :D

PS: It’s funny that my kernel on the android phone is newer than the kernel on the debian server ;)

Running python on android

Add a comment

hi!

I’m back – now it’s time to get some nice programs running on your android phone.

I found the python binary on the following website:  www.damonkohler.com

and here’s the binary: python2.4 binary

as you can read, there are still problems running lots of the libraries, but I think that I found a solution:

download the the standard python libraries here: python_lib
first mount the sdcard (home screen) and copy all the files to your /sdcard (also the python binary)

then umount the sdcard (home screen) and open a terminal to connect to your phone through adb (adb shell)

type in the following commands:

su
mount -o remount,rw /dev/block/mtdblock3 /system
cp -R /sdcard/python2.4 /system/bin/python
chmod 777 /system/bin/python
export PYTHONHOME=”/sdcard/lib/python2.4/”
export PYTHONPATH=”/sdcard/lib/python2.4/”
mount -o remount,rw /dev/block/mtdblock3 /system
python

screenshot_android

and you are done :D

##UPDATE:

If you want to permanently add the global vars just edit your init.rc and add the following vars under “# setup the global environment”

export PYTHONHOME=”/sdcard/lib/python2.4/”
export PYTHONPATH=”/sdcard/lib/python2.4/”

PS: don’t forget to remount the rootfs before editing the init.rc (mount -o remount,rw rootfs /)

revers caller lookup for android in austria #update

7 Comments

I found a nice and also free application on the android market called “Lookup Incoming Call

It currently supports a lookup for:

  • Sweden (Hitta.se)
  • whitepages.com (US)
  • GoYellow.de (DE)

and it also supports a custom lookup!

so i decided to program a little script to lookup phone numbers in Austria.

After two days of coding (python) it’s finished.

just add this URL to your custom provider:

http://server.true-binary.com/_lookup/index.py/get_info?number=P

and you are done.

It will show you the name and the street of the caller.

for example:

Max Mustermann – Home Street 6a

if anything is missing, tell me.

cheerio, chaos

################################

#1 UPDATE:

added support for two more countries:

  • GERMANY
  • SWITZERLAND

################################

#2 UPDATE:

Because of DNS problems the server was unreachable for a few days.

It should work again on July, 28, 2009 18:00 (GMT+2)

################################

tmobile g1 german keyboard layout qwertz

5 Comments

hi guys!

yesterday i updated my phone to the HERO image.

nice design, but veeery slow!

and i had one BIG problem: the physical keyboard layout was QWERTY

so how to change it back to QWERTZ? Here’s the answer:

download the keyboard file and copy it to the /sdcard :

trout-keypad-v3.kcm.zip

and open the terminal emulator on the phone, or thru adb:

su
mount -o remount,rw /dev/block/mtdblock3 /system
cd /system/usr/keychars/
dd if=/sdcard/trout-keypad-v3.kcm.bin of=trout-keypad-v3.kcm.bin
mount -o remount,rw /dev/block/mtdblock3 /system

and you are done!

cheerio, chaos

trip to lazise

2 Comments

hell yeah, I’m back from a little trip to italy

* it was hot

* it was nice

* too much to drink

but a great “holiday”

so wanted to make some nice pics, but I’ve forgotten my cam at home, so my g1 tryed to make it:

2009-06-11-205537

cheerio & stay tuned!