Thanks Trevor for your solution. Kentico needs the working URL with domain name instead of http://10.0.0.4 for the synchronization to work.
Thanks Brenden for the detailed steps. I did configure my sites as per your instructions initially.
One more important point to note here is that:
Synchronization will work only if the domain url of the site has the license. In my case, I had requested and got the license for first trial version site1.com but for the second trial site that I was running on another machine, did not have a license to run the site2.com. So, site2.com -> site1.com synchronization was working but the vice versa is not working.
Thanks for your inputs.