Openvpn in the TP-LINK WR841N[D]

Hi folks,
Here comes a post to improve that great router from TP-LINK.
Of course, I suppose you’re running openwrt on it to use the whole power of it.
The 1st I saw was that you have available a plenty set of packages… but you don’t have enough ROM to install them :-P
Inspecting a bit, I saw that under /tmp you have a “lot” of free space! (about 14MB), that will be enough to allow run openvpn without problems.
The main problem? Its a ramdisk, so each boot, everything there disappears.
What I’ve done? Install the basics with opkg and wget on boot the rest ;-)

UPDATED SCRIPT!

Continue reading “Openvpn in the TP-LINK WR841N[D]”

My adventures with Android (I)

The history:

Recently I bough a “Ainol tornados” for testing purposes, and that was the cheapest one (~60€ shipping included!)
When it arrives to me, I tried to install openvpn (is basic for my project) but nothing on the “tun.ko” repo works for me :-(, the “magic string” which makes match a module with the kernel does not match and I tried all the avalaible rom except 4.0.4.
The problem was the insmod itself, not the tun.ko installer.
So I decided to build my own version of the android :-)

Here begins the adventure itself…
I downloaded the source code directly from Ainol forums… That HUGE package contains EVERYTHING for building (android-sdk, android-ndk, crosscompilers in multiple versions, emulator files… ETC), so don’t care about that if you’ll donwnload it.
Starting from the AOSP project wiki, I set up the build environment with java6, make 3.81.
So: Continue reading “My adventures with Android (I)”

Parallel rsync’ing a huge directory tree

Some days ago I was on the chance to transfer a huge directory.

Huge means ~50TB with +10million files and a deep of only 6 folders under the parent one.
As I must do that kind of transfer more than 10 times with the same amount of folders… I decided to implement some kind of parallel function which launch parallel rsync’s at a given deep of my choose.

The ressult was that “pure bash” little script (the only dependency is “screen”)… You’ll notice that the main function “sync_this()” will run alone in your script only changing 2 or 3 variables ;-)
Continue reading “Parallel rsync’ing a huge directory tree”

Ciclo Herramientas gnu/linux (VII): moc

No es ningún tema de fubol por supuesto :P
moc es un reproductor basado en ncurses (para variar), como cualquier otro reproductor X de los simples, con reproducción por listas, exploración de directorios y poquito más (pa qué).
Ocupa poco, funciona realmente bien y no hay mucho que configurar :)

En mi caso lo único a sido asignar las teclas multimedia del teclado, en $HOME/.fluxbox/keys por supuesto:

None XF86Tools :ExecCommand roxterm -e mocp
None XF86AudioPlay :ExecCommand mocp -G
None XF86AudioLowerVolume :ExecCommand amixer -q set PCM 5%- unmute
None XF86AudioMute :ExecCommand amixer -q set Master toggle
None XF86AudioRaiseVolume :ExecCommand amixer -q set PCM 5%+ unmute

También tenemos la aplicación moc-tray para los tray-lovers ;-) aunque entonces yo optaría por xnoise que tiene todo ya integrado.

Serverstats, el “cacti” ligero

En mi búsqueda habitual de aplicaciones lightweight y tras tirar “cacti” a la basura por motivos de rendimiento óbvios, he encontrado “serverstats” a través de un blog donde lo analizan bastante bien, asi que no voy a ponerme a analizarlo yo :P

La cuestión viene cuando he intentando personalizar la configuración inicial.
Lo primero que he visto que aunque en la documentación diga que modificando el fichero “config/sources.php” carga módulos… no lo hace :-P, únicamente hará caso del fichero “config/simple.php“.
Por ejemplo, para activar el módulo de monitorización de mysql he tenido que habilitarlo en el “simple.php“:

'mysql' => array(
'used' => true,
'host' => 'localhost',
'user' => 'serverstats',
'password' => 'serverstats',
'graphs' => array(
'questions' => array('used' => true, 'title' => 'MySQL: questions per second'),
'processes' => array('used' => true, 'title' => 'MySQL: query count ("SHOW PROCESSLIST")')
)
),

Continue reading “Serverstats, el “cacti” ligero”