Archive

Archives pour 01/2024

Accéder à un serveur ssh comme si c’était un répertoire local

29/01/2024 Comments off

1. Installez sshfs:

sudo aptitude install sshfs

2. Créez le répertoire où apparaîtra le serveur ssh:

mkdir pointdemontage

3. Ajoutez les utilisateurs autorisés à utiliser le logiciel au groupe fuse :

sudo adduser username fuse

4. Montez le serveur ssh:

sshfs login@monserveurssh: pointdemontage

(N’oubliez pas les deux points (:) après le nom ou l’adresse du serveur ssh)

Et voilà !

Vous pouvez accéder au contenu de votre serveur ssh comme si c’était un simple répertoire local !

Pour démonter l’accès:

fusermount -u pointdemontage

Pour plus d’informations, voir la documentation ubuntu : http://doc.ubuntu-fr.org/sshfs

Convert apache HTTP combined logs into SQL (and import it into a mysql database eventually)

28/01/2024 Comments off

source: snippets.dzone.com

you need to extract the data in your http server log files and put it in a database to query it with your usual tools using SQL. this perl script does just this.

it was hard to find it, that’s why i put it here.

#!/usr/bin/perl -w
# Written by Aaron Jenson.
# Original source: http://www.visualprose.com/software.php
# Updated to work under Perl 5.6.1 by Edward Rudd
# Updated 24 march 2007 by Slim Amamou <slim.amamou@alpha-studios.com>
#  - output SQL with the option '--sql'
#  - added SQL create table script to the HELP
#
#  NOTE : you need the TimeDate library (http://search.cpan.org/dist/TimeDate/)
# Lire la suite...

Basic munin plugins for Snort

27/01/2024 Comments off

munin pluginsHere are some basic munin plugins for snort using perfmon (Enable preprocessor perfmonitor in snort.conf)
The snort.conf entry should look something like:

preprocessor perfmonitor: time 300 file /your/path/to/snort.stats pktcnt 5000

(Read the snort docs for more info on performance issues etc.)

Drop Rate:
http://download.gamelinux.org/snort/snort_drop_rate

Pattern Matching:
http://download.gamelinux.org/snort/snort_pattern_match

Traffic speed:
http://download.gamelinux.org/snort/snort_traffic

Alerts:
http://download.gamelinux.org/snort/snort_alerts

Avg KBytes/pkt:
http://download.gamelinux.org/snort/snort_bytes_pkt

Avg Pkts/sec:
http://download.gamelinux.org/snort/snort_pkts

Edit any one of them, to graph what you want from perfmon output. It should be easy!

And now I will test them myself!

Update:
Here is a picture to give you an idea on how the graphs looks:
http://download.gamelinux.org/snort/Snort-Munin-Plugins.pngsource: http://www.gamelinux.org/?p=32

source: GAMELINUX

Linux Command: Show Linux Version

27/01/2024 Comments off

Source: nixCraft

What command I need to type to display Linux kernel version and other information such as Linux distribution name? How do I check Linux kernel version number?

You need to use the following two commands:

[a] uname - Print kernel and system information.
[b] lsb_release - Print distribution-specific information.
[c] /proc/version file - Print running kernel information.

How to check linux kernel version number?

Open a shell prompt (or a terminal) and type the following command to see your current Linux kernel version:

$ uname -r

Sample outputs:

2.6.32-23-generic-pae

Or type the following command:

$ uname -mrs

Sample outputs:

Linux 2.6.32-23-generic-pae i686

To print all information, enter:

$ uname -a

Sample outputs:

Linux vivek-laptop 2.6.32-23-generic-pae #37-Ubuntu SMP Fri Jun 11 09:26:55 UTC 2010 i686 GNU/Linux

Where,

  • 2.6.32-23 – Linux kernel version number
  • pae – pae kernel type indicate that I’m accssing more than 4GB ram using 32 bit kernel.
  • SMP – Kernel that supports multi core and multiple cpus.

Lire la suite…

Categories: Système Tags: , , ,

Thunderbird/Change account order

26/01/2024 Comments off

To change the order of the accounts in Thunderbird simply edit

~/.thunderbird/<your profile>/prefs.js in GNU/Linux,
C:\Documents and Settings\<your profile>\Application Data\Thunderbird\Profiles\****.default\prefs.js in Microsoft Windows XP,

Lire la suite…

Categories: Logiciel Tags: , ,