Month October 2013

Block Countries Behind ELB

To block countries behind an ELB (Elastic Load Balancer) you should use Maxmind’s GeoIP Country Database. Problem You are unable to use iptables or ipset to block countries because of your Amazon Elastic Load Balancer Solution Use Maxmind’s GeoIP Country…

EC2 ELB Godaddy Cert

Adding Godaddy Cert to EC2 ELB Setup AWS Command Line Interface Setup instructions are found here: Define your files and run these commands: # define these crtdomain=”example.com” crtchain=”gd_bundle.crt” echo “converting to pem format” openssl rsa -in ${crtdomain}.key -out aws-${crtdomain}.key…

logstash filters for ssh attempts

Description Logstash filters for ssh brute for, sudo auth failures, or failed login attempts Filters grok { type => “syslog” patterns_dir => [“/opt/logstash/patterns”] pattern => [ “%{SYSLOGLINE}” ] } grep { type => “syslog” drop => false match => […

logstash ec2 instanceid

How to get Logstash to read your ec2 instance id logstash.sh !/bin/bash EC2_INSTANCE_ID=$(curl -s ) export EC2_INSTANCE_ID conf= lsjar= myjava=$(which java) if [ -z $myjava ]; then echo “java is required; please install openjdk or jre” exit 1 fi #…

Ubuntu Set Timezone to UTC

Objective: Set Timezone to UTC on Ubuntu 12.04 LTS Howto You will be using tzdata and ntpdate Setting the timezone After running this select “etc” (hit enter) then select “UTC” (hit enter) pkg-reconfigure tzdata Syncing the clock apt-get -y install…