14 months is pretty young to learn to be truly nice to another - he almost certainly has very little empathy at this point. He's not trying to hurt the dog; he's pushing a button that makes a bell ring, basically: cause, effect, nothing more. The fact that the dog doesn't react much is a good thing - it makes it likely to be a shorter phase, rather than if the dog did something more exciting.
First off, I'm not surprised "NO" doesn't really work. It doesn't in most cases, unless you're actually scaring him (which is a bad idea for other reasons). That's a short term solution only - it hopefully stops him in the one instance, but it won't work the next time or the next time after that. He needs to see how to properly interact with the dog, and understand why it's important.
Instead, you can try what worked for us. First, when you see him approaching the dog but before anything's happened, sit next to him and the dog, and show him how he can interact with the dog in a positive manner. Pet from head to tail, the easiest motion for the child, and reinforce verbally ("Pet nicely", "Pet this way", "Nice doggie", etc.). Make it fun, and show with your actions how to do it. Do this frequently - it won't work the first or the second or the third time, but after a while he'll be used to seeing you do it.
Second, when you see him doing something he shouldn't, rather than "NO" (which will likely turn this into a more adversarial interaction), go over to him and sit down, and tell him "No thank you, that hurts the dog. No pulling on the ears. We don't pull the tail. Instead, pet nicely", and again show nice petting and go into that routine. This is classic redirection. The "that hurts the dog" probably won't have much effect; but eventually it will, and once he starts to gain empathy for others it'll be something he remembers.
Overall, the main focus at this age is simply showing good behavior. Most of his behavior he learns from watching how you behave at this point. This is good and bad of course - but it's mostly good, because it means you can model good behavior and have a good likelihood of him imitating it.