Much as I try to talk the talk, I am not a dog training professional. If your dog is truly displaying aggression, be it human aggression or dog aggression, you should seek help from a Board Certified Veterinary Behaviorist, who will have studied extensively in areas such as those to meet your needs. The Internet, while a magical place of information and fun, won't necessarily be tailored to your dog and your dog's needs, or adequately explain how you yourself can "fix" things, or even give an accurate and appropriate diagnosis.
That said, I covered briefly what your dog can do when you have friends over. I've posted a picture (that I'll post again here in a few words) of Elka waiting for a delivery person. But, what do you do when a stranger comes to your house? Jehova's Witness, repo man, delivery personnel, door to door sales? What is appropriate for your dog to do, and what do you want your dog to do?
First things first: the arrival. When your dog becomes aware that Somebody is outside, on your property, at your door, what do you want to happen? We find it appropriate for Elka to alert us, but want it to be within reason. A single bark is typically all we want. Since Elka is not a problem barker (thank God) that is sufficient for one of us to check outside. We thank her, or say "no thank you", and proceed from there.
Step two: the greeting. You obviously don't want your dog to rush the door. It's uncomfortable for whoever is there, and it might be dangerous for your dog, because if your dog slips out, a merry chase towards a busy street is a nightmare I know I don't want to live. Depending on how you think your interaction with the visitor goes, you might leash your dog, or send her to her bed.
Step three: the resolution. Either the person enters your home or does not. In the case of a delivery, you receive the delivery, and go your separate ways. In case of a salesperson, sometimes that phrase "no thank you" comes up again. This is obviously assuming your visitor is valid and amiable. What if he or she is not?
Last June, I posted, in an outraged tone, about a protection dog that had cost $230,000, and been sent back (and, thinking about it, I don't think there was ever any followup in news sources of that article. I wonder still about the fate of that German Shepherd Dog. Probably sold again, hopefully this time to a more savvy owner.) If your dog is actually a protection dog, than you know more about this than I do. Really, if somebody were to come to the door and then subsequently try to gain entry when I didn't want them to? I would hope that Elka's presence is enough of a deterrent. If not, I try to close them out, and call the police, and fall back to a part of the house where I can lock myself in until the police arrive, with Elka. She is not a protection dog, and I do not expect her to attack on my behalf.
This isn't to say that Elka has not shown defensive behaviors, which are not to be confused with aggressive ones. If she finds people suspicious when we're outside and she's on leash, she puts herself between me and those people and watches them. Because I am the human, and the grownup, and make the decisions, I typically assess and either tell her "leave it" or we go back inside (or continue on our walk). She's always very interested in people, and most of the time, it's in the most mercenary of ways. Will they feed her or pet her? People are great! I don't mind these sorts of behaviors, as long as she solidly stops when I say so. The "off button" is of utmost importance in all dog activities.
An example from the other day: I was home in the afternoon, and a big truck with a diesel engine pulled up into the driveway. We don't know anybody with such a vehicle. Elka leapt to her feet, barked once, went "full mohawk" (i.e., piloerected) and got onto the love seat to look out the window. Then she looked at me. I looked outside as well; it was a truck from the city. I said to her "Thank you, all done. He's probably here to read the water meter." Then I sent her to the kitchen, where her leashes are hung, and had her sit to put her on leash. The city employee knocked on the door, I had Elka sit and opened it. Yup, there to read the water. I let him in, Elka sniffed him, remembered him from last year, and was in ecstasy that Somebody! Was! Here! To! Pet! Her! City employee obliged, went and read the meter, pet her again, and left. Only the one bark, she looked to me for guidance, and sat and behaved while I opened the door and dealt with the guy. The greeting was a little exuberant, but not out of control, and once he left, she went back to napping.