He is a 2 year old male German shepherd, and he is very playful both inside and outside, but here's the problem – He doesn't really bark at strangers (unless they have dogs with them) and tends to pull the leash when I walk him near other dogs, so I'm afraid to let him loose in the dog park…
Anyway my question is can I train him to be friendly to other dogs and people but still protect my house from potential thieves by barking instead of licking them to death?
Its unusual for a male gsd not to be at least a bit territorial on his own property. But some lines of the gsd can be slow to mature and don`t start to bark at strangers until 2 and a half years old. Your gsd is obviously quite a confident natured dog if he is friendly to people and other dogs which is better than having a gsd who is afraid and nervous of people.
Even so, no dog however much it barks is going to 100% protect your house against intruders without specialised training which is quite costly. The mere presence of a gsd will in most cases be enough to deter most thieves.
You could try and contact a professional ppd trainer who can assess your dogs temperament and advise you if the dog has a suitable temperament to be trained to protect. This does not come cheap. Do not attempt this yourself as you could ruin your dog for life.
Firstly though, it would help if you enrolled in a good dog obedience club as basic training is the foundations to all other types of training and needs to be done first.
Hope this helps a bit.