Jason Blake scored twice and made a gorgeous pass to assist on another goal for the Islanders. Mike Sillinger and Tom Poti, both making their Islander home debuts, also scored.
Glen Murray had the only goal for Boston, as the Bruins ended their five-game road trip at 1-3-1. Rookie goalie Hannu Toivonen stopped 35 shots.
Dunham, who has both of New York's wins, got the start when DiPietro hurt his groin. Wade Dubielewicz was recalled from Bridgeport to back up Dunham. DiPietro is listed as day-to-day.
Dunham was spectacular early in the first period, especially on the front end of a four-minute penalty kill, as he kicked aside shots from Marc Savard and Patrice Bergeron. Toivonen also came up big twice with his glove, stopping Miroslav Satan and Trent Hunter on break-ins.
The Islanders, who had given up two power-play goals in each of their first four games, allowed another as Boston took a 1-0 lead at 15:09. Murray, who grabbed a loose puck at the left boards, skated to the faceoff dot and let go a slap shot that hit the post and crossbar and dropped down behind Dunham.
New York tied the game in the second period at 9:37 when a harmless looking rush down the right side by Sillinger ended up with his right circle wrist shot catching the net on the short side.
Blake gave the Islanders the lead at 13:52 when he got around Brad Stuart at centre ice, moved to the top of the left circle, and fired a slap shot that Toivonen got a piece of, but not enough to keep the puck from going in.
The Islanders broke the game open with a pair of power-play goals early in the third period.
Blake picked up his second of the night 46 seconds into the period on a second stuff attempt at the right post.
Poti finished off a back-door play off a Blake pass to make it 4-1 at 2:36.
Notes: New York is 22-11-1-0 in home openers. In the 34 seasons of the Islanders, they have only opened at home four times. ... New York started a seven-game home stand, and nine of the next 10 are at Nassau Veterans Memorial Coliseum. ... The Bruins ended a season-starting five game road trip. The last team to open at home, Boston has to wait until Thursday to wear its black jerseys when the Bruins host Calgary.