Following is changes:

local different domains does not work proper, so removed adding lines to resolv.
Instead, add hostfiles for each client, and update those each 10 minutes

If it works, I am  going to use this version for the contest!!