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

download http directory

Here’s a quick note on how to download the contents of an http directory via command line.

Using lftp to download an HTTP directory

Forget wget, lftp is what you covet!

What is lftp?

LFTP is a sophisticated ftp/http client, and a file transfer program supporting a number of network protocols. Like BASH, it has . . . → Read More: download http directory

connectsock.c struct hostent has no member named h_addr compile error

Recently I was trying to compile connectsock.c from Internetworking With TCP/IP Volume III: Client-Server Programming and Applications, Linux/POSIX Socket Version (with D. Stevens), 2000. 0-13-032071-4

Compile Error

Solution? Modify the Make file!

Before:

After:

curl on windows with https

The easiest way to get curl on windows with HTTPS is to simply download and install the git package then add

as an environment variable to allow you to run curl from anywhere.

Don’t forget when running curl commands in a DOS prompt to use double quotes.

Example:

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