How to waterproof Shimano dynamo connector?
I use ShoeGoo or Sugru (you can Google both brand names) for waterproofing connectors. 

The advantage of both is that they are flexible and waterproof, but also relatively easy to remove in the field without any gooey residue (which tape tends to leave). I also find it hard to use shrinkwrap to waterproof connections where the diameter of the two parts is more than 1:2 in ratio, because of the limitations of the shrinkwrap shrinkage. Nail polish becomes very brittle very quickly. 

For the dyno connector, I'd use ShoeGoo. Assemble the connector. Put just a very small (lentil pea) size on your fingertip and rub it in like caulking compound on the outside of all mating surfaces. You want to get into all the cracks but you don't want to apply too much and weld things together. . This ensures that you'll be able to still take it apart in the field. 

The one exception is where the wires enter the connector body. I might put some ShoeGoo on the outside of the wire before sliding it fully into the connector to ensure that it's well sealed. 

As Daniel Hicks has mentioned, some dielectric grease on the bare wires will help. You can get a tiny squeeze tube at the checkout counter of the auto parts store for under $2.