Speaking at the G7 summit in Japan, the prime minister, a leading figure in the Remain campaign, denied reports that his "instinct" was to vote Leave.
"I am not a closet anything. I have pretty much had the same view about Europe ever since I got involved in active politics," the PM said.
Boris Johnson told him it was "not too late" to join the Leave campaign.
With four weeks to go before the UK votes on 23 June about whether to leave the European Union, there have been reports that Conservative PM Mr Cameron, at heart,  backs "Brexit," as a British exit from the EU is known.
Steve Hilton, who was one of Mr Cameron's closest aides before leaving Downing Street in 2012 and who worked alongside him when they were both Tory researchers, told the Times on Thursday: "If he was a member of the public, or a backbench MP or a junior minister or even a cabinet minister, I'm certain that he would be for Leave.
"That's his whole instinct. That's who he is. As prime minister he sees it from a different perspective and that's perfectly reasonable ... but I think that if he didn't have that perspective, he would be for Leave."
But Mr Cameron, who has described himself as a Eurosceptic, said at the close of the G7 summit:  "I am not a closet anything. I have pretty much had the same view about Europe ever since I got involved in active politics.
"I have always taken the same view, which is that we are better off in this organisation but we should be aiming to reform this organisation, we should be looking to enhance the special status that Britain.
"I have never been a closet Brexiteer. I am absolutely passionate about getting the right result, getting this reform in Europe and remaining part of it. It's in Britain's national interest."
He pointed to a joint declaration by the leaders of the G7 countries - the UK, US, Germany, France, Italy, Japan and Canada - at the end of the two-day Ise-Shima summit, which stated: "UK exit from the EU would reverse the trend toward greater global trade, investment and the jobs they create and is a further serious risk to growth".
"When you are faced with a difficult decision, it is often a good thing to listen to what your friends think," the prime minister said.
In an interview with BBC South political editor Peter Henley, one of the most senior Conservatives in the Vote Leave campaign, Boris Johnson noted Mr Hilton's comments and said it was "not too late".
Asked if he was suggesting Mr Cameron should join him in campaigning for the UK to leave the EU, the former London mayor added: "Yes. There is more joy in Heaven over one that repenteth. Now is the time. There's a month to go."
He added: "He has been a believer in democracy and over 20 years or so he has been a strong Eurosceptic."
Mr Cameron, in turn, told LBC radio last week that Mr Johnson had "told a lot of people that he'd never been a Leaver" - Mr Johnson responded that he had "been a Eurosceptic for decades".
The Daily Mail reported earlier this week that "senior party figures" had warned of a vote of no-confidence in Mr Cameron after 23 June, whatever the outcome, over his handling of the referendum campaign.
David Cameron has rejected claims he is a "closet Brexiteer," insisting he is  "passionate" about staying in the EU.