Could you have walked too fast past him? Some rabbits take serious offence to being walked past quickly without the courtesy of touching noses in greeting (or a finger to the nose). If you walked fast towards him and then put your hand towards his head he might have reacted because he was startled too. I have taught my son to move slowly when going towards the buns, but he sometimes forgets and Freya has lunged at him before.
If I want to give them a pet while they are in their pens, I slowly move my hand towards them low down making sure they can see me. Watch their ears, if they are going to lunge their ears are usually held back, speak to them as well so you aren’t ‘sneaking up’ on them. You can scratch the floor gently in an ‘invite’ for a groom/pet. Basically, let them know you are there and ask their permission to come into their area and touch them lolz.
This behaviour might, or might not clear up with neutering because being territorial comes with being a rabbit, but it should lessen at the very least 