A Newcastle family has spent much of the day inside after a large brown snake took up residency at their front door.

Anita Johnson was inside her Stockton home with her two sons, aged 5 and 1, when she heard the snake banging at the door on Wednesday morning.

The brown snake was "banging its head on the door" of the Newcastle home. Credit:Anita Johnson

"It was banging its head on the door," she said. "It was striking at the door."

Mrs Johnson said she heard a magpie squawking and some banging and initially expected the bird was hitting the door.