Use a "Master Flash". It is a stepped rubber flashing that can be trimmed for pipes from 1 1/2 inch to 4 inch with a soft metal over rubber edge that can be formed over ridges and screwed in place. It is recommended that tar be used under the edges for a water tight seal.