The visitors were on the attack from the start as Jack Midson forced a save from the Lincoln keeper just a couple of minutes in as he tried a long drive, resulting in a corner.
Ross Flitney was tested down the other end just under 20 minutes in as Ben Tomlinson fought his way into the box before pulling the ball back for Kieran Wallace, but the Eastleigh keeper was ready to make the save.
It was Eastleigh who broke the deadlock just before half time when a string of quick passes found the gaps in the home side's defence, leaving Midson to guide it across the line.
Lincoln were pressing early in the second half as they tried to find an equaliser, resulting in a goal for Tomlinson just before the hour mark as Tommy Miller kept a corner alive to set up the striker.
The visitors were in front against just three minutes later though as Midson charged towards the Lincoln goal again, this time setting up McAllister for a powerful finish from just a few yards out.
Brian Howard had a chance to level the scores in the final 10 minutes, but he could only drag his low effort wide.
The result leaves Eastleigh fourth, five points clear of sixth place, while Lincoln sit 13th.