Exim, DNS blacklists and fail2ban

Last week, I saw an huge “spam” outbreak on my MX servers. Instead of ~200k rejected SMTP connections, I had ~3M connections and it was rising. This caused some minor issues with the frequent log parsing as the log file quickly grew. To reduce the log file size and also the DNS requests number, I decided to use fail2ban to drop the connections before they got to Exim. This is rather easy, just create/append /etc/fail2ban/jail....

February 12, 2013

Varnish and Apache log files

If you use Varnish with an Apache server and analyze Apache log files (with AWstats or something else), you probably saw all requests were coming from 127.0.0.1 (or the IP address Varnish is on). You’ve probably forgotten to change the LogFormat you use. Fortunately, Varnish adds an header on its request to Apache with the remote IP address in it. Just replace “%h” with “%{X-Forwarded-For}i” in the LogFormat and reload your server....

February 12, 2013

Debian/Linux MX server

I needed to install some incoming mail servers (MX servers) to filter emails before delivering them to customers servers. So the need is to accept mails for a fixed list of domains, check for viruses and spams, then route them to customers servers for delivery. The distribution is Debian 6, the mailserver is Exim. The antivirus check is done by ClamAV and the antispam with Spamassassin + Pyzor + Razor + DCC + DNSBL....

October 6, 2012

Ubuntu 12.04 on HP Microserver N40L

Just some thoughts and things I’ve done. The hardware is the following: the Microserver itself, 2x 4GB DDR3, one 16GB USB flash drive, some 2TB SATA hard drives, Logitech S-150 USB speakers, and a GT520 HDMI+DVI graphic card. Installation on USB flash drive. There’s an USB port on the motherboard, so I plugged a 16GB USB flash drive and installed Ubuntu to it. The filesystem is ext4 because I trust it a lot more than btrfs and because it seems it’s quite good on a flash drive (source , it’s old, I know)....

July 4, 2012

Wowza 3 + Ubuntu 12.04 setup

2012-08-13 Update: simple monitoring with Cacti. The goal I want to have a clean Wowza setup for a live streaming platform. The access to the streaming server will be open but every other service (management interface, ssh, web server, etc) will be firewalled. There will be usage reporting through awstats, monitoring through SNMP (performance) and Nagios NRPE (availability). Ubuntu Ubuntu installation I’ve done a standard installation, nothing fancy. Partitionning is done like this:...

May 16, 2012

vSphere NIC teaming, Cisco router and HP Procurve switches

So, like me, you want to have redundancy for your virtual machine network. For my lab setup, I use a refurbished Cisco router 3825 with two gigabit interfaces, two Procurve 2810-24G and a small server with 4 gigabit interfaces for the ESXi. You just have to: team the NICs on the ESXi (use src-mac + beacon probing), use port-channel on the Cisco router and src-mac too, configure the switches exactly the same way as if there wasn’t any redundancy, add a link between the two switches and configure it to transmit the VLANs you need, don’t forget to add STP on the switches and put a high priority (low number) on the link between the switches....

April 27, 2012

vSphere CPU performance monitoring

Vos machines virtuelles sont lentes, vous pensez que le CPU n’est pas en cause parce que vous avez une utilisation faible des pCPU ? Regardez-y à deux fois, il se pourrait que vos VM attendent du pCPU disponible! Pour vérifier que vos VM n’attendent pas pour avoir du CPU, allez dans l’onglet performance, advanced, CPU. Dans chart options, choisissez “Ready (ms)”. C’est bien joli, mais ça ne vous dit pas encore grand chose....

April 13, 2012

Exchange 2003 : rechercher une adresse email

Si vous voulez retrouver à quel User est lié une adresse email dans Exchange, suivez les points suivants: Ouvrez Active Directory Users and Computers, Clic droit sur le domaine ciblé, cliquez Find, Dans le champ Find, choisissez Custom Search, Choisissez l’onglet Advanced, Entrez comme LDAP query: proxyAddresses=smtp:myemail@mydomain.example Vous devriez avoir un résultat qui est l’user associé à la boite mail ou à l’alias.

March 21, 2012

VMware : migration de Windows

Yo. Si vous voulez migrer des Windows vers une VM VMware, vous rencontrerez sans doute le fameux BSOD 0x7b. Le problème vient du fait que Windows n’a pas les infos pour gérer le disque. Pour aider à la résolution du problème, VMware a posté un item sur sa KB : http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1005208 Maintenant la VM devrait démarrer, mais vous n’aurez sans doute pas de connection réseau. Mais si vous essayez de configurer votre ancienne IP sur la nouvelle carte détectée, Windows vous insulte parce que l’IP est déjà configurée sur une autre carte....

March 16, 2012

VMware : bugs AutoDeploy

Il y a quelques mois, j’ai dû installer ESXi sur des serveurs blades sans contrôleur RAID supporté par VMware. J’ai donc naturellement emprunté le chemin d’AutoDeploy. J’ai testé la méthode sur un blade, je l’ai configuré comme il faut (vDS, vSwitch, iSCSI, HA, …), reboot un nombre incalculable de fois, migré des VM depuis et vers ce blade, tout fonctionnait parfaitement. Nous voilà arrivé à vendredi passé lorsqu’il a été décidé d’installer les autres blades de la même manière....

March 11, 2012