Diatoms are microalgae encased in highly structured and regular frustules of porous silica. A long-standing biological question has been the function of these frustules, with hypotheses ranging from them acting as photonic light absorbers to being particle filters. While it has been observed that the girdle band pores of the frustule of Coscinodiscus sp. resemble those of a hydrodynamic drift ratchet, we show using scaling arguments and numerical simulations that they cannot act as effective drift ratchets. Instead, we present evidence that frustules are semiactive filters. We propose that frustule pores simultaneously repel viruses while promoting uptake of ionic nutrients via a recirculating, electroosmotic dead-end pore flow, a new mechanism of "hydrodynamic immunity".