Put the dog in a sit/stay or down/stay. Then put your foot on the leash so the dog can only have enough slack in the leash to stand or sit but not enough to jump. Continue ignoring the dog as he tries to get up, but keep him in place with your foot on the leash. When the dog is calm and no longer trying to jump, then you can take your foot off and allow the dog to greet the people nicely -- but in a SIT/STAY ONLY.
If the dog will not comply and struggles too much, simply say to the person, "excuse me but we're training. we'll talk later." and immediately take the dog away from that person, not allowing the dog to greet them at all. The dog then learns that he must sit to be greeted, cannot jump, and if he doesn't the consequence is that he doesn't get to meet anyone at all.
In the house, same deal. Take a leash with you to the door. Before opening any door, have the dog sit/stay. Then put the leash on the put your foot on it as above. Then when your guests come in, take the dog with you, ON LEASH, and have him sit/stay at your feet. When the dog calms and lies down, leave him there (ignoring him) for 2 full minutes or more, then silently unhook the leash and allow the dog to get up and sniff and greet nicely. If he jumps and is obnoxious then, simply put the leash back on, back to your feet and ignore the dog again until he is calm.
And, as will all training, it takes time, patience and a lot of love and treats!
Good luck.