Tuesday, 5 April 2011

Enable WebDav in Lighttpd - ligthy's mod_webdav

To enable WebDav in Lighttpd, e.g. to serve ics-style calendars for Mozilla Thunderbird simply edit

/etc/lighttpd/lighttpd.conf

and append following lines - adopt them to your needs

$HTTP["host"] == "mydomain.tld" {
alias.url = ( "/mypath" => "/were/the/files/are/" )
$HTTP["url"] =~ "^/mypath($|/)" {
webdav.activate = "enable"
webdav.is-readonly = "disable"
webdav.sqlite-db-name = "/var/run/lighttpd/lighttpd.webdav_lock.db"
}
}

then go to the top of this very file and enable the module

server.modules = (
"mod_access",
"mod_alias",
"mod_webdav",


Gracefully restart the daemon and you are done

/etc/init.d/lighttpd force-reload
Did it work for you - drop a comment.

Ubuntu automatic unattended upgrades

As seen in Windows with its automatic updates one can perform such action for Ubuntu as well.

Simply install the corresponding package

sudo apt-get install unattended-upgrades

Here we see how it works

dpkg -L unattended-upgrades

/etc/logrotate.d/unattended-upgrades
/etc/apt/apt.conf.d/50unattended-upgrades


It's done by the cron job an some setting in

/etc/apt/apt.conf.d/50unattended-upgrades

Here on can configure what updates are safe to become installed automatically.

One can also setup a email address in this config file for informations when updates were driven.

Unattended-Upgrade::Mail "yourname@yourdomain.tld";

Did it work for you. Just drop a comment.

Creating spamassassin custom rules

To prevent false positves when checking e-mail for spam with spamassassin it can be useful to provide certain text patterns that will/should never appear in spam mails, such as terms related to your business.

Such terms can be scanned to decrease the score value of spamassassin.

Edit /etc/spamassassin/local.cf and add a section like this

rawbody __BECAUSE_TERM /exampletermregex/iheader __BECAUSE_RECIPIENT ALL =~ /myaccount\@domain.tld/i
meta MYTERM_MAILBODY (__BECAUSE_TERM && __BECAUSE_RECIPIENT)
score
MYTERM_MAILBODY -5.0

Here is what happens:

In the first line the body of the mail will be scanned with the regular expression defined by "exampletermregex".

The second lines scan *all* headers of the e-mail for any occurence of e-mail address "myaccount\@domain.tld" - this is a regular expression as well.

The third lines concats the two conditions above. In the forth line the spam score for this e-mail will be decreased by 5 if both conditions are true. That's all!

Another example? Here only the header is scanned. Contains the subject a certain term and is the email address mentioned in the header?

header __BECAUSE_TERM Subject =~ /(term1|term2)/i
header __BECAUSE_
RECIPIENT ALL =~ /account\@domain.tld/i
meta
MYTERM_MAILHEAD (__BECAUSE_RECIPIENT && __BECAUSE_TERM)
score
MYTERM_MAILHEAD -5.0

If you have spamassassin running as a daemon you have to reload it to make the rules work.

Did this worked for you. Just drop a comment.

SpamAssassin 3.3.0 on Ubuntu Karmic 9.10

I did an update for my Spamassassin installation to version 3.3.0 here on my Ubuntu Karmic Kaola 9.10 driven mail server.

Spamassassin and spamd were already installed via aptitude. Here is what the version query shows:

spamassassin -V
SpamAssassin version 3.2.5
running on Perl version 5.10.0

spamd -V
SpamAssassin Server version 3.2.5
running on Perl 5.10.0
with zlib support (Compress::Zlib 2.011)

A short check shows the location of both files.

which spamassassin spamd
/usr/bin/spamassassin
/usr/sbin/spamd

So i had to do these steps:

Enable perl to compile the new version of the spamassassin filter

aptitude install build-essential

Now wget the tarball, untar it, change to the extracted directory and do

perl Makefile.PL
make
make install

Remove orginal spamassassin

apt-get remove spamassassin

and link the newly created files

ln /usr/local/bin/spamd /usr/sbin/spamd
ln /usr/local/bin/spamc /usr/bin/spamc
ln /usr/local/bin/spamassassin /usr/bin/spamassassin

Finally fetch the new rule set

sa-update -D

and restart the daemon if enabled in /etc/default/spamassassin

/etc/init.d/spamassassin restart

Final checks:

spamassassin --lint

Ok - no messages. Now call it directly - type some text and finish with "Ctrl-D"

spamassassin

type some text

Ctrl-D

You should see a typical spamassassin log.

And a version check:
spamassassin --version
SpamAssassin version 3.3.0
running on Perl version 5.10.0

spamd --version

SpamAssassin Server version 3.3.0
running on Perl 5.10.0
with zlib support (Compress::Zlib 2.011)

And check for the hard link create above - the "2" in the 2nd colon of the directory listing
indicates a hard link.

ls -la /usr/bin/
spamassassin
-r-xr-xr-x 2 root root 29620 2010-01-28 19:27 /usr/bin/spamassassin

ls -la /usr/sbin/spamd

-r-xr-xr-x 2 root root 105334 2010-01-28 19:27 /usr/sbin/spamd

Is spamd up and running?

pgrep spamd
15192
15193
15194

Did it work for you - any comments? Drop them here!

Friday, 18 March 2011

SEP 12 Announced

Symantec today announced the next version of Symantec Endpoint Protection. This release, version 12.1, will ship later this year. You can sign up for the beta at http://go.symantec.com/sep12beta/ .

Long in coming, this release is a major milestone. On the face of it, that statement is odd; after all, SEP is mature product and its feature set hasn't at a fundamental level, changed. It is still offers the critical elements of endpoint security, - malware protection, access control, device control, application control, firewall and IPS. It “kinda, sorta” looks like nothing has changed.

Well, don't believe it. There are countless new features in this release, and in subsequent blog posts I will dive into them. The real change, however, is under the covers and in the test results. SEP 12 is built on a powerful new stack of security technologies – which not only offer state-of-the-art protection, but which also position SEP to continue to provide great protection in a world with hundreds of millions, even billions of unique malicious programs.

Last year, Symantec identified 286 million different pieces of malware. Think about scanning each of the thousands of scanable objects on your computer for any one of 286 million malware signatures. Ok, the problem isn’t really that bad – that 286,000,000 figure represents mostly minor variants of a much smaller number of malware samples. But still, we are talking about over 10 million virus signatures.

Powered by Insight, SEP knows the reputation of up to 70% of the executables on your system – which means it need not scan those files unless they have changed. By reputation, I don’t just mean that we can identify bad files with signatures in the cloud (which, by the way, is the secret sauce behind McAfee’s Artemis/ Global Threat Intelligence technology). Insight does has something unique, well, 2 things. First, for every file we track (over 2.5 billion files), we have a security rating. Second, WE TRACK 2.5 BILLION FILES – 31 MILLION NEW FILES EVERY WEEK. Sorry for shouting, but that is a huge database. It is large enough that we can derive the context and the associations of the file – its "reputation" if you will, with great confidence. We are tracking the presence, age and security rating of nearly every executable on the internet. No-one else can do that. It is not even close.

Insight isn’t the only new security feature in SEP. The other half of the story is Sonar.
Sonar is an AI driven driven technology that tracks file behaviour in real time. Where older generations of heuristic scanners ran on file open/close/modify and on periodic scans, Sonar runs all the time – watching file behaviours and rating them on over 400 attributes.

The other big change in SEP is its enhanced support for virtualization. I look into the new virtualization technology in a later post.

You can see how effective SEP is in latest detection and performance test reports. We have posted them on the SEP Beta page - http://go.symantec.com/sep12beta/ . Take a look.

Thursday, 17 March 2011

Restrict/Limit Users using (/etc/security/)

User limitations are set in the following files:
  • File: /etc/security/limits.conf :
    • core - limits the core file size (KB)
    • data - max data size (KB)
    • fsize - maximum filesize (KB)
    • memlock - max locked-in-memory address space (KB)
    • nofile - max number of open files
    • rss - max resident set size (KB)
    • stack - max stack size (KB)
    • cpu - max CPU time (MIN)
    • nproc - max number of processes
    • as - address space limit
    • maxlogins - max number of logins for this user
    • priority - the priority to run user process with
    • locks - max number of file locks the user can hold
    •  
  • File: /etc/security/access.conf : 
    Limit access by network or local console logins.

  • File: /etc/security/group.conf : 
    Grant/restrict group device access. 

 
  • File: /etc/security/time.conf : 
    Restrict user access by time, day.

System Monitor Commands

Basic command line:
pstreeProcesses and parent-child relationships
topShow top processes
iostatReport CPU statistics and input/output statistics for devices and partitions.
ps -auxwprocess status
uname -aprint system information
cat /proc/versionDisplay Linux kernel version in use.
cat /etc/redhat-releaseDisplay Red Hat Linux Release. (also /etc/issue)
uptimeTell how long the system has been running. Also number of users and system's load average.
wShow who is logged on and what they are doing.
/sbin/lsmodList all currently loaded kernel modules.
Same as cat /proc/modules
/sbin/runlevelDisplays the system's current runlevel.
hostnameDisplays/changes the system's node name. (Must also manually change hostname setting in /etc/sysconfig/network. Command will change entry in /etc/hosts)
serviceRed Hat/Fedora command to display status of system services.
Example: service --status-all
Help: service --help
GUI/Graphical:
gnome-system-monitorOperating system monitor and usage graphing.
gkrellmGraphical system monitor. (Additional RPM package: gkrellm)
ps33D load meter. Very cool 3-D graphics.
xosviewOperating system monitor: load, memory, swap, net, disk, ...
List of tools:
Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Modern Warfare 3