Archive for the 'Server' Category

Push mail for iPhone with Cyrus and z-push

Some days ago I came across z-push a very interesting open source project. I decided to give it a try and see how it works with my iPhone.
I really didn’t expect to be up and running in only 5 minutes! So I won’t write anything here about the installation, just read the manual and everything should be clear.
But there are two things I have to mention if you are using Cyrus.

  • Synced mails will be marked as read! The solution for this is in this post in the z-push forum
  • Sync might not work due to encoding problems (iPhone will say that there is no connection to the server). The solution for this is in this post in the z-push forum.

After solving these two issues everything worked perfect! The only problem that remains, and this is nothing z-push can solve, is the battery usage of the iPhone. Be warned! Your battery will be empty after 2 days in some cases even after 1 day. This really sucks, I have to admit, this is where BlackBerry will get a point.

How libnss-mysql stole my evening

After installing a new VPS I thought I would go with Debian Lenny, although it’s not “stable” yet. The installation was quick and easy, no problems here. Then a control panel was needed, here of course I went with DTC the great GPL control panel from gplhost. After everything was up an running I noticed postfix was crashing.
warning: process /usr/lib/postfix/bounce pid 23776 killed by signal 6
warning: /usr/lib/postfix/bounce: bad command startup -- throttling
warning: process /usr/lib/postfix/smtpd pid 4848 killed by signal 6
warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

As usual, when you have no idea what it is, start searching. Funny enough, the first search result on google was a topic on gplhost froums, where I actually answered! Unfortunately my answer was related to a different question of that thread, but I still think it’s a bit funny. So as dsadmin was writing, it seems to be a mysql connection problem. The workaround described there (removing the mysql stuff from nsswitch.conf) does help, but it’s just a workaround and not a solution. It seems like libnss-mysql is broken in Debian Lenny and probably in Ubuntu also. A recompile didn’t help.

So, here comes Damien (also from gplhost) with the idea to install libnss-mysql-bg instead of libnss-mysql. After some modifications to the dtc control file (without them debian removes dtc because of dependency to libnss-mysql) I could remove libnss-mysql and install libnss-mysql-bg instead. Now all I had to do is run the DTC installer one more time so it can make all necessary modification to the libnss-mysql-bg config files (yes, DTC works with both!) and my problems where all solved.

You get what you pay for

Some time ago I got an hosting account at a cheap company (I won’t mention any names). All was good and fine until the trouble started.

1. No detailed access logs

There is no way to see who logged in when over ftp. The only thing that is logged is the access over the web interface. This is not enough! I just found out that several index.html and index.php files where modified between april and may. They all where “infected” with some extra javascript code. Funny enough, somewhen during this time there was a modification to the FTP server of that provider. All passwords where modified and you had to change the password over the webinterface for all accounts. Strange isn’t it. There was no official statement about anything getting hacked. 

2. Useless webstats

One of my sites hosted there had in a day about 200Gig traffic. Although they promise you about 5000 Gig traffic per month, all my sites where locked down due to bandwidth exceeding. Support told me this:

All ***** accounts are allowed to use 167 GB of transfer per day. If you site goes over this limit it will be taken offline until the next day. 

 I tried to find anything about this on their website and find no trace about this limitation. Anyway, the reason for the huge traffic amount was of course someone with bad intentions. It is weird since there is no real website on that account. It was used for exchanging larger files (legal content, no piracy) and nothing that would really be of interest to someone. I couldn’t find out what was downloaded and from where to cause such huge traffic, the support was of no help and ALL MY SITES WHERE OFFLINE for one day. Really all of them! Not just the one causing the traffic. 

There where some other minor issues why I don’t like this provider, but they I can’t remember now and anyway, like I mentioned, they where minor issues. The two big issues I mentioned above is the reason why I will cancel my account. 

 

oh yes … one of the minor issues is they don’t support sFTP or FTP with SSL, just plain unencrypted FTP. Not very nice.

DoS attack

Since yesterday I am facing a DoS attack on one of my IP’s
The server is being hit by UDP packets on port 80. I could solve some of the issues created by this high load and server are running, but the attack is still going on as I write this with 20Mbit and creating traffic of about 9 GB/hour.

dos_1.png
dos_2.png

HowTo: Install splunk>_ on Debian

* Download the RPM from http://www.splunk.com
* create a deb package with alien
* install the deb package (dpkg -i .. )
* cd /opt/splunk/bin
* ./splunk start

If you get errors like this: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

Then install libstdc++6

* apt-get install libstdc++6

It’s that simple :)

Technorati Tags: , ,

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.

Download openfire from http://www.igniterealtime.org/downloads/index.jsp
download the tgz file, the rpm installation with alien didn’t work for me on a AMD64, will probably work for i386.
unpack it move it to /opt

tar -xzvf openfire_3_0_0.tar.gz
mv openfire /opt

You don’t need to install any mysql java connector as mentioned on howtoforge, openfire now comes with everything you need.
Create a new database and create the tables with the provided file.
for example: mysql -u -p < /opt/openfire/resources/database/openfire_mysql.sql

Make sure openfire.xml is writeable:
# chmod 777 /opt/openfire/conf/openfire.xml

Now setup openfire over the webinterface: http://localhost:9090 or http://127.0.0.1:9090
or use whatever server it is running on instead of localhost.

Note: if you have something like this in your /etc/hosts file

127.0.0.1 foobar localhost localhost.localdomain

it won't work since it will try to connect with dbuser@foobar instead of dbuser@localhost which won't work!
change you /etc/hosts so that localhost is first!

Technorati Tags: , , , ,

[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.

Technorati Tags: , ,

My fileserver in action

esplendidos.jpgWell, 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 :)

LV        VG      Attr   LSize    Origin Snap%  Move Copy%
sharelv   sharevg -wi-ao  931.52G

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.

So I want to share my mini howto of how I configured getmail to run with amavis. I also explain how to use it with avira (former hbedv) Antivir.

Running Kolab on a AMD64

To get Kolab running on a 64bit system, compile the source on a 32bit system or if you have, like in my case, a running kolab that you want to migrate then no compilation is needed. Just install the 32bit libs (apt-get install ia32-libs) and kolab is ready to go.
Don’t forget to add users/groups/startup scripts to the new 64bit system.
Now I just have to get rid of the stupid “User Deleted, awaiting cleanup…” message, which has nothing to do with amd64, this message is there since Kolab was installed and a user deleted.

Technorati Tags: , ,

Next Page »