Cristian Livadaru's Blog

My personal view on things

1 Terabyte in a month

I did it, 1 Terabyte traffic in one month


Data from 2007/08/01 00:00:00 CEST to 2007/08/31 23:58:59 CEST
forwarded incoming GREEN (eth0) : 924G
forwarded incoming RED (eth1) : 88G

well …. almost, it’s only 1012G. Well, better luck next month


Telekom Austria (AON) also thinks we are stupid

Seems like AON is trying to fool consumers. They have launched (quite some time ago but I saw it now for the first time) a commercial campaign against mobile internet. They say that “real broadband” is better, faster and cheaper and also that if you have reached your limit you will have to pay for mobile internet but with “real broadband” you pay from 4 euro more and have flat rate. Ok, lets compare We will take the cheapest AON has to offer, that will be AON speed 500. This will be 20 Euro a month and receive 500MB traffic included and a speed of 512kbit/s down, we will ignore upstream. This means you could download with max 64kb/s! And what if you exceed the included 500MB ? You pay 7 cents for each MB! Oh, almost forgot, you need a phone connection for AON ! This means you also have to pay the phone, this is NOT included in the 20 Euro. Now let’s look at what one HUI has to offer. You pay 10 Euro a month and get 250MB for this, if you want extra 250MB you pay 5 Euro. So you have the 500MB for 15 Euro. How about the speed? See for your self


The bad and ugly GOTO

In school you learn to never ever use GOTO in your programs, since in real life things turn out to be much different then in school it’s not quite practicable. I was looking for GOTO in Bash and came across this statement

Quote: Originally Posted by gnashley Not a good idea to use GOTO in BASH. Try using a while statement instead, or use functions.

And this was the reply


HowTo install openfire (former wildfire) on Debian

Note: This has been done on a Debian Sarge installation but it should work on Etch also, I will report if it does once I have done it, sometime this week. I found this post on howtoforge and it helped me alot.

First you need Java JRE, lucky me I had a deb package on my server from some other tests so I didn’t need to create a new JRE deb package. Follow this howto to create a debian package so you can install JRE the debian way. Once you installed the JRE you can continue with openfire.


[HowTo] Installing eAccelerator on Debian etch

This works for php4 and php5, apache1.3 and 2!

first get php5-dev (or php4-dev, depending on what you use) apt-get install php5-dev

get eaccelerator from here and unpack it.

cd eaccelerator-0.9.5
phpize
./configure
make
make install

create the eaccelerator cache directories

mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator

and add this to your php.ini (in my case: /etc/php5/apache2/php.ini )


extension=eaccelerator.so
eaccelerator.shm_size=64
eaccelerator.cache_dir=/tmp/eaccelerator
eaccelerator.enable=1
eaccelerator.optimizer=1
eaccelerator.check_mtime=1
eaccelerator.debug=0
eaccelerator.filter=
eaccelerator.shm_max=0
eaccelerator.shm_ttl=0
eaccelerator.shm\_prune\_period=0
eaccelerator.shm_only=0
eaccelerator.compress=1
eaccelerator.compress_level=9
eaccelerator.allowed\_admin\_path=/path/to/control.php

adjust the memory to whatever you like. Copy the control.php to whatever path you like (must be some htdocs accessible path) and set the path in eaccelerator.allowed_admin_path= … edit the file and user/password. now restart apache and you are done! go to the link where control.php is and check if you can login and if it works.


IPCop out of the 'box'

I bought a VIA mini ITX mainboard to make a new firewall, the old one with a Pentium1 166mhz was going a bit slow and since I also wanted to use VPN I needed something better. IPCop was installed quite fast, and a quick search brought me to this great howto. After setting up VPN I needed a client for Mac OS and I found “Tunnelblick“, quick installation and everything worked great. Now together with my mobile internet connection I can log in from everywhere and also be secured. Ok but what is it with the topic, out of the box? Well, usually this has some other meaning, but I really mean my IPCop works “out of the box”, I couldn’t find a case where I could fit it in so I just took a cardboard box


My fileserver in action

Well, after I managed to fill 600Gigs it was time to get a new hard disk. I do still have some IDE Ports on that boad free, but why not get a SATA controller and a brand new SATA disk instead? Faster and it will also work if I switch the mainboard.

Well, there was only one problem, I still had my two big discs in a RAID 0 array which can’t be expanded by a third disk so it was time to switch to LVM. Lucky me that I had 4 SATA disks for the server I am working on where I can move my data to free the disks for the LVM. It took awhile to move 600gigs but now everything is done and my fileserver is back online with a nice and big LVM that could be expanded …. if I had more power connectors for the hard disks and space in the case for a new disk, the harddisk in the photo that is outside of the case is really connected and running


Finally, mobile internet

I went to the One shop and got a driver CD for the Mac. The driver is something under 200kb! Come on one … you could have sent me this trough a fucking e-mail!

Anyway, the speed is quite impressing! Check this out

One HUI speed
One HUI speed

1.3mbit … coooool


getmail vs fetchmail

I recently got quite fed up of fetchmail. The problem is that there are mails on an account from invalid sender domains (like foo.bar for example) since my Postfix rejects such mail because it can only be spam fetchmail didn’t manage to delete them. So it looped leaving the junk mails on the pop account and flooding my logfiles. The solution was getmail. Since I use postfix amavis cyrus there was no example config that fits my needs so I did some experiments but finally a mail from Elimar Riesebieter on the Mailinglist solved my problem.


Sweet Titles by class

I am working on the new version of the SMS Central which will be integrated in Joomla, it quite takes some time since I don’t have internet at home and it’s more a trial and error process. This is when you notice how much one is used to the internet and google. But at least I have MAMP (Apache PHP MySql) for Mac and I can at least do some tests. I came across Sweet Titles, which is great, but by default it does the “Sweet Titles” for the complete site, which isn’t really nice on a joomla site. The simplest solution is to use getEelementById to do it only for one id, this again is also not what I want, because a ID has to be unique, and I want it on more then one place. My solution was to use a GetElementsByClass function which I found here, and modify the original sweettitle.js.