Japanese Fonts in Putty

I am going to show you here, how to show Japanese characters in file using putty.

(1) First open Putty. Give "Host Name" of the server where you are going to connect.
(2) Click on "Window"->"Translation" in Putty. Select "UTF-8" in Remote Character Set.

(3) Now goto "Windows"->"Appearance" and change Fonts. Set "Ms Gothic" fonts and set "script" to "Japanese" as shown in below figure.

(4) Then open putty session. open Vi editor, and set character encoding in Vim using below command.

:set enc=utf-8

Now you should be able to see Japanese characters in Putty.

Test Multicast in Network



You will come across situation, where you need to identify if multicasting has been enabled or not. Sometimes, its disabled due to some security reasons and to avoid network traffic congestion.

Follow below steps to identify if multicasting enabled or not.

Run the following receiver command on the one server:
java -classpath /root/jgroups-2.11.1.Final.jar org.jgroups.tests.McastReceiverTest -mcast_addr 224.10.10.10 -port 5555

Once the receiver command blocks, simultaneously run the following sender command on another host:
java -classpath /root/jgroups-2.11.1.Final.jar org.jgroups.tests.McastSenderTest -mcast_addr 224.10.10.10 -port 5555

Now two applications should be able to connect and arbitrary lines entered on the sender should appear on the receiver.

Download: jgroups-2.11.1.Final.jar

Give public access to Amazon S3 bucket

Giving each individual file public access becomes cumbersome in Amazon S3. I wanted to give public access to all files in Amazon S3 bucket, I was doing that manually for each file through shell script. But later on I found the way to give permission on bucket it self, so that it can make all files "public" in bucket. You can do it following below steps.


  1. Do right click on bucket -> Properties.
  2. Click on "Edit Bucket Policy". Add below policy and click on "save" button. Done!!!

Using "X-Forwarded-For" in Apache

This post gone be helpful if your incoming traffic is coming from NATed IP and you want to get the actual IP instead of the NATed one for some reason.

Before few days, I created two web server and one load balancer in Amazon EC2. Load balancer was forwarding traffic to two web servers. That was working fine, but due to nature of Amazon ELB we could not get the actual Source IP from where our site was being accessed.

So by googling, we found that using "X-Forwarded-For" we can get the original source's IP Address and we can utilize it for further use(may be for troubleshooting or for Geocoding or for webalizer to create informative graphs). It was just a 3 line of code, which did a trick. You can use that in apache configuration.