Antibacterial filter for water filter and air filter