Cable glands (also called compression glands) are a good way to pass cables through the walls of your controller boxes, etc. When installed correctly, they provide a very effective weatherproof seal and provide strain relief for the cable.
You must however use the right sized gland for the intended cable. The supplier will usually specify the range of cable size that suits each type. For example, the H4304 gland from Altronics quotes a 3mm - 6.5mm cable diameter range that it will accept.
The other thing to check is that the rear threaded section is long enough to mount through your enclosure and still fit the nut on properly.
Jaycar Electronics sell a range of sealed ABS boxes that can be used for housing controllers, power supplies or cable junctions. These boxes have internal mounting holes that are still outside of the sealed area.