Barnaby Joyce says he had "no choice" but to confront the rumours about the paternity of his girlfriend's unborn baby head-on, lashing out at the media for continuing to pursue him despite his resignation as deputy prime minister.

Mr Joyce said he was contacted by multiple media organisations last week asking whether Vikki Campion's boy - due to be born next month - was actually his, prompting his extraordinary interview with Fairfax Media on Saturday.

"This issue has continued to be pursued by media despite my resignation, with paparazzi waiting for us at our gate at the airport on Friday and an upcoming appearance by a Daily Telegraph journalist on ABC's Q&A on Monday night," Mr Joyce said.

"Media had also made multiple requests around the issue which was printed today. Therefore we felt we had no choice but to tell the story."