Monday, February 24, 2014

Serving Private content using Amazon Cloudfront


A lot of people are using Amazon Cloudfront as Content Delivery Platform(CDN) nowadays. It is very easy. If you want to stream any videos, upload them to Amazon s3 bucket, create a cloudfront distribution, associate the distribution with the s3 bucket. That's it. You can now stream the videos with cloudfront url.

But, is this secure? What if a third party came to know about your urls? can they access it? Of course they can! What if you got the videos from a Production house and you have signed privacy agreements? Can you still serve you content unprotected? They will sue you.

Wednesday, February 19, 2014

Error redirection pages in Apache Tomcat


Errors are part of any application. Broken links and exceptions can be found in any systems. But its bad when some broken links shows 404 page not found  with the default Apache / Tomcat error pages. Revealing information about your webservers. Also its not that great to see a Normal text like Apache error notification when you were browsing a nice website.

So its better to create your own error redirection pages. You can specify link has removed or not found. Also you can provide links to the home page or provide a search box to search things in your website.

In this post we will see how to add custom error redirection pages in Apache tomcat. The version I used is apache-tomcat-6.0.37. On Centos 5.4.

Sunday, February 16, 2014

Adding SPF records


SPF is sender policy framework. It is an email validation system to prevent spamming and spoofing. It verifies the the hosts sending the mails has authority to send mails from corresponding domain. Adding spf record to your domain increases your score. So chances of your mails landing in the spam/junk folders are very less. For this to work, system administrators to add the allowed hosts which can send mails for the corresponding domain in the DNS records. SPF records can be added as TXT records in DNS zone files. In this post we will see how to create and add SPF records, how to verify its working etc.