Thursday, June 14, 2007

Squid with ncsa_auth authentification

To use Squid with authentication, we need:

A user and their password. We can create it with:

htpasswd -c /etc/squid/users user

and type the password. To add a new user, we must use:

htpasswd /etc/squid/users newuser

Edit /etc/squid/squid.conf and add:

auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd

And finally, in the same file (/etc/squid/squid.conf), in ACLs section, create a proxy_auth acl:

acl authenticated_users proxy_auth REQUIRED

And the http_access rule to this acl:

http_access allow authenticated_users

Finally, restart Squid and voilá, when you are going to enter the web your browser asks you about a user and password.

Search spam in imap folders

I've made an script to search a folder called Spam and learn all emails as spam mails or if the folder is called Ham, then all emails are learned as not-spam.

This two scripts, called search-ham and search-spam are made to work with Vpopmail, Courier-Imap and Spamassassin. To use it, you only need to edit the script amb modify the variables "dominio" to configure the vpopmail domain to search in, "spamdir" to configure the name of the folder where the users are storing the spam or not-spam emails and "ruta", the folder where the vpopmail domain is. And then, you only needs to execute the script or configure a crontab to run periodically.

The script called search-ham is for email classified as not spam and search-spam for email classified as spam. The scripts uses the command sa-learn from Spamassassin to learn spam o ham emails.

The scripts are made with Python. Download here.

Tuesday, June 12, 2007

Consejos de seguridad para Apache

Una pequeña recopilación de consejos para seguridad en Apache que he ido utilizando en varios cursos, desde cosas sencillas hasta otras mas complicadas como apache-ssl o archivos .htaccess. Falta profundizar un poco en mod-security, pero bueno, ya lo iré haciendo. El documento está en castellano.

http://docs.google.com/Doc?id=dhk4fx6_35f9m2zk

Wednesday, March 28, 2007

Gnirfleo fake

Gnirfleo is a project to make a homebrew web browser to Nintendo DS. The release day was fixed by Gnirfleo (the programmer) to 24 of March (at the present year, supose:) ) but Gnirfleo announced that he hasn't time to upload it and another "doubtable excuses". Is this another fake? Is he making time to 1st April?

I supose that Gnirfleo will announce the fake the 1st of April... another time. This isn't the first time that a fake is published to the Nintendo DS scene, is sad but real. We'll wait to April.

Apuntes varios de qmail

He hecho una pequeña recopilación de apuntes varios sobre qmail... instalación de qmail con tcpserver, instalación del vpopmail y configuraciones de seguridad varias con qmal-scanner, autentificación por smtp contra vpopmail via vchkpw, anti-virus con Clam-AV, Spamassassin, uso de listas negras y otros. El documento está en castellano.

Apuntes de Qmail

Friday, March 9, 2007

Encode an entire folder to utf-8 with iconv

I've made a python script to encode a folder with text files from iso-8859-1 to utf-8. It can be used with other code types changing -f iso-8859-15 to -f your_original_code and -t utf-8 to -t code_to_export in the last line starting with "os.system...".

The script is here. Is very useful to change all my .txt ebooks that are originally in iso-8859 to utf-8 (that is needed by moonshell multimedia tool, to read ebooks in my Nintendo DS). To use only execute the script in the folder. Is not recursive, only changes the .txt that are in the folder.

Monday, March 5, 2007

Conexiones vpn con PPTP bajo Linux

Hace bastante hice un documento para crear y configurar conexiones vpn bajo Linux con pptp. Es un sistema de vpns bastante sencillo pero muy utilizado por clientes Windows, por lo que suele usarse bastante. Subo el documento para que todo el mundo pueda acceder a el. Y como ya lo he perdido y vuelto a encontrar cinco o seis veces, de paso, espero que quede aqui "fijado" definitivamente. El documento esta en español.

Conexiones vpn con pptp bajo Linux