For the past 32 years ,at night after every day of diving we use several drops of "Ear Beer"
Mix 40% white vinegar + 20% glycerine + 20% alcohol and put in a squirt bottle.
Apply inside each ear. Never had an infection and we have dove in some sewer like conditions.
I second this preventative, to be taken after each dive but rinse your ears with fresh water first. Take a look at the DAN www site and seach for 'otitis externa'. I also use medicated olive oil before diving ('Earol') and gentamicin antibiotic after diving. If tell-tale itching starts which is always a precursor to 'otitis', I immediately start a course of oral antibiotics which for me is 'ceflaclor.'