Corbyn is a bit like Trump re. NATO, he's not enamoured with it. On that basis, Russia would prefer him. It's an area where I disagree with Corbyn, but I don't think he would actually take us out of NATO, only try to make NATO less confrontational with Russia. I don't think Russia would particularly look to influence our elections though, they'd struggle to compete with Murdoch in that regard.
The vote that Russia would be concerned with with regards the UK has already happened (EU Ref). They will be delighted that we have left the EU, anything that weakens the EU is strategically good for them. I bet Putin loves Farage, a useful idiot if ever there was one.
For me, NATO troops can move around NATO countries and if Russia don't like it, tough sh1t. I don't dislike Russia as such (I dislike Putin though).