British doctor Charlie Fry was surfing with two friends at Avoca Beach when a two-metre shark jumped out of the water and hit him in the right shoulder about 4pm on Monday.
"Just punch it in the nose", Mr Fry told Australia's Nine Network TV.
He said he had been inspired by surfer Mick Fanning, who famously fended off a shark during a competition in 2015.
Mr Fry said he punched the shark while in the water before climbing back on his board and surfing to shore.
Fry escaped the very hectic incident with a few scratches and puncture wounds.
He said he heard a "massive thud" and initially thought it was a friend playing around but turned and "saw a shark's head come out of the water with its teeth".
"So Mick, if you're watching or listening, I owe you a beer".
So when it happened, I was like, "Just do what Mick did, just punch it in the nose".
Trump asked Chinese President to help resolve UCLA shoplifting case
Chinese Premier Li Keqiang sealed the accord with the ASEAN leaders in Manila, according to China's state-run Xinhua news agency. It is also partly claimed by the Philippines, Malaysia, Brunei and Taiwan in addition to Vietnam.
One of the men, who is also a doctor, rushed Dr Fry to Gosford Hospital where they both work.
Fray said he wasn't conscious of his injured and bleeding arm until he reached the shore.
The Sun reported that lifeguards spotted a great white shark, reported to be an estimated 10-feet long, and a bronze whaler shark in the area shortly afterwards.
"I didn't really notice it at the time. all I'm thinking was: 'I'm about to die".
"I didn't feel the teeth going in, it felt like I was smacked, it felt like a hand, a hand grabbing me, shaking me", he said, calling the attack a "close call".
He said he would not be back in the sea for a week because of his injuries, but after that would be "racing to get back in".
Avoca Beach and North Avoca have been closed for 24 hours following the ordeal.