Archive for category ELB

Capturing users IP addresses in Apache httpd and Tomcat logs behind an ELB

When an Elastic Load Balancer handles a connection it sends it’s own (internal/private/10.x) address instead of the clients. It sends the clients along with the request as X-Forwarded-For. To log this you need to log X-Forwarded-For instead of the source IP.

Here are 2 links discussing the problem, the first covers a basic Apache & Tomcat setup, but the second one has a point about direct access getting not logged and has an Apache httpd specific solution.

http://blog.kenweiner.com/2009/09/amazon-elb-capturing-client-ip-address.html

http://blog.grahampoulter.com/2011/10/how-to-log-client-ip-from-apache-behind.html

Thanks @grahampoulter and @kweiner

 

 

, , , , ,

No Comments

Reading : Peecho Minimizing Downtime on Amazon AWS

 

What the guys over at Peecho have done is cool. Similar to the path I’ve taken with auto-scaling and machine updating from S3.

I am going to add some of their ideas, and will incorporate that in my upcoming posts with scripts to do it.

Check it out on their blog – http://www.peecho.com/blog/minimizing-downtime-on-amazon-aws.html

 

, , , , ,

No Comments

Your IE new tab has been hijacked (but not by me)

The short version is that you are at my site because someone hijacked your new or private tab in Internet Explorer.

Please do not blame me, my web servers have been slammed with lots of traffic from this and it will cost me money, and I did not cause it.

Here is how to fix it. Below is a detailed description of what I think happened.

You will need to use the windows registry editor to fix it, or you can download this registry file, and double click on it.

Open Regedit and go to : HKLM\Software\Microsoft\Internet Explorer\AboutURLs
On the right pane double click on the tabs value and change it to : res://ieframe.dll/tabswelcome.htm.

I use Amazon Web Services to host this blog. Part of those services is a load balancer called an Enterprise Load Balancer (ELB).

I point my site at an amazon name (www-jonzobrist-com-954435911.us-east-1.elb.amazonaws.com) and Amazon handles the IP addresses and networking. The upside is I get great scalability for very low cost. Sometimes people set their load balancer incorrectly, and point a hostname (in this case gg.blogpear.com) directly at one of the IP addresses in their load balancer pool. This is wrong because Amazon can change at any time which IP address gets assigned to which load balancer, and they do not guarantee you will ever get that IP back. Someone, who is probably a malicious hacker type, hijacked your browser tab for either new tab or private tab in your Internet Explorer browser. They pointed it at a DNS name gg.blogpear.com, and that DNS name at an IP address on Amazon’s ELB. Somehow Amazon gave me that IP for my www.jonzobrist.com pool, so I got all the traffic. This killed my web servers quickly, and took me most of the day to recover from. I did so initially by setting up rules to return a quick 403 – permission denied error to all the requests. Then as I investigated it further, I figured out (I think) what happened. So now, you get redirected to this page, and hopefully you will get your computer cleaned up and we can all move on without too much trouble.

I recommend you also get a virus scanner, something like Avast, which is free for the non pro version. Download it from Avast.

I would also recommend you download and use Google Chrome and Mozilla Firefox, as they are both more secure (and generally better) web browsers.

I hope this helps!

-Jon Zobrist <jon@jonzobrist.com> http://www.jonzobrist.com/

, , , , , , ,

No Comments

Have my auto update script mostly ready, this is a test!

Hopefully the new server will start automatically behind the ELB, update to the latest, and join the pool!

, , , , , ,

1 Comment

Easy AdSense by Unreal