The Magpies often rode their luck against a dominant home side but a solid show at the back helped the visitors record a clean sheet in what was a very creditable result for Rafael Benitez's side.
Sir Bobby Robson, who led Porto to successive league titles in the mid-1990s, was remembered before the game, which was part of the Primeira Liga club's 125th birthday celebrations.
Newcastle's first sight of goal came on four minutes as Matt Ritchie tried his luck from the right-hand side of the 18-yard box but blasted his effort over the bar.
Porto responded through Vincent Aboubakar, who sliced the ball over following a deft cross from the right, and from then on it was largely one-way traffic.
Newcastle survived until half time with their clean sheet intact, but after the restart, the defences had to be called upon once again amid intense pressure from Porto.
Sergio Oliveira struck the post with a free kick in the 55th minute, while Dubravka stopped a follow-up effort from Aboubakar and Francisco Soares also found the woodwork.
Dubravka and substitute keeper Karl Darlow continued to shut up shop in the latter stages of the game and Newcastle duly reached full time unscathed.
NEWCASTLE UNITED (4-2-3-1): Dubravka (Darlow 72'); Yedlin (Sterry 62'), Clark (Schar 62'), Lascelles, Dummett (Manquillo 46'); Diame (Hayden 72'), Shelvey (Ki 62'); Ritchie (Roberts 72'), Perez (Longstaff 72'), Murphy (Atsu 72'); Joselu (Armstrong 72')