!Important!

first is regulation
second is market based

negative prod externality

gov reg - limit output, shifts S back by the ext cost to MSC
taxes - tax shifts S back to MSC, internalises the costs

negative consumption externality

gov reg - prevent consumer activities such as smoking, move MPB back to MSB
indirect tax - shifts S back size of ext. cost, from there its a normal tax diagram

positive prod externality

direct government provision - comes out of gov funds, shifts S from MPC to MSC (spillover benefit)
subsidy = spillover benefit

positive consumption externality

legislation/advertising increases demand from MPB to MSB
subsidy or direct provision - both move S down, moving D too