Category Linux

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…

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…

nohup example

here’s a nohup example: nohup nice -n -19 /bin/bash cidr_to_ipset.sh all_countries.txt 2>&1 > </dev/null & nohup is a POSIX command to ignore the HUP (hangup) signal. The HUP signal is, by convention, the way a terminal warns dependent processes of…