IIS7 SNI Rewrite – Howto

Problem Windows XP Users with IE8 are unable to connect to your Server Name Indication (SNI) enabled Amazon CloudFront distribution. Solution Do not rewrite URLs to CloudFront if the user agent indicates a system that does not support SNI. Example…

iis7 insert rewrite rule web.config

To insert a rewrite rule in to a web.config for deployment purposes you need to modify Web.Release.Config Example <system.webServer> <rewrite xdt:Transform=”Insert”> <outboundRules> <rule name=”Add Cross Origin Access”> <match serverVariable=”RESPONSE_Access_Control_Allow_Origin” pattern=”.*” /> <conditions> <add input=”{REQUEST_URI}” pattern=”.*\.(ttf|otf|eot|woff|svg)\?*.*$” /> </conditions> <action type=”Rewrite” value=”*”/>…

Cloudfront IIS7 CORS Fix

Problem You keep getting Control Allow Origin errors on fonts that are pulling from your CloudFront CDN Solution You need to make changes at CloudFront and your IIS 7 Server CloudFront Changes Modify the origin behaviors: Navigate to the CloudFront…

backup perfmon counters

How to backup your perfmon counters The easiest way to backup your perfmon counters is to use the lodctr tool Lodctr Registers new Performance counter names and Explain text for a service or device driver, and saves and restores counter…

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 #…