To add to the thread, hopefully not to repeat, but to expand on the idea of teaching children not to talk to strangers. I was told that as a child but was never really told what it meant. I was also told 'children are seen and not heard' and 'adults were always right.' This was highly confusing, since most 'strangers-intending-harm' happen to be adults, and could very well be friendly and appear safe, or could just 'tell me' and I was taught to always obey an adult. I was just very very lucky that nothing happened because I was taught to be an incredibly naive child. I think this made it easier for my parents.
As an adult, I met someone who was raising his little girl to speak up for herself - with adults, even with adults with authority such as teachers, principals, and ministers. And he backed her up when necessary too! He began as early as possible talking to her about different situations: someone offers you candy, or asks for help getting a puppy out from under a car, and so forth. He asked her what she would do, and also why, and talked with her about how people trick children. One example on how important it is to talk about this often and especially to ask the child 'why' -- There is an example of a child saying she would not help someone get a puppy out from under a car -- "Why?" -- I don't like puppies!! I would help get a kitten out from under the car!! -- (yikes!!!)
The little girl grew up confident and able to express herself clearly and respectfully to anyone while not letting herself be used or walked over.
Another thing was that he had a 'secret codeword' with her. This was to be prepared for a situation where he might need to send someone she did not know to pick her up from school. The codeword was to let her know the person could be trusted. He practiced with her so that she remembered the codeword, and knew to keep it secret. If he ever had to have someone else pick her up, he would tell them the codeword to tell her so she would know they were safe.
I hope this helps.