barnyard2 won’t log to database – how to fix it

What to do when barnyard2 won’t log to the database….

Are you seeing something like this?

Full text:

Take a look at how you are running snort Wrong Way examples

Right Way

What’s causing this problem?

You have enabled one or more of these switches when running snort: -A -b

. . . → Read More: barnyard2 won’t log to database – how to fix it

add two network interfaces in ubuntu 12.04

To add two network interface in ubuntu 12.04 edit /etc/network/interfaces:

Now run:

If you’d like traffic that arrives on eth1 to also exit on eth1 (if your default route happens to be on eth0) then follow these steps: Note: We are assuming in this scenario that eth1′s ip address is 10.1.0.102

egrep valid ip address

Example to egrep valid ip address

To egrep all valid ip addresses in current directory:

Howto make Mongo SSL on Ubuntu 12.04

To make Mongo DB SSL on Ubuntu 12.04 you need to either purchase it or compile from source.

To make compiling from source easy here’s a script to help you out!

Mongo Compile SSL from Source Script

Note: Make sure you are not running an EC2 Small instance or you will run out of space! . . . → Read More: Howto make Mongo SSL on Ubuntu 12.04

neo4j SSL howto

Getting SSL to work with neo4j can be very frustrating.  The crux of the problem is that their documentation isn’t very robust.

Here’s what they don’t tell you:

Both the cert and the key MUST be in DER format!

example to convert a PEM formatted crt key to a der formatted crt key openssl x509 . . . → Read More: neo4j SSL howto

convert valid godaddy cert key to java keystore for tomcat

I spend hours trying to figure this out and here are the fruits of my labor

Howto: Import valid cert and key into a java keystore

note: use the same password in each step

Step 1: Export your key and cert to pkcs12 format

Step 2: Import p12 file to java key store

. . . → Read More: convert valid godaddy cert key to java keystore for tomcat

nginx code igniter remove index.php prefix

Objective

Remove the index.php prefix from your nginx code igniter instance.

Assumptions In your main nginx conf file you define how php is called (unix socket or ip:port) You will replace foo.example.com with whatever your domain name is The proper logging path will be defined per your system as opposed to the location i have . . . → Read More: nginx code igniter remove index.php prefix

append text to end of file with cat

Overwrite File with multi-line text

Objective: Append multiline text with cat Examples Tell log rotate to start rotating the http log (this overwrites any existing file)

 

append text to end of file with cat

Q: What is this magical feature? A: Here Documents . . . → Read More: append text to end of file with cat

linux view disk space usage

Disk Space Usage Visual Tools

Some great tools for viewing disk space usage are: pydf (essential df with colors) Philesight (Web-based implementation of Filelight) ncdu (awesome text-only GUI!)

Philesight

Philesight is a tool to browse your filesystem and see where the diskspace is being used at a glance. Philesight is implemented as a simple command . . . → Read More: linux view disk space usage

redhat add multiple users

useradd script

to add multiple users to a system and force them to change their password upon login try the following script:

Redhat

The above script will add three users to the system (someuser anotheruser yetanotheruser) with the password “password” and set the password age to zero. This forces them to change their password . . . → Read More: redhat add multiple users