A 2-component body sealer. It's pretty much permanent, and impervious to everything. 3M, Fuzor, Norton, PlioGrip, they are all pretty much the same, all cost the same, (somewhat pricey) but they work equally well. Meaning great. Norton is my personal go to. It should be used on bare metal for the best results, and can be painted over with anything at all.
Those ducts have to be sealed very good, as any water you may drive over, will get drawn into the heater system, and fog up the windows.