Mostrando entradas con la etiqueta ClearOS. Mostrar todas las entradas
Mostrando entradas con la etiqueta ClearOS. Mostrar todas las entradas

jueves, 18 de octubre de 2012

ClearOS add new network card after initial setup

Spanish Keywords: Agregar una tarjeta de red adicional a un servidor de ClearOS 5.x después de la configuración inicial

source: http://www.clearfoundation.com/component/option,com_kunena/Itemid,232/catid,24/func,view/id,4315/





I'm new to ClearOS and am loving it. Am no pro, but I needed to add a third NIC to create a DMZ. Sadly, Multiple reboots didn't do the trick for me.... So I had to do it manually.... and with help from posts in this forum and the web, it worked 

I'm sure there are easier ways to do this, but this is how i went about it.

Logged onto a console, Alt+F2, and did the following;

To see if the third NIC had been detected, i did;



Code:


--------------------------------------------------------------------------------

# kudzu -p | grep network
--------------------------------------------------------------------------------


network.hwaddr: xx:xx:xx:xx:xx:xx
network.hwaddr:yy:yy:yy:yy:yy:yy
network.hwaddr:zz:zz:zz:zz:zz:zz

so the third network.hwaddr above is for the new card.

To find the mac address of eth0 and eth1, i did,



Code:


--------------------------------------------------------------------------------

#cd /etc/sysconfig/network-scripts/
# less ifcfg-eth0
# less ifcfg-eth1
--------------------------------------------------------------------------------


Better still you could do; (be sure to use caps on HWaddr)



Code:


--------------------------------------------------------------------------------

# ifconfig | grep HWaddr
--------------------------------------------------------------------------------


then; copy ifcfg-eth1 to ifcfg-eth2



Code:


--------------------------------------------------------------------------------

# cp ifcfg-eth1 ifcfg-eth2
--------------------------------------------------------------------------------


then using your favourite text editor, vi, nano.....



Code:


--------------------------------------------------------------------------------

#nano ifcfg-eth2
--------------------------------------------------------------------------------


change the lines,

DEVICE='eth1' to 'eth2'
IPADDR="192.168.X.X" to the desired ip of DMZ "10.0.x.x"
NETMASK="255.255.255.0" to desired mask
HWADDR="xx.xx.xx.xx.xx.xx" to the mac address of the new card.

save and exit.

then;



Code:


--------------------------------------------------------------------------------

# ifup eth2
--------------------------------------------------------------------------------


then Alt+F7 (to go back to the GUI) and voila there it was eth2 under network->Settings->Ipsettings.....




miércoles, 12 de octubre de 2011

ClearOS 5.2 There should be a way to specify auto-purging for mail quarantine, e.g. delete messages older than X days old.

Source:

There is a "quarantine-purge" script that will automatically delete messages older than 30 days. On a ClearOS 5.1/5.2 system, run the following to grab the latest version of the quarantine software:

yum upgrade mailzu

Then run "quarantine-purge". Feel free to configure a cron job for this too of course.

martes, 4 de octubre de 2011

ClearOS Install Vmware Tools

Source: http://www.clearfoundation.com/component/option,com_kunena/Itemid,232/catid,40/func,view/id,13458/


VMWare Tools Install 1 Year, 3 Months ago
Hi all -

For those who have been left wondering - here is instructions for installing VMWare Tools.
*Stolen From: VMWare Communities


Code:
yum upgrade
yum install gcc kernel-devel
uname -r
rpm -q kernel-devel
(make sure the versions of the above two match exactly)

4: Now, using the vSphere Client, do the "Guest -> Install Vmware tools" fun stuff...
5: Returning back to the SSH / vSphere console session:
Code:

mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom/
cd /mnt/cdrom/
cp -rp VM*.tar.gz /tmp
cd /tmp
tar -zxvf VMwareTools-xxxxxxxx(your.ver).tar.gz,

There is a bug with VMXNET module under CentOS - patch is as follows:
Code:

cd /tmp/vmware-tools-distrib/lib/modules/source/
mkdir 1
cp vmxnet.tar 1
cd 1
tar -xvf vmxnet.tar
nano -w vmxnet-only/compat_netdevice.h

Comment out the line as per: bugs.centos.org/view.php?id=3977
(add a /* before, and a */ after:)
Before:
Code:
struct napi_struct {
int dummy;
};

So it will look like this:
Code:

/*
struct napi_struct {
int dummy;
};
*/


Now, hit CTRL-O to save, and CTRL-X to exit nano
copy patched module back to sources dir
Code:
rm vmxnet.tar
tar -cvf vmxnet.tar vmxnet-only/
mv vmxnet.tar

and complete the install of vmware tools
Code:

cd /tmp/vmware-tools-distrib/
./vmware-install.pl --default

And that will build the tools - with all the default choices...

lunes, 16 de mayo de 2011

ClearOS Adding a second listener port on Postfix (great for closed ISP SMTP ports)

  1. Login to your ClearOS as root (use Putty.exe)
  2. Edit /etc/postfix/master.cf as follows: find the line that says "smtp inet n - n - - smptd"copy the line or change the line "smtp" to "2525" or whatever port you want the postfix daemon to use.
  3. vi /etc/postfix/master.cf
  4. to copy line press Y
  5. to paste line press P
  6. replace on the pasted line the word smtp to 2525
  7. press Esc
  8. wq!

Restart postfix "/etc/init.d/postfix restart".

Go to Network- Firewall- Incoming
Add Nickname/port: SMTP2525
Select: TCP
PortBox: 2525
click add

Configure Outlook advanced SMTP options to point to port 2525 instead of default 2525

B

Clear OS - Banned Office 2007 Files - docx, xlsx, pptx

Source: http://www.clearfoundation.com/component/option,com_kunena/Itemid,232/catid,14/func,view/id,15627/

Re:Banned Office 2007 Files - docx, xlsx, pptx 9 Months, 1 Week ago
If you do want to pass these then add them to the list also (note these will be passed as 'clean' regardless of content)

I found the following also worked:-

Create a file called /etc/amavisd/override.conf

Code:
$banned_filename_re = new_RE(
[ qr'(\.xlsx|\.docx|\.pptx|\.xlsm|\.docm|\.pptm)$' => 0 ], # allow all MS Office 2007 (including macro)
);


Then run 'service amavisd restart' - it should now pass these files, the ones to be wary of are xlsm or docm which contain macros.

You can disable the .bin files from being blocked but opens a bit of a security hole for other binary files from admin console

Server- Mail Scanning-Antimalware Uncheck .bin CD Iso image files

martes, 30 de noviembre de 2010

Borrar cola de postfix de un spammer

Para detener el correo:
service postfix stop
Para ver toda la cola:
mailq

Para crear un script para borrar la cola de acuerdo al sender variable $7

vi /root/postfix_queue.sh
mailq | awk 'BEGIN { RS = "" }
# $7=sender, $8=recipient1, $9=recipient2
{ if ($7 == "spammer@domain.com")
print $1 }
' | tr -d '*!' | postsuper -d -

Para grabar:
ESC :wq

Para dar permiso de ejecucion al script
chmod 755 /root/postfix_queue.sh

Para correr el script
/root/postfix_queue.sh

SUERTE!