Blog

Ubuntu

Ubuntu (8)

Escritorio remoto (Xrdp) es una implementación gratuita y de código abierto del servidor Microsoft RDP que permite que los sistemas operativos distintos de Microsoft Windows proporcionen una experiencia de escritorio remoto totalmente funcional y compatible con RDP.

Este tutorial le explicará cómo instalar y configurar Xrdp en Ubuntu 18.04.

Requisito previo

Sudo acceso a su servidor Ubuntu 18.04

Para parar el mailing masivo de cron que envía cada 30 minutos correos con asunto: 

[ -x /usr/lib/php/sessionclean ] && /usr/lib/php/sessionclean

Miércoles, 09 Mayo 2018 21:03

Instalar ioncube en UBUNTU

Escrito por

1. Descargar el repositorio y descomprimirlo

# wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.zip

# unzip ioncube_loaders_lin_x86-64.zip


2. Encontrar el directorio de extensiones

# php -i | grep extension_dir

extension_dir => /usr/lib/php/20151012 => /usr/lib/php/20151012

Domingo, 29 Abril 2018 15:08

Instalar mcrypt en PHP7

Escrito por

1) sudo apt-get update

2) sudo apt-get install mcrypt php7.0-mcrypt

3) sudo apt-get upgrade

4) sudo service apache2 restart

Miércoles, 27 Diciembre 2017 22:20

Instalación del antivirus ClamAV en Ubuntu

Esrito por

Para instalar ClamAV y escanear en Ubuntu, hay que seguir los siguientes pasos

1) Actualizar el repositorio de paquetes e instalar el paquete ClamAV

sudo apt-get update

sudo apt-get install clamav clamav-daemon

2) Actualizar la base de datos de virus de ClamAV

sudo freshclam

3) Escanear la ruta deseada

sudo clamscan -r /home

sudo clamscan -r /

sudo clamscan --max-filesize=3999M --max-scansize=3999M --exclude-dir=/sys/* -i -r /

4) Para verificar la versión del ClamAV

sudo clamscan -V

Miércoles, 27 Diciembre 2017 00:53

¿Cómo desactivar el servicio SAMBA en Ubuntu?

Esrito por

Para parar el servicio de samba 

sudo service smbd stop
sudo service nmbd stop


Para desactivar el servicio de samba, para que no inicie después de un reboot

sudo mv /etc/init/nmbd.conf /etc/init/nmbd.conf.stop
sudo mv /etc/init/smbd.conf /etc/init/smbd.conf.stop

Mcrypt es una extensión necesaria para el funcionamiento de prestashop. Es una de las extensiones más usadas por varios frameworks. Si durante la instalación de prestashop en el hosting, nos da error de mcrypt, seguramente es porque no esté instalada dicha extensión.

Lo primero que deben hacer es instalar la extensión en mención, para ello escribe este comando en la terminal:

sudo apt-get install mcrypt php5-mcrypt

sudo php5enmod mcrypt

sudo service apache2 restart

Si esto no llega a funcionar, hay otra opción y es editar el archivo mcrypt.ini de php para indicarle donde se encuentra el archivo que necesita, para esto escribe los siguientes comandos.

locate mcrypt.so (para buscar el archivo)

En los resultados de búsqueda veras una ruta igual o similar a esta /usr/lib/php5/20131226/mcrypt.so , dicha ruta debes copiarla editar el archivo mcrypt.ini con la orden:

sudo gedit /etc/php5/mods-available/mcrypt.ini

Al final tu archivo mcrypt.ini debe quedar asi:

extension=/usr/lib/php5/20131226/mcrypt.so

finalmente reinicia el servicio de apache:

sudo service apache2 restart

Domingo, 30 Octubre 2016 23:35

¿Cómo instalar y configurar SPAMASSASSIN en Ubuntu

Esrito por

About Spamassassin

Spamassassin is a free and open-source mail filter written in Perl that is used to identify spam using a wide range of heuristic tests on mail headers and body text. It will save your mailbox from much unwanted spam emails.

 

1. Prerequisites

Before installing Spamassassin, you need to install and setup a mail transfer agent such as Postfix on your virtual private server.

You can find instructions on that here

 

2. Install Spamassassin

Use apt-get to install Spamassassin and spamc.

apt-get install spamassassin spamc

Once Spamassassin is installed, there are a few steps that has to be taken to make it fully functional.

 

3. Adding Spamassassin User

To run Spamassassin you need to create a new user on your VPS.

4. First add the group spams:

groupadd spamd

then add the user spamd with the home directory /var/log/spamassassin:

useradd -g spamd -s /bin/false -d /var/log/spamassassin spamd

then create the directory /var/log/spamassassin:

mkdir /var/log/spamassassin

and change the ownership of the directory to spams:

chown spamd:spamd /var/log/spamassassin

Let's set up Spamassassin now.

 

5. Setting Up Spamassassin

Open the spamassassin config file using:

nano /etc/default/spamassassin

To enable Spamassassin find the line

ENABLED=0

and change it to

ENABLED=1

6. To enable automatic rule updates in order to get the latest spam filtering rules find the line

CRON=0

and change it to

CRON=1

Now create a variable named SAHOME with the Spamassassin home directory:

SAHOME="/var/log/spamassassin/"

Find and change the OPTIONS variable to

OPTIONS="--create-prefs --max-children 2 --username spamd -H ${SAHOME} -s ${SAHOME}spamd.log"

This specifies the username Spamassassin will run under as spamd, as well as add the home directory, create the log file, and limit the child processes that Spamassassin can run.

 

7. If you have a busy server, feel free to increase the max-children value.

Start the Spamassassin daemon by using the following code:

service spamassassin start

 

Now, let's config Postfix.

Configuring Postfix

The emails still do not go through Spamassasin. To do that, open Postfix config file using:

nano /etc/postfix/master.cf

Find the the line

smtp      inet  n       -       -       -       -       smtpd

and add the following

-o content_filter=spamassassin

Now, Postfix will pipe the mail through Spamassassin.

 

To setup after-queue content filter add the following line to the end of the file

 

spamassassin unix -     n       n       -       -       pipe

        user=spamd argv=/usr/bin/spamc -f -e  

        /usr/sbin/sendmail -oi -f ${sender} ${recipient}

For the changes to take effect restart postfix:

service postfix restart

Now postfix will use spamassassin as a spam filter.

 

 

Configuring Spamassassin on your VPS

To get the maximum use of Spamassassin you have to create rules.

 

Open the Spamassassin default rules file using:

 

nano /etc/spamassassin/local.cf

To activate a rules uncomment line remove the # symbol.

 

To add a spam header to spam mail uncomment or add the line:

 

rewrite_header Subject [***** SPAM _SCORE_ *****]

Spamassassin gives a score to each mail after running different tests on it. The following line will mark the mail as spam if the score is more than the value specified in the rule.

 

required_score           3.0

To use bayes theorem to check mails, uncomment or add the line:

 

use_bayes               1

To enable bayes auto learning, uncomment or add the line:

 

bayes_auto_learn        1

After adding the above details, save the file and restart spam assassin.

 

service spamassassin restart

 

Testing

To see if Spamassassin is working, you can check the spamassassin log file using:

 

nano /var/log/spamassassin/spamd.log

or send the email from an external server and check the mail headers.

Sobre CNERIS

CNERIS es una empresa constituida por jóvenes emprendedores procedentes de diferentes sectores del mundo de la información. Nuestro equipo está compuesto por programadores, administradores de sistemas, administradores de base de datos, diseñadores gráficos, maquetadores,